1. Overview

1.1. URI scheme

Host : localhost
BasePath : /comments-app-service/

1.2. Tags

  • comment-controller : Comment Controller

  • document-controller : Document Controller

  • work-order-controller : Work Order Controller

2. Resources

2.1. Comment-controller

Comment Controller

2.1.1. Creates a new comment thread

POST /comments-viewer/v1/commentThreads
Parameters
Type Name Description Schema

Body

commonCommentRecord
required

CommentThread object to add a new comment

CommonCommentRecord

Responses
HTTP Code Description Schema

200

OK

object

201

Created

BaseResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

Produces
  • application/json;charset=UTF-8

  • application/hal+json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.2. Fetches the list of comments that are associated to the entity instance

GET /comments-viewer/v1/commentThreads
Parameters
Type Name Description Schema Default

Query

entityId
required

EntityId of the comment to fetch the comments associated to it

string

Query

entityType
required

Entity Type on which comments are created

string

Query

showComments
optional

True to get comments on each thread. False to get only threads

boolean

"true"

Responses
HTTP Code Description Schema

200

OK

CommonCommentPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.3. Add a comment to the specified thread

POST /comments-viewer/v1/commentThreads/{threadId}/comments
Parameters
Type Name Description Schema

Path

threadId
required

Thread Id of the comment to fetch the comments associated to it

integer (int64)

Body

commentRecord
required

The new comment details to be added to the thread specified by threadId

CommonCommentRecord

Responses
HTTP Code Description Schema

200

OK

object

201

Created

BaseResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.4. Fetches the list of comments that are associated to the thread

GET /comments-viewer/v1/commentThreads/{threadId}/comments
Parameters
Type Name Description Schema

Path

threadId
required

Thread Id of the comment to fetch the comments associated to it

integer (int64)

Responses
HTTP Code Description Schema

200

OK

CommonCommentPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.5. Fetches comment that are associated to the thread and commentId

GET /comments-viewer/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type Name Description Schema

Path

commentId
required

Comment Id of the comment to fetch the comments associated to it

integer (int64)

Path

threadId
required

Thread Id of the comment to fetch the comments associated to it

integer (int64)

Responses
HTTP Code Description Schema

200

OK

CommonCommentPage

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.6. Update comment

PUT /comments-viewer/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type Name Description Schema

Path

commentId
required

Comment Id of the comment to update

integer (int64)

Path

threadId
required

Thread Id of the comment to update

integer (int64)

Body

commonCommentRecord
required

SecureCommentRecord Object to update a comment

CommonCommentRecord

Responses
HTTP Code Description Schema

200

OK

CommentRecord

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.7. Deletes common comment

DELETE /comments-viewer/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type Name Description Schema

Path

commentId
required

comment Id to delete

integer (int64)

Path

threadId
required

comment thread Id to delete

integer (int64)

Query

commentType
optional

valid comment types that the comment is sub comment of Enti types to . Ex: Skip, Overdue for Activities.

string

Query

entityId
required

entityId is from the type of entityType’s id .

integer (int64)

Query

entityType
required

valid entityType to comment. Ex:WorkOrder,SerialNumber

string

Responses
HTTP Code Description Schema

200

OK

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.1.8. Creates a Multiple comment thread

POST /comments-viewer/v1/multipleCommentThreads
Parameters
Type Name Description Schema

Body

commonCommentRecordv2
required

CommentThread object to add a new comment

MutilpleEntityCommentRecord

Responses
HTTP Code Description Schema

200

OK

object

201

Created

BaseResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Consumes
  • application/json;charset=UTF-8

Produces
  • application/json;charset=UTF-8

  • application/hal+json

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2. Document-controller

Document Controller

2.2.1. Create metadata

POST /comments-viewer/v1/documents
Parameters
Type Name Description Schema

Query

clientId
required

clientId

string

Body

documentMetaInfo
required

Metadata for creation of document or revision

string

Responses
HTTP Code Description Schema

201

Created

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

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.2.2. Get Documents

GET /comments-viewer/v1/documents
Parameters
Type Name Description Schema Default

Query

clientId
required

clientId

string

Query

docId
optional

document id

string

Query

pageNo
optional

page

integer (int32)

0

Query

size
optional

size

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

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.3. Document upload

PUT /comments-viewer/v1/documents
Parameters
Type Name Description Schema

Query

attachmentName
optional

attachment name

string

Query

clientId
required

clientId

string

Query

docId
required

document id

string

Query

rev
required

_rev

string

FormData

file
required

document to upload

file

Responses
HTTP Code Description Schema

200

OK

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

409

Conflict

Api error

422

Unprocessable Entity

Api error

Consumes
  • multipart/form-data

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.2.4. Get document

GET /comments-viewer/v1/documents/attachment
Parameters
Type Name Description Schema

Query

attachmentName
required

attachment name

string

Query

clientId
required

clientId

string

Query

docId
required

document id or url

string

Responses
HTTP Code Description Schema

200

OK

object

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

422

Unprocessable Entity

HttpErrorResponse

Security
Type Name Scopes

oauth2

access_token

default

oauth2

client_creds

default

oauth2

resource_owner

default

oauth2

implicit_grant

default

2.3. Work-order-controller

Work Order Controller

2.3.1. Fetches the list of materiallot actuals that are associated to the workorder

GET /workorder/{workOrderId}/materiallotactuals
Parameters
Type Name Description Schema

Path

workOrderId
required

workOrderId to fetch the material lot actuals associated to workorder

integer (int64)

Responses
HTTP Code Description Schema

200

OK

< object > array

400

Bad Request

HttpErrorResponse

401

Unauthorized

HttpErrorResponse

404

Not Found

HttpErrorResponse

500

Internal Server error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

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. Attachment

Name Description Schema

attachmentName
optional

document name

string

attachmentType
optional

attachment type

string

documentId
optional

documentId of the document

string

3.4. BaseResponse

Name Schema

data
optional

object

links
optional

< Link > array

message
optional

string

statusCode
optional

integer (int32)

3.5. CommentRecord

Name Description Schema

attachments
optional

Comment Attachments

< Attachment > array

commentId
optional

Unique identifier of this comment record

integer (int64)

commentText
optional

The text of the comment

string

commentTime
optional

The time this comment was entered

string (date-time)

threadId
optional

Comment thread this record is part of

integer (int64)

user
optional

The user performing on comment

IdNameValue

3.6. CommonComment

Name Description Schema

attachments
optional

Comment Attachments

< Attachment > array

commentId
optional

Unique identifier of this comment record

integer (int64)

commentText
optional

The text of the comment

string

commentTime
optional

The time this comment was entered

string (date-time)

links
optional

< Link > array

threadId
optional

Comment thread this record is part of

integer (int64)

user
optional

The user performing on comment

IdNameValue

3.7. CommonCommentPage

Name Schema

content
optional

< CommonComment > array

links
optional

< Link > array

page
optional

PageMetadata

3.8. CommonCommentRecord

Name Description Schema

attachments
optional

Comment Attachments

< Attachment > array

commentText
optional

The text of the comment

string

commentType
optional

CommentType that the comment is mapped to. Ex: 1 for Tests, 80 for Activities

string

entityId
optional

EntityId’s instance Id for this comment

integer (int64)

entityType
optional

Entity Type of Plant Apps or non-Plant Apps for this comment record

string

3.9. Error

Name Schema

code
optional

string

details
optional

object

3.10. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

3.11. IdNameValue

Name Description Schema

id
optional

The unique ID of the entity

integer (int64)

name
optional

The name of the entity

string

Name Description Schema

deprecation
optional

string

href
optional

string

hreflang
optional

string

media
optional

string

name
optional

string

profile
optional

string

rel
optional

string

template
optional

UriTemplate

templated
optional

Example : false

boolean

title
optional

string

type
optional

string

3.13. MutilpleEntityCommentRecord

Name Description Schema

attachments
optional

Comment Attachments

< Attachment > array

commentText
optional

The text of the comment

string

commentType
optional

CommentType that the comment is mapped to. Ex: 1 for Tests, 80 for Activities

string

entityIds
optional

EntityId’s instance Id for this comment

< integer (int64) > array

entityType
optional

Entity Type of Plant Apps or non-Plant Apps for this comment record

string

3.14. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.15. TemplateVariable

Name Schema

description
optional

string

name
optional

string

type
optional

enum (, ?, &, /, #, *)

3.16. UriTemplate

Name Schema

variableNames
optional

< string > array

variables
optional

< TemplateVariable > array

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.