Add a Task Comment
post
/ic/api/process/v1/tasks/{id}/comments
Adds a comment to a task.
Request
Supported Media Types
- application/json
Path Parameters
-
id(required): string
Task Number
CommentRequest
Root Schema : commentRequest
Type:
object
The representation of a CommentRequest
Show Source
-
commentScope:
string
Allowed Values:
[ "BPM", "TASK" ]
comment scope - When you post a comment through REST API, you need to give SCOPE as either BPM or TASK in order for it to be visible at process instance level or only task level.Example:BPM
-
commentStr(required):
string
comment stringExample:
comment test
-
displayNameLanguage:
string
displayName languageExample:
US
-
participant:
string
Response
Supported Media Types
- application/json
200 Response
Comment successfully added
400 Response
Bad request
404 Response
Task not found
409 Response
Stale task object found
500 Response
Internal Server Error
Examples
The following example shows how to add a comment to a task by submitting a POST request on the REST resource.
Send Request
The following example shows the contents of the send request:
https://example.com/ic/api/process/v1/tasks/<taskId>/comments
Where,
-
example.com
is the host where Oracle Integration is running. -
<taskId> is the task ID that you get using Retrieve a Task List.
Example of Request Body
{ "commentStr":"This is my comment.", "commentScope":"BPM" }
The allowed values for commentScope
attribute are:
-
BPM
: UseBPM
option for the comment to be available on all tasks of a particular process instance. -
TASK
: UseTASK
option for a task level comment.
Example of Response Header
Status Code: 200 OK Date: Wed, 27 Apr 2016 00:53:16 GMT Content-Type: application/json
Example of Response Body
{ "levels": 0, "links": [ { "href": "http://example.com/ic/api/process/v1/tasks/200002", "length": 0, "rel": "parent" }, { "href": "http://example.com/ic/api/process/v1/tasks/200002/comments", "length": 0, "rel": "self" }, { "href": "http://example.com/ic/api/process/v1/tasks/200002/comments", "length": 0, "rel": "canonical" } ], "comment": [ { "commentStr": "This is my comment", "updatedBy": "jsmith", "userId": "jsmith", "updateddDate": "2016-12-19T06:10:21.000Z", "commentScope": "BPM" } ] }