1. Overview

Microservice containing the business logic for managing document-management-service.

1.1. Version information

Version : 2.0

1.2. URI scheme

Host : localhost
BasePath : /

1.3. Tags

  • document-controller : Document Controller

  • document-reference-controller : Document Reference Controller

2. Resources

2.1. Document-controller

Document Controller

2.1.1. Create Metadata / Create revision

POST /v2.0/documents
Parameters
Type Name Description Schema

Query

clientId
required

client identifier

string

Body

documentMetaInfo
required

JSON input for document metadata creation or revision

string

Responses
HTTP Code Description Schema

201

Created

object

404

Not Found

Api error

409

Conflict

Api error

422

Unprocessable Entity

Api error

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.2. Get documents

GET /v2.0/documents
Parameters
Type Name Description Schema Default

Query

clientId
required

client identifier

string

Query

documentId
optional

input can be document id / Couch URL / external URL

string

Query

page
optional

page

integer (int32)

0

Query

size
optional

size

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

object

404

Not Found

Api error

409

Conflict

Api error

422

Unprocessable Entity

Api error

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.3. Upload document

PUT /v2.0/documents
Parameters
Type Name Description Schema

Query

clientId
required

client identifier

string

Query

docId
required

docId

string

Query

fileName
optional

fileName

string

Query

rev
required

rev

string

FormData

file
required

file

file

Responses
HTTP Code Description Schema

201

Created

object

404

Not Found

Api error

409

Conflict

Api error

422

Unprocessable Entity

Api error

Consumes
  • multipart/form-data

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.4. Get document

GET /v2.0/documents/attachment
Parameters
Type Name Description Schema

Query

attachmentName
optional

attachmentName (required if documentId is not null)

string

Query

clientId
required

client identifier

string

Query

documentId
required

input can be document id / Couch URL

string

Responses
HTTP Code Description Schema

200

OK

ByteArray

404

Not Found

Api error

409

Conflict

Api error

422

Unprocessable Entity

Api error

Produces
  • /

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.5. Get revisions

GET /v2.0/documents/{initialId}
Parameters
Type Name Description Schema

Path

initialId
required

initial id

string

Query

clientId
required

client identifier

string

Responses
HTTP Code Description Schema

200

OK

< object > array

404

Not Found

Api error

409

Conflict

Api error

422

Unprocessable Entity

Api error

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2. Document-reference-controller

Document Reference Controller

2.2.1. Create document reference

POST /v2.0/references
Parameters
Type Name Description Schema

Query

clientId
required

clientId

string

Body

documentReference
required

Json input for document reference creation

string

Responses
HTTP Code Description Schema

201

Created

object

400

Bad Request

Api error

401

Unauthorized

Api error

422

Unprocessable Entity

Api error

Consumes
  • application/json

Produces
  • application/json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

3. Definitions

3.1. Api error

Http Error response.

Name Schema

errorCode
optional

string

message
optional

string

requestPath
optional

string

status
optional

enum (100 CONTINUE, 101 SWITCHING_PROTOCOLS, 102 PROCESSING, 103 CHECKPOINT, 200 OK, 201 CREATED, 202 ACCEPTED, 203 NON_AUTHORITATIVE_INFORMATION, 204 NO_CONTENT, 205 RESET_CONTENT, 206 PARTIAL_CONTENT, 207 MULTI_STATUS, 208 ALREADY_REPORTED, 226 IM_USED, 300 MULTIPLE_CHOICES, 301 MOVED_PERMANENTLY, 302 FOUND, 302 MOVED_TEMPORARILY, 303 SEE_OTHER, 304 NOT_MODIFIED, 305 USE_PROXY, 307 TEMPORARY_REDIRECT, 308 PERMANENT_REDIRECT, 400 BAD_REQUEST, 401 UNAUTHORIZED, 402 PAYMENT_REQUIRED, 403 FORBIDDEN, 404 NOT_FOUND, 405 METHOD_NOT_ALLOWED, 406 NOT_ACCEPTABLE, 407 PROXY_AUTHENTICATION_REQUIRED, 408 REQUEST_TIMEOUT, 409 CONFLICT, 410 GONE, 411 LENGTH_REQUIRED, 412 PRECONDITION_FAILED, 413 PAYLOAD_TOO_LARGE, 413 REQUEST_ENTITY_TOO_LARGE, 414 URI_TOO_LONG, 414 REQUEST_URI_TOO_LONG, 415 UNSUPPORTED_MEDIA_TYPE, 416 REQUESTED_RANGE_NOT_SATISFIABLE, 417 EXPECTATION_FAILED, 418 I_AM_A_TEAPOT, 419 INSUFFICIENT_SPACE_ON_RESOURCE, 420 METHOD_FAILURE, 421 DESTINATION_LOCKED, 422 UNPROCESSABLE_ENTITY, 423 LOCKED, 424 FAILED_DEPENDENCY, 425 TOO_EARLY, 426 UPGRADE_REQUIRED, 428 PRECONDITION_REQUIRED, 429 TOO_MANY_REQUESTS, 431 REQUEST_HEADER_FIELDS_TOO_LARGE, 451 UNAVAILABLE_FOR_LEGAL_REASONS, 500 INTERNAL_SERVER_ERROR, 501 NOT_IMPLEMENTED, 502 BAD_GATEWAY, 503 SERVICE_UNAVAILABLE, 504 GATEWAY_TIMEOUT, 505 HTTP_VERSION_NOT_SUPPORTED, 506 VARIANT_ALSO_NEGOTIATES, 507 INSUFFICIENT_STORAGE, 508 LOOP_DETECTED, 509 BANDWIDTH_LIMIT_EXCEEDED, 510 NOT_EXTENDED, 511 NETWORK_AUTHENTICATION_REQUIRED)

subErrors
optional

ApiSubError

3.2. ApiSubError

Name Schema

errorCode
optional

string

field
optional

string

message
optional

string

value
optional

object

3.3. ByteArray

Type : object

4. Security

4.1. access_token

Type : oauth2
Flow : accessCode
Token URL : https://10.181.213.234/uaa/oauth/authorize
Token URL : https://10.181.213.234/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.2. resource_owner

Type : oauth2
Flow : password
Token URL : https://10.181.213.234/uaa/oauth/token

Name Description

default

Default oauth2 scope.

4.3. implicit_grant

Type : oauth2
Flow : implicit
Token URL : https://10.181.213.234/uaa/oauth/authorize

Name Description

default

Default oauth2 scope.

4.4. client_creds

Type : oauth2
Flow : application
Token URL : https://10.181.213.234/uaa/oauth/token

Name Description

default

Default oauth2 scope.