Add comment
Path to servlet: api/comments
Method: POST
Request Content-Type: application/json
Query Content:
JSON object containing the definition of the comment. The definition should contain the following field:
- processId - process Id
- activityId - task Id
- comment - Content of the comment
Info
Each comment in the system has information about the user who wrote it, and the date it was added. When saving a comment using the above servlet, the user is retrieved from the session, and the date is set to the current date.
Answer:
- The response contains a comment definition object (with the userId, timestamp, and id fields completed).
Download comment by id
Path to servlet: api/comments/{commentId}
Method: GET
Parameters:
- commentId - Id of comment( parameter passed in servlet path)
Answer:
- The answer includes a comment definition object.
Downloading task comments
Path to servlet: api/comments/query
Method: GET
Parameters:
- activityId - activityId
Answer:
- The answer includes a comment definition object.
Delete comment
Path to servlet:: api/comments/{commentId}
Method: DELETE
Parameters:
- commentId - Id of comment( parameter passed in servlet path)
Answer:
- Empty answer