1. Overview
The comment service contains a collection of RESTful service calls to retrive information relevent to comments in manufacturing execution.
Description of endpoints can be found in the section headers for each collection of relevent resources.
2. Resources
2.1. Comment-controller
Comment Controller
2.1.1. Creates a new comment thread
POST /comment/v1/commentThreads
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
commentRecord |
SecureCommentRecord object to create a new comment thread |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
422 |
Unprocessable Entity |
2.1.2. Checks the permissions for user to add/edit comments
GET /comment/v1/commentThreads/permissions
Caution
|
operation.deprecated |
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
sheetId |
Sheet Id to check the permissions for user to add/edit comments |
integer (int64) |
2.1.3. Add a comment to the specified thread
POST /comment/v1/commentThreads/{threadId}/comments
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
threadId |
Thread Id of the comment to add a nested comment |
integer (int64) |
Body |
newComment |
SecureCommentRecord object to add a new comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
422 |
Unprocessable Entity |
2.1.4. Fetches the list of comments that are associated to the thread
GET /comment/v1/commentThreads/{threadId}/comments
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
threadId |
Thread Id of the comment to fetch the comments associated to it |
integer (int64) |
|
Query |
page |
Results per page you want to retrieve (0..500) |
integer (int32) |
|
Query |
size |
Number of records per page. |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
500 |
Internal Server Error |
No Content |
2.1.5. Fetches a single comment
GET /comment/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
commentId |
Comment Id to fetch a single comment |
integer (int64) |
Path |
threadId |
Thread Id to fetch a comment |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
404 |
Not Found, No Comment Found For the given CommentId |
No Content |
2.1.6. Update a comment
PUT /comment/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 |
updatedComment |
SecureCommentRecord Object to update a comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden , The user is not allowed to update the comment |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
2.1.7. Delete a comment
DELETE /comment/v1/commentThreads/{threadId}/comments/{commentId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
commentId |
Comment Id of the comment to delete |
integer (int64) |
Path |
threadId |
Thread Id of the comment to delete |
integer (int64) |
Query |
addlInfo |
Comment Type within the root. - EX: If the root is Activities, 'overdue' for Overdue comment, 'skip' for skip comment |
string |
Query |
addlInfo2 |
Additional parameter EX: If the root is Activities, 'SheetId' to check permissions |
string |
Query |
commentType |
Comment root that the comment is mapped to. Ex: 1 for Tests, 80 for Activities. |
enum (Tests, Variables, Product, ProductionEvent, SheetColumns, AlarmTemplates, AlarmTemplateVariableData, ProdUnits, UDE, UDECause, UDEAction, UDEResearch, AlarmCause, AlarmAction, AlarmResearch, DowntimeCause, DowntimeAction, DowntimeResearch, ProductChange, WasteCause, WasteAction, WasteResearch, EDModels, Calculations, EventSubtypes, EventConfiguration, CustomerOrders, CustomerOrderLineItems, EDFields, ProductionPlan, Characteristics, ProductionLines, ProductionGroups, SecurityGroups, Specifications, ProductionSetup, ProductionSetupDetail, CrewSchedule, ActiveSpecs, COA, COAItems, ContainerLocation, CustomerCOA, EventDetails, EventReasons, GB_DSet, GB_RSum, InProcessBins, PrdExecInputEvent, ProductFamily, ProductProperties, ProductionPlanStarts, ReportTreeTemplates, ReportWebpages, SavedQueries, Sheets, Shipment, ShipmentLineItems, StoredProcs, DowntimeSummaryAction, DowntimeSummaryCause, DowntimeSummaryResearch, TransProperties, TransVariables, Transactions, VarSpecs, DefectDetailsAction, DefectDetailsCause, DefectDetailsResearch, PrdExecPaths, UnitLocation, Departments, PrdExecPathUnitStarts, NonProductiveDetail, Activity, WORKORDER, OPERATION, SERIALNUMBER, NONPATYPE, SUPERVISOR, esignaturePerformer, esignatureVerifier) |
Query |
rootId |
Id of the root to which the comment is associated to. Ex: ActivityId/TestId. |
integer (int64) |
Query |
unitId |
Unit Id to check permissions |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content, The comment is deleted successfully |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden , The user is not allowed to delete the comment |
|
404 |
Not Found, No comment found |
2.1.8. Checks the permissions for user to change others comments
GET /v1/commentPermission
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
commentType |
Comment root that the comment is mapped to. Ex: 79 for NonProductiveDetail comments. |
enum (Tests, Variables, Product, ProductionEvent, SheetColumns, AlarmTemplates, AlarmTemplateVariableData, ProdUnits, UDE, UDECause, UDEAction, UDEResearch, AlarmCause, AlarmAction, AlarmResearch, DowntimeCause, DowntimeAction, DowntimeResearch, ProductChange, WasteCause, WasteAction, WasteResearch, EDModels, Calculations, EventSubtypes, EventConfiguration, CustomerOrders, CustomerOrderLineItems, EDFields, ProductionPlan, Characteristics, ProductionLines, ProductionGroups, SecurityGroups, Specifications, ProductionSetup, ProductionSetupDetail, CrewSchedule, ActiveSpecs, COA, COAItems, ContainerLocation, CustomerCOA, EventDetails, EventReasons, GB_DSet, GB_RSum, InProcessBins, PrdExecInputEvent, ProductFamily, ProductProperties, ProductionPlanStarts, ReportTreeTemplates, ReportWebpages, SavedQueries, Sheets, Shipment, ShipmentLineItems, StoredProcs, DowntimeSummaryAction, DowntimeSummaryCause, DowntimeSummaryResearch, TransProperties, TransVariables, Transactions, VarSpecs, DefectDetailsAction, DefectDetailsCause, DefectDetailsResearch, PrdExecPaths, UnitLocation, Departments, PrdExecPathUnitStarts, NonProductiveDetail, Activity, WORKORDER, OPERATION, SERIALNUMBER, NONPATYPE, SUPERVISOR, esignaturePerformer, esignatureVerifier) |
Query |
rootId |
Id of the root to which the comment is associated to. Ex: DowntimeID/ NPTId |
integer (int64) |
Query |
sheetId |
Sheet Id to check the permissions for user to change others comments |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad Request |
No Content |
401 |
Unauthorized |
No Content |
2.2. Common-comment-controller
Common Comment Controller
2.2.1. Creates a new comment thread
POST /comment/v2/commentThreads
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
commentEntry |
CommentThread object to add a new comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
422 |
Unprocessable Entity |
2.2.2. Fetches comment threads that are associated with entities
GET /comment/v2/commentThreads
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
commentType |
Type of comment |
string |
|
Query |
entityId |
Entity Id on which comments are created |
string |
|
Query |
entityType |
Entity Type on which comments are created |
enum (WorkOrder, SerialNumber, ProductionEvent) |
|
Query |
page |
Results per page you want to retrieve (0..20) |
integer (int32) |
|
Query |
size |
Number of records per page. |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
400 |
Bad request |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource Not Found |
No Content |
500 |
Internal Server Error |
No Content |
2.2.3. Add a comment to the specified thread
POST /comment/v2/commentThreads/{threadId}/comments
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
threadId |
Thread Id of the comment to add the new comments associated to it |
integer (int64) |
Body |
commentEntry |
The new comment details to be added to the thread specified by threadId |
Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
|
422 |
Unprocessable Entity |
2.2.4. Fetches the list of comments that are associated to the thread
GET /comment/v2/commentThreads/{threadId}/comments
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
threadId |
Thread Id of the comment to fetch the comments associated to it |
integer (int64) |
|
Query |
page |
Results per page you want to retrieve (0..500) |
integer (int32) |
|
Query |
size |
Number of records per page. |
integer (int32) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource Not Found |
No Content |
2.2.5. Fetches comments that are associated to the thread and commentId
GET /comment/v2/commentThreads/{threadId}/comments/{commentId}
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
commentId |
Comment Id of the comment to fetch |
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 |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Requested Resource Not Found |
No Content |
500 |
Internal Server Error |
No Content |
2.2.6. Update a comment
PUT /comment/v2/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 |
updatedComment |
CommentRecord Object to update a comment |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden , The user is not allowed to update the comment |
|
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
2.2.7. Deletes a comment associated with threadId and commentId
DELETE /comment/v2/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 |
Comment type that the comment is mapped to. Ex: Skip, Overdue. |
string |
Query |
entityId |
entityId is from the type of commentType’s id . |
integer (int64) |
Query |
entityType |
entityType from comment lookup |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
OK |
|
204 |
No Content, The comment is deleted successfully |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden , The user is not allowed to delete the comment |
|
404 |
Not Found, No comment found |
3. Definitions
3.1. Attachment
Name | Description | Schema |
---|---|---|
attachmentName |
document name |
string |
attachmentType |
attachment type |
string |
documentId |
documentId of the document |
string |
3.2. BaseResponse
Name | Schema |
---|---|
data |
object |
links |
< Link > array |
message |
string |
statusCode |
integer (int32) |
3.3. Comment
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.4. CommentPage
Name | Schema |
---|---|
content |
< Comment > array |
links |
< Link > array |
page |
3.5. CommentPermissionResource
Name | Schema |
---|---|
commentPermission |
boolean |
links |
< Link > array |
3.6. 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.7. 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.8. CommonCommentPage
Name | Schema |
---|---|
content |
< CommonComment > array |
links |
< Link > array |
page |
3.9. 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.10. CommonCommentThread
Name | Description | Schema |
---|---|---|
commentCount |
comment count of comment thread |
integer (int64) |
commentType |
Comment Type of this comment record |
string |
entityId |
Entity Id of this comment record |
string |
entityType |
Entity Type of this comment record |
string |
links |
< Link > array |
|
threadId |
ThreadId of this comment record |
integer (int64) |
3.11. CommonCommentThreadPage
Name | Schema |
---|---|
content |
< CommonCommentThread > array |
links |
< Link > array |
page |
3.14. IdNameValue
Name | Description | Schema |
---|---|---|
id |
The unique ID of the entity |
integer (int64) |
name |
The name of the entity |
string |
3.16. PageMetadata
Name | Schema |
---|---|
number |
integer (int64) |
size |
integer (int64) |
totalElements |
integer (int64) |
totalPages |
integer (int64) |
3.17. PagedResources«Resource«CommentRecord»»
Name | Schema |
---|---|
content |
< Resource«CommentRecord» > array |
links |
< Link > array |
page |
3.18. Resource«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) |
links |
< Link > array |
|
threadId |
Comment thread this record is part of |
integer (int64) |
user |
The user performing on comment |
3.19. SecureCommentRecord
Name | Description | Schema |
---|---|---|
addlInfo |
Comment Type within the root. - EX: If the root is Activities, 'overdue' for Overdue comment, 'skip' for skip comment |
string |
addlInfo2 |
Additional parameter EX: If the root is Activities, 'SheetId' to check permissions |
string |
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) |
commentType |
Comment Root that the comment is mapped to. Ex: 1 for Tests, 80 for Activities |
enum (Tests, Variables, Product, ProductionEvent, SheetColumns, AlarmTemplates, AlarmTemplateVariableData, ProdUnits, UDE, UDECause, UDEAction, UDEResearch, AlarmCause, AlarmAction, AlarmResearch, DowntimeCause, DowntimeAction, DowntimeResearch, ProductChange, WasteCause, WasteAction, WasteResearch, EDModels, Calculations, EventSubtypes, EventConfiguration, CustomerOrders, CustomerOrderLineItems, EDFields, ProductionPlan, Characteristics, ProductionLines, ProductionGroups, SecurityGroups, Specifications, ProductionSetup, ProductionSetupDetail, CrewSchedule, ActiveSpecs, COA, COAItems, ContainerLocation, CustomerCOA, EventDetails, EventReasons, GB_DSet, GB_RSum, InProcessBins, PrdExecInputEvent, ProductFamily, ProductProperties, ProductionPlanStarts, ReportTreeTemplates, ReportWebpages, SavedQueries, Sheets, Shipment, ShipmentLineItems, StoredProcs, DowntimeSummaryAction, DowntimeSummaryCause, DowntimeSummaryResearch, TransProperties, TransVariables, Transactions, VarSpecs, DefectDetailsAction, DefectDetailsCause, DefectDetailsResearch, PrdExecPaths, UnitLocation, Departments, PrdExecPathUnitStarts, NonProductiveDetail, Activity, WORKORDER, OPERATION, SERIALNUMBER, NONPATYPE, SUPERVISOR, esignaturePerformer, esignatureVerifier) |
rootId |
Id of the root to which the comment is associated to. Ex: ActivityId/TestId |
integer (int64) |
threadId |
Comment thread this record is part of |
integer (int64) |
unitId |
Unit Id to check permissions |
integer (int64) |
user |
The user performing on comment |
4. Security
4.1. access_token
Type : oauth2
Flow : accessCode
Token URL : http://localhost:8080/uaa/oauth/authorize
Token URL : http://localhost:8080/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.2. resource_owner
Type : oauth2
Flow : password
Token URL : http://localhost:8080/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.3. implicit_grant
Type : oauth2
Flow : implicit
Token URL : http://localhost:8080/uaa/oauth/authorize
Name | Description |
---|---|
default |
Default oauth2 scope. |
4.4. client_creds
Type : oauth2
Flow : application
Token URL : http://localhost:8080/uaa/oauth/token
Name | Description |
---|---|
default |
Default oauth2 scope. |