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 |
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 |
enum (WorkOrder, SerialNumber, ProductionEvent) |
|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
3. Definitions
3.1. Api error
Http Error response.
Name | Schema |
---|---|
errorCode |
string |
message |
string |
requestPath |
string |
status |
enum (100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511) |
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.11. IdNameValue
Name | Description | Schema |
---|---|---|
id |
The unique ID of the entity |
integer (int64) |
name |
The name of the entity |
string |
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. |