PostComment
Use this resource to add a comment to an activity or to respond to an existing comment.
Method summary
HTTP Method | Path | Description |
---|---|---|
POST | /scr/api/PostComment | Adds a comment to an activity or responds to an existing comment. |
POST /scr/api/PostComment
- Description
- Use this method to add a comment to an activity or to respond to an existing comment.
Use the
WorkComment
call to add comments to work instances.
- Resource information
-
Requirements Description Response format JSON Requires authentication Yes. The user must have at least participant access to the process that contains the activity to which a comment is added. Supports OAuth 2 client credentials Yes using a User Service ID containing Artifact Authoring Category Rate limited Not yet
- Parameters
-
Name Location Description Required Type X-On-Behalf-Of Header The user context. The value must be a username in the account. The user must have permission to perform the action in the account and in the specified parent space, if any. Required if Service ID OAuth credentials are used. Not required when using User Service ID OAuth credential. String activityId Query The ID of the activity to which a comment is attached. Yes String comment Query The text of the comment. Yes String parentCommentId Query The ID of the comment that the user replies to with a new comment. Yes, if the user is posting a comment. String processId Query The ID of the process that contains the activity to which a comment is attached. Yes String
- Response
-
- Example input
- Post a comment asdf to the activity with 800c4 ID that is
located in the process with the 80012 ID:
- Using User Service ID OAuth 2 client
credentials:
curl -i -H "Authorization: Bearer access_token" -H "Content-Type:application/json" -X POST "https://your_server_url/scr/api/PostComment?processId=80012&activityId=800c4&comment=asdf"
- Using Service ID OAuth 2 client
credentials:
curl -i -H "Authorization: Bearer access_token" -H "X-On-Behalf-Of:user_name@domain.com" -H "Content-Type:application/json" -X POST "https://your_server_url/scr/api/PostComment?processId=80012&activityId=800c4&comment=asdf"
- Using User Service ID OAuth 2 client
credentials:
- Example output
-
{ "commentId":"5f504e13c80d6" }
- Response properties
-
- commentId
- The ID of the newly created comment.
- Response messages
-
HTTP code Reason 200 The request was completed successfully.
401 The user isn't authorized to make the request.
405 The specified method is not allowed. Select POST method for this request.