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 |
CommentThread object to add a new comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Consumes
-
application/json;charset=UTF-8
Produces
-
application/json;charset=UTF-8
-
application/hal+json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
EntityId of the comment to fetch the comments associated to it |
string |
|
Query |
entityType |
Entity Type on which comments are created |
string |
|
Query |
showComments |
True to get comments on each thread. False to get only threads |
boolean |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Thread Id of the comment to fetch the comments associated to it |
integer (int64) |
Body |
commentRecord |
The new comment details to be added to the thread specified by threadId |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Consumes
-
application/json;charset=UTF-8
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Thread Id of the comment to fetch the comments associated to it |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
Comment Id of the comment to fetch the comments associated to it |
integer (int64) |
Path |
threadId |
Thread Id of the comment to fetch the comments associated to it |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.1.6. Update comment
PUT /comments-viewer/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
commentId |
Comment Id of the comment to update |
integer (int64) |
Path |
threadId |
Thread Id of the comment to update |
integer (int64) |
Body |
commonCommentRecord |
SecureCommentRecord Object to update a comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Consumes
-
application/json;charset=UTF-8
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.1.7. Deletes common comment
DELETE /comments-viewer/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
commentId |
comment Id to delete |
integer (int64) |
Path |
threadId |
comment thread Id to delete |
integer (int64) |
Query |
commentType |
valid comment types that the comment is sub comment of Enti types to . Ex: Skip, Overdue for Activities. |
string |
Query |
entityId |
entityId is from the type of entityType’s id . |
integer (int64) |
Query |
entityType |
valid entityType to comment. Ex:WorkOrder,SerialNumber |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.1.8. Creates a Multiple comment thread
POST /comments-viewer/v1/multipleCommentThreads
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
commonCommentRecordv2 |
CommentThread object to add a new comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Consumes
-
application/json;charset=UTF-8
Produces
-
application/json;charset=UTF-8
-
application/hal+json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.2. Document-controller
Document Controller
2.2.1. Create metadata
POST /comments-viewer/v1/documents
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
clientId |
clientId |
string |
Body |
documentMetaInfo |
Metadata for creation of document or revision |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
422 |
Unprocessable Entity |
Consumes
-
application/json
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.2.2. Get Documents
GET /comments-viewer/v1/documents
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
clientId |
clientId |
string |
|
Query |
docId |
document id |
string |
|
Query |
pageNo |
page |
integer (int32) |
|
Query |
size |
size |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
422 |
Unprocessable Entity |
Produces
-
application/json
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.2.3. Document upload
PUT /comments-viewer/v1/documents
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
attachmentName |
attachment name |
string |
Query |
clientId |
clientId |
string |
Query |
docId |
document id |
string |
Query |
rev |
_rev |
string |
FormData |
file |
document to upload |
file |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
409 |
Conflict |
|
422 |
Unprocessable Entity |
Consumes
-
multipart/form-data
Produces
-
/
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
2.2.4. Get document
GET /comments-viewer/v1/documents/attachment
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
attachmentName |
attachment name |
string |
Query |
clientId |
clientId |
string |
Query |
docId |
document id or url |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
object |
400 |
Bad Request |
|
401 |
Unauthorized |
|
422 |
Unprocessable Entity |
Produces
-
/
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
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 |
workOrderId to fetch the material lot actuals associated to workorder |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
< object > array |
400 |
Bad Request |
|
401 |
Unauthorized |
|
404 |
Not Found |
|
500 |
Internal Server error |
Produces
-
application/json;charset=UTF-8
Security
Type | Name | Scopes |
---|---|---|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
|
oauth2 |
default |
3. Definitions
3.1. Api error
Http Error response.
Name | Schema |
---|---|
errorCode |
string |
message |
string |
requestPath |
string |
status |
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 |
3.2. ApiSubError
Name | Schema |
---|---|
errorCode |
string |
field |
string |
message |
string |
value |
object |
3.3. Attachment
Name | Description | Schema |
---|---|---|
attachmentName |
document name |
string |
attachmentType |
attachment type |
string |
documentId |
documentId of the document |
string |
3.4. BaseResponse
Name | Schema |
---|---|
data |
object |
links |
< Link > array |
message |
string |
statusCode |
integer (int32) |
3.5. CommentRecord
Name | Description | Schema |
---|---|---|
attachments |
Comment Attachments |
< Attachment > array |
commentId |
Unique identifier of this comment record |
integer (int64) |
commentText |
The text of the comment |
string |
commentTime |
The time this comment was entered |
string (date-time) |
threadId |
Comment thread this record is part of |
integer (int64) |
user |
The user performing on comment |
3.6. CommonComment
Name | Description | Schema |
---|---|---|
attachments |
Comment Attachments |
< Attachment > array |
commentId |
Unique identifier of this comment record |
integer (int64) |
commentText |
The text of the comment |
string |
commentTime |
The time this comment was entered |
string (date-time) |
links |
< Link > array |
|
threadId |
Comment thread this record is part of |
integer (int64) |
user |
The user performing on comment |
3.7. CommonCommentPage
Name | Schema |
---|---|
content |
< CommonComment > array |
links |
< Link > array |
page |
3.8. CommonCommentRecord
Name | Description | Schema |
---|---|---|
attachments |
Comment Attachments |
< Attachment > array |
commentText |
The text of the comment |
string |
commentType |
CommentType that the comment is mapped to. Ex: 1 for Tests, 80 for Activities |
string |
entityId |
EntityId’s instance Id for this comment |
integer (int64) |
entityType |
Entity Type of Plant Apps or non-Plant Apps for this comment record |
string |
3.9. Error
Name | Schema |
---|---|
code |
string |
details |
object |
3.10. HttpErrorResponse
Name | Schema |
---|---|
error |
|
path |
string |
timestamp |
string |
3.11. IdNameValue
Name | Description | Schema |
---|---|---|
id |
The unique ID of the entity |
integer (int64) |
name |
The name of the entity |
string |
3.12. Link
Name | Description | Schema |
---|---|---|
deprecation |
string |
|
href |
string |
|
hreflang |
string |
|
media |
string |
|
name |
string |
|
profile |
string |
|
rel |
string |
|
template |
||
templated |
Example : |
boolean |
title |
string |
|
type |
string |
3.13. MutilpleEntityCommentRecord
Name | Description | Schema |
---|---|---|
attachments |
Comment Attachments |
< Attachment > array |
commentText |
The text of the comment |
string |
commentType |
CommentType that the comment is mapped to. Ex: 1 for Tests, 80 for Activities |
string |
entityIds |
EntityId’s instance Id for this comment |
< integer (int64) > array |
entityType |
Entity Type of Plant Apps or non-Plant Apps for this comment record |
string |
3.14. PageMetadata
Name | Schema |
---|---|
number |
integer (int64) |
size |
integer (int64) |
totalElements |
integer (int64) |
totalPages |
integer (int64) |
3.15. TemplateVariable
Name | Schema |
---|---|
description |
string |
name |
string |
type |
enum (, ?, &, /, #, *) |
3.16. UriTemplate
Name | Schema |
---|---|
variableNames |
< string > array |
variables |
< 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. |