Newer Version Available

This content describes an older version of this product. View Latest

Comments Resources

Get information about, edit, like, or delete a comment. Determine whether the context user can edit a comment.

Available resources:

Resource Description
/chatter/comments/commentId Get information about, edit, or delete a comment.
/chatter/comments/commentId/capabilities​/edit/is-editable-by-me Determines whether the context user can edit a comment.
/chatter/comments/commentId/likes Get information about the likes for a comment. Also used to like a comment.

Comment

Get information about, edit, or delete a comment.

Resource
1/chatter/comments/commentId
1/connect/communities/communityId/chatter/comments/commentId
Available since version
23.0
Requires Chatter
Yes
HTTP methods
GET, DELETE, PATCH

PATCH is supported in version 34.0 and later.

Request body for PATCH
Root XML tag
<comment>
Properties
Name Type Description Available Version
attachment Depends on type. Optional. Values are:

As of version 32.0, use the capabilities property.

Important

24.0-31.0
body Message Body Input The body of the comment.

To edit this property in a comment, make a PATCH request to /chatter/comments/commentId. Editing comments is supported in version 34.0 and later.

23.0
capabilities Comment Capabilities Input Capabilities of the comment, such as a file attachment 32.0
Response body for GET and PATCH
Comment
Example

You can find the ID for a specific comment from any feed, such as a news feed or a record feed.

Use the following resource and the HTTP method GET to return information about a comment:
1/chatter/comments/0D7D00000000NtkKAE

Comment Capability, Editability

Determines whether the context user can edit a comment.

Resource
1/chatter/comments/commentId/capabilities/edit/is-editable-by-me
1/connect/communities/communityId/chatter/comments/commentId/capabilities/edit/is-editable-by-me
Available since version
34.0
Requires Chatter
Yes
HTTP methods
GET
Response body for GET
Feed Entity Is Editable

Comment Likes

Get information about the likes for a comment. Also used to like a comment.

Resource
1/chatter/comments/commentId/likes
1/connect/communities/communityId/chatter/comments/commentId/likes
Available since version
23.0
Requires Chatter
Yes
HTTP methods
GET, POST or HEAD
Request parameters for GET or HEAD

POST takes no request parameters, nor a request body.

Note

Parameter Name Type Description
page Integer Specifies the number of the page you want returned.
pageSize Integer Specifies the number of items per page. Valid values are from 1 through 100. If you don't specify a size, the default is 25.
Response body for GET
Like Page
Response body for POST
Like