Newer Version Available
Comments Resources
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/capabilities/status | Access the status capability of a comment or set the status of 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/commentId1/connect/communities/communityId/chatter/comments/commentId - Available since version
- 23.0
- Requires Chatter
- Yes
- HTTP methods
- GET, DELETE, PATCH
- Request body for PATCH
- Root XML tag
- <comment>
- Properties
-
Name Type Description Available Version attachment Depends on type. Optional. Values are: 24.0–31.0 body Message Body Input The body of the comment. Feed item and comment bodies have a 10,000 character limit. Because this limit can change, we recommend that clients make a describeSObjects() call on the FeedItem or FeedComment object. To determine the maximum number of allowed characters, look at the length of the Body or CommentBody field.
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.
Rich text and inline images are supported in comment bodies in version 35.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-me1/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/likes1/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
-
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