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.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • comment-controller : Comment Controller

  • common-comment-controller : Common Comment Controller

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
required

SecureCommentRecord object to create a new comment thread

SecureCommentRecord

Responses
HTTP Code Description Schema

201

Created

Comment

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

422

Unprocessable Entity

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

Sheet Id to check the permissions for user to add/edit comments

integer (int64)

Responses
HTTP Code Description Schema

200

OK

boolean

401

Unauthorized

No Content

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 /comment/v1/commentThreads/{threadId}/comments
Parameters
Type Name Description Schema

Path

threadId
required

Thread Id of the comment to add a nested comment

integer (int64)

Body

newComment
required

SecureCommentRecord object to add a new comment

SecureCommentRecord

Responses
HTTP Code Description Schema

201

Created

Comment

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

422

Unprocessable Entity

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 /comment/v1/commentThreads/{threadId}/comments
Parameters
Type Name Description Schema Default

Path

threadId
required

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

integer (int64)

Query

page
optional

Results per page you want to retrieve (0..500)

integer (int32)

20

Query

size
optional

Number of records per page.

integer (int32)

0

Responses
HTTP Code Description Schema

200

OK

CommentPage

401

Unauthorized

No Content

500

Internal Server Error

No Content

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 a single comment

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

Path

commentId
required

Comment Id to fetch a single comment

integer (int64)

Path

threadId
required

Thread Id to fetch a comment

integer (int64)

Responses
HTTP Code Description Schema

200

OK

Comment

401

Unauthorized

No Content

404

Not Found, No Comment Found For the given CommentId

No Content

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 a comment

PUT /comment/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

updatedComment
required

SecureCommentRecord Object to update a comment

SecureCommentRecord

Responses
HTTP Code Description Schema

200

OK

Comment

401

Unauthorized

No Content

403

Forbidden , The user is not allowed to update the comment

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

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. Delete a comment

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

Path

commentId
required

Comment Id of the comment to delete

integer (int64)

Path

threadId
required

Thread Id of the comment to delete

integer (int64)

Query

addlInfo
optional

Comment Type within the root. - EX: If the root is Activities, 'overdue' for Overdue comment, 'skip' for skip comment

string

Query

addlInfo2
optional

Additional parameter EX: If the root is Activities, 'SheetId' to check permissions

string

Query

commentType
required

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
required

Id of the root to which the comment is associated to. Ex: ActivityId/TestId.

integer (int64)

Query

unitId
required

Unit Id to check permissions

integer (int64)

Responses
HTTP Code Description Schema

200

OK

CommentRecord

204

No Content, The comment is deleted successfully

CommentRecord

401

Unauthorized

No Content

403

Forbidden , The user is not allowed to delete the comment

HttpErrorResponse

404

Not Found, No comment found

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. Checks the permissions for user to change others comments

GET /v1/commentPermission
Parameters
Type Name Description Schema

Query

commentType
optional

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
optional

Id of the root to which the comment is associated to. Ex: DowntimeID/ NPTId

integer (int64)

Query

sheetId
optional

Sheet Id to check the permissions for user to change others comments

integer (int64)

Responses
HTTP Code Description Schema

200

OK

CommentPermissionResource

400

Bad Request

No Content

401

Unauthorized

No Content

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

CommentThread object to add a new comment

CommonCommentRecord

Responses
HTTP Code Description Schema

201

Created

BaseResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

422

Unprocessable Entity

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.2.2. Fetches comment threads that are associated with entities

GET /comment/v2/commentThreads
Parameters
Type Name Description Schema Default

Query

commentType
optional

Type of comment

string

Query

entityId
optional

Entity Id on which comments are created

string

Query

entityType
required

Entity Type on which comments are created

enum (WorkOrder, SerialNumber, ProductionEvent)

Query

page
optional

Results per page you want to retrieve (0..20)

integer (int32)

0

Query

size
optional

Number of records per page.

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

CommonCommentThreadPage

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

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.2.3. Add a comment to the specified thread

POST /comment/v2/commentThreads/{threadId}/comments
Parameters
Type Name Description Schema

Path

threadId
required

Thread Id of the comment to add the new comments associated to it

integer (int64)

Body

commentEntry
required

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

CommonCommentRecord

Responses
HTTP Code Description Schema

201

Created

BaseResponse

400

Bad Request

HttpErrorResponse

401

Unauthorized

No Content

403

Forbidden

HttpErrorResponse

422

Unprocessable Entity

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

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

integer (int64)

Query

page
optional

Results per page you want to retrieve (0..500)

integer (int32)

0

Query

size
optional

Number of records per page.

integer (int32)

20

Responses
HTTP Code Description Schema

200

OK

CommonCommentPage

401

Unauthorized

No Content

403

Forbidden

No Content

404

Requested Resource Not Found

No Content

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

Comment Id of the comment to fetch

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

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Requested Resource Not Found

No Content

500

Internal Server Error

No Content

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.2.6. Update a comment

PUT /comment/v2/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

updatedComment
required

CommentRecord Object to update a comment

CommonCommentRecord

Responses
HTTP Code Description Schema

200

OK

CommentRecord

401

Unauthorized

No Content

403

Forbidden , The user is not allowed to update the comment

HttpErrorResponse

404

Not Found

No Content

422

Unprocessable Entity

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.2.7. Deletes a comment associated with threadId and commentId

DELETE /comment/v2/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

Comment type that the comment is mapped to. Ex: Skip, Overdue.

string

Query

entityId
required

entityId is from the type of commentType’s id .

integer (int64)

Query

entityType
required

entityType from comment lookup

string

Responses
HTTP Code Description Schema

200

OK

CommentRecord

204

No Content, The comment is deleted successfully

CommentRecord

401

Unauthorized

No Content

403

Forbidden , The user is not allowed to delete the comment

HttpErrorResponse

404

Not Found, No comment found

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

Name Description Schema

attachmentName
optional

document name

string

attachmentType
optional

attachment type

string

documentId
optional

documentId of the document

string

3.2. BaseResponse

Name Schema

data
optional

object

links
optional

< Link > array

message
optional

string

statusCode
optional

integer (int32)

3.3. Comment

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.4. CommentPage

Name Schema

content
optional

< Comment > array

links
optional

< Link > array

page
optional

PageMetadata

3.5. CommentPermissionResource

Name Schema

commentPermission
optional

boolean

links
optional

< Link > array

3.6. 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.7. 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.8. CommonCommentPage

Name Schema

content
optional

< CommonComment > array

links
optional

< Link > array

page
optional

PageMetadata

3.9. 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.10. CommonCommentThread

Name Description Schema

commentCount
optional

comment count of comment thread

integer (int64)

commentType
optional

Comment Type of this comment record

string

entityId
optional

Entity Id of this comment record

string

entityType
optional

Entity Type of this comment record

string

links
optional

< Link > array

threadId
optional

ThreadId of this comment record

integer (int64)

3.11. CommonCommentThreadPage

Name Schema

content
optional

< CommonCommentThread > array

links
optional

< Link > array

page
optional

PageMetadata

3.12. Error

Name Schema

code
optional

string

details
optional

object

3.13. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

3.14. IdNameValue

Name Description Schema

id
optional

The unique ID of the entity

integer (int64)

name
optional

The name of the entity

string

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.16. PageMetadata

Name Schema

number
optional

integer (int64)

size
optional

integer (int64)

totalElements
optional

integer (int64)

totalPages
optional

integer (int64)

3.17. PagedResources«Resource«CommentRecord»»

Name Schema

content
optional

< Resource«CommentRecord» > array

links
optional

< Link > array

page
optional

PageMetadata

3.18. Resource«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)

links
optional

< Link > array

threadId
optional

Comment thread this record is part of

integer (int64)

user
optional

The user performing on comment

IdNameValue

3.19. SecureCommentRecord

Name Description Schema

addlInfo
optional

Comment Type within the root. - EX: If the root is Activities, 'overdue' for Overdue comment, 'skip' for skip comment

string

addlInfo2
optional

Additional parameter EX: If the root is Activities, 'SheetId' to check permissions

string

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)

commentType
optional

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
optional

Id of the root to which the comment is associated to. Ex: ActivityId/TestId

integer (int64)

threadId
optional

Comment thread this record is part of

integer (int64)

unitId
optional

Unit Id to check permissions

integer (int64)

user
optional

The user performing on comment

IdNameValue

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.