Comment
Comment Service
Web service endpoints for comments.
Examples:
POST to /comments
with the parent
field containing the URI of
a content object or another comment. Suppose you have a blog post with URI "http://example.jiveon.com/api/core/v3/contents/1234".
Then the following curl command will comment on this post.
curl -u joe.employee:password -H "Content-Type: application/json" --data '{ "type": "comment", "content":
{ "type": "text/html", "text":"<p>Your ideas for our budget are great!</p>"}, "subject": "Insightful blog post",
"parent": "http://example.jiveon.com/api/core/v3/contents/1234"}' http://example.jiveon.com/api/core/v3/comments
In order to like a comment, you must POST to /comments/{commentID}/likes
with an empty request body. Note that
a user cannot like her own comments, so you must like a comment with different credentials. Curl example:
curl -u another.user:password -X POST http://example.jiveon.com/api/core/v3/comments/1234/likes
Jump to
- Create Abuse Report
- Create Comment
- Create Comment Helpful
- Create Comment Like
- Create Comment Unhelpful
- Create Extended Properties
- Create Extended Properties For Addon
- Create Outcome
- Create Reply
- Destroy Comment
- Destroy Comment Helpful
- Destroy Comment Like
- Destroy Comment Unhelpful
- Destroy Extended Properties
- Destroy Extended Properties For Addon
- Get Abuse Reports
- Get Comment
- Get Comment Likes
- Get Comments
- Get Editable Comment
- Get Extended Properties
- Get Extended Properties For Addon
- Get Have Marked Helpful
- Get Have Marked Unhelpful
- Get Outcomes
- Get Outcome Types
- Lock Editable Comment
- Unlock Editable Comment
- Update Comment
- Update Editable Comment
Create Abuse Report
POST /comments/{commentID}/abuseReports
Register that the requesting person considers the specified comment as abusive. See AbuseReport for an example.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be marked as abusive |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access or mark this content as abusive |
404 (Not Found) | The specified content does not exist |
Create Comment
POST /comments
Create a new comment with the specified characteristics. The parent
field must
contain the URI of either a content object for which this is a direct reply, or the URI of a
previous comment to which this is a reply.
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
author | Boolean | false | Flag indicating if new comment is an author comment or a regular comment (only valid for documents). By default a regular comment will be created. |
published | String | false | Date and time when this content object was originally created. Set 'updated' param as well. Only set this field when importing content. Since 3.6. |
updated | String | false | Date and time when this content object was most recently updated. Set 'published' param as well. Only set this field when importing content. Since 3.6. |
fields | String | false | Fields to include in the returned Comment |
Takes:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a comment to a content object that does not support them, or for which comments have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object (or comment) cannot be found |
Create Comment Helpful
POST /comments/{commentID}/helpful
Register that the requesting person considers the specified comment helpful.
Note: If this is the first time the specified content has been marked helpful a helpful outcome will be created
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be marked as helpful |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access or mark this comment as helpful |
404 (Not Found) | The specified comment does not exist |
Create Comment Like
POST /comments/{commentID}/likes
Register that the requesting person likes the specified comment.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be liked |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access or like this comment |
404 (Not Found) | The specified comment does not exist |
Create Comment Unhelpful
POST /comments/{commentID}/unhelpful
Register that the requesting person considers the specified comment unhelpful.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be marked as unhelpful |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access this comment or mark this comment as unhelpful |
404 (Not Found) | The specified comment does not exist |
Create Extended Properties
POST /comments/{commentID}/extprops
Save a new set of extended properties for a comment, and return an entity representing the newly created extended properties. Any previous extended properties for this comment will be completely replaced.
This service only accepts oAuth authentication. Assuming that the oAuth token used to access this service was acquired through 2-legged oAuth, the properties being stored on the target comment will be also associated with the consumer of the oAuth token.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which the extended properties are to be created |
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is malformed or max number of extended properties has been reached |
403 (Forbidden) | You are not allowed to manage ext properties for this comment |
404 (Not Found) | The specified comment does not exist |
Create Extended Properties For Addon
POST /comments/{commentID}/extprops/addOn/{addonUUID}
Save a new set of extended properties for a comment, and return an entity representing the newly created extended properties. Any previous extended properties for this comment will be completely replaced.
This service only accepts oAuth authentication. Assuming that the oAuth token used to access this service was acquired through 2-legged oAuth, this service will validate that the consumer of the oAuth token can access the specified add-on.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which the extended properties are to be created |
addonUUID | String | true | UUID of the addon for which the properties are created. |
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is malformed or max number of extended properties has been reached |
403 (Forbidden) | You are not allowed to manage ext properties for this comment |
404 (Not Found) | The specified comment does not exist |
Since: 3.9
Create Outcome
POST /comments/{commentID}/outcomes
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to create the outcome |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned on the new outcome |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | An outcome of this type already exists on the comment |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Create Reply
POST /comments/{commentID}/comments
Create a new comment as a reply to an existing comment with the specified characteristics.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment being replied to |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
published | String | false | Date and time when this content object was originally created. Set 'updated' param as well. Only set this field when importing content. Since 3.6. |
updated | String | false | Date and time when this content object was most recently updated. Set 'published' param as well. Only set this field when importing content. Since 3.6. |
fields | String | false | Fields to include in the returned Comment |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
201 (Created) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempted to add a comment to a content object that does not support them, or for which comments have been closed |
403 (Forbidden) | You are not allowed to perform this operation |
404 (Not Found) | The specified parent content object (or comment) cannot be found |
Destroy Comment
DELETE /comments/{commentID}
Delete the specified comment and sub comments recursively.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be deleted. |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
recursiveDelete | Boolean | false | Flag indicating if the delete is recursive. The flag defaults to true if not provided. |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |
Destroy Comment Helpful
DELETE /comments/{commentID}/helpful
Delete the helpful mark of the specified comment by the requesting user.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which a like is being removed |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | Any input field is malformed |
409 (Conflict) | You do not currently have a helpful mark registered for this comment |
403 (Forbidden) | You are not allowed to access or remove the helpful mark for this comment |
404 (Not Found) | The specified comment does not exist |
Destroy Comment Like
DELETE /comments/{commentID}/likes
Delete the like of the specified content object by the requesting user.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which a like is being removed |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | Any input field is malformed |
409 (Conflict) | You do not currently have a like registered for this comment |
403 (Forbidden) | You are not allowed to access or unlike this comment |
404 (Not Found) | The specified comment does not exist |
Destroy Comment Unhelpful
DELETE /comments/{commentID}/unhelpful
Delete the registration of the specified comment as unhelpful by the requesting user.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which an unhelpful registration is being removed |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is malformed |
409 (Conflict) | You do not currently have an unhelpful mark registered for this comment |
403 (Forbidden) | You are not allowed to access this comment or remove the registration of this comment as unhelpful |
404 (Not Found) | The specified comment does not exist |
Destroy Extended Properties
DELETE /comments/{commentID}/extprops
Delete the existing extended properties for the specified comment.
This service only accepts oAuth authentication. Assuming that the oAuth token used to access this service was acquired through 2-legged oAuth, the properties being deleted on the target place will be those associated with the consumer of the oAuth token.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which the extended properties are to be deleted |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to delete extended properties |
404 (Not Found) | The specified comment does not exist |
Destroy Extended Properties For Addon
DELETE /comments/{commentID}/extprops/addOn/{addonUUID}
Delete the existing extended properties for the specified comment.
This service only accepts oAuth authentication. Assuming that the oAuth token used to access this service was acquired through 2-legged oAuth, this service will validate that the consumer of the oAuth token can access the specified add-on.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which the extended properties are to be deleted |
addonUUID | String | true | UUID of the addon for which the properties are deleted. |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to delete extended properties |
404 (Not Found) | The specified comment does not exist |
Since: 3.9
Get Abuse Reports
GET /comments/{commentID}/abuseReports
Retrieve the abuse reports for the specified comment
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment marked as abusive |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned in the abuse report response |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access or mark this content as abusive |
404 (Not Found) | The specified content does not exist |
Get Comment
GET /comments/{commentID}
Return the specified content object with the specified fields.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be returned |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned |
abridged | Boolean | false | Flag indicating that if content.text is requested, it will be abridged
(length shortened, HTML tags removed) |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |
Get Comment Likes
GET /comments/{commentID}/likes
Return a paginated list of the people who like the specified comment.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to return liking people |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first person to be returned |
count | Integer | false | Maximum number of people to be returned |
fields | String | false | Fields to be returned on liking people |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Get Comments
GET /comments/{commentID}/comments
Return a paginated list of comments to the specified content object, optionally limiting the returned results to direct replies only. The specified content object type must support comments, or be a comment itself (in which case replies to this comment only are returned).
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to return reply comments |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
excludeReplies | Boolean | false | Flag indicating whether to exclude replies (and therefore return direct replies only) |
startIndex | Integer | false | Zero-relative index of the first comment to be returned |
count | Integer | false | Maximum number of comments to be returned |
anchor | String | false | optional URI for a comment to anchor at. Specifying a anchor will try to return the page containing the anchor. If the anchor could not be found then the first page of comments will be returned. |
fields | String | false | Fields to be returned in the selected comments |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified comment or its replies |
404 (Not Found) | The specified comment does not exist |
Get Editable Comment
GET /comments/{commentID}/editable
Return the specified editable content object with the specified fields.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be returned |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | if content is already being edited by another user |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |
Get Extended Properties
GET /comments/{commentID}/extprops
Return the extended properties for the specified comment.
This service only accepts oAuth authentication. Assuming that the oAuth token used to access this service was acquired through 2-legged oAuth, the properties being fetched from the target place will be those associated with the consumer of the oAuth token.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to return extended properties |
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
404 (Not Found) | Specified comment does not exist |
Get Extended Properties For Addon
GET /comments/{commentID}/extprops/addOn/{addonUUID}
Return the extended properties for the specified comment.
This service only accepts oAuth authentication. Assuming that the oAuth token used to access this service was acquired through 2-legged oAuth, this service will validate that the consumer of the oAuth token can access the specified add-on.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to return extended properties |
addonUUID | String | true | UUID of the addon for which the properties are fetched. |
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
404 (Not Found) | Specified comment does not exist |
Since: 3.9
Get Have Marked Helpful
GET /comments/{commentID}/helpful
Return a paginated list of the people who consider this comment helpful.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment that has been marked helpful |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first person to be returned (default is 0) |
count | Integer | false | Maximum number of people to be returned (default is 25) |
fields | String | false | Fields to be returned on people who have marked this comment as helpful (default is @summary) |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Get Have Marked Unhelpful
GET /comments/{commentID}/unhelpful
Return a paginated list of the people who consider this comment unhelpful.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment that has been marked unhelpful |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first person to be returned (default is 0) |
count | Integer | false | Maximum number of people to be returned (default is 25) |
fields | String | false | Fields to be returned on people who have marked this comment as unhelpful (default is @summary) |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is malformed |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Get Outcomes
GET /comments/{commentID}/outcomes
Return a paginated list of the outcomes for the specified comment.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to return outcomes |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first outcome to be returned |
count | Integer | false | Maximum number of outcomes to be returned |
fields | String | false | Fields to be returned on outcomes |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Get Outcome Types
GET /comments/{commentID}/outcomeTypes
Return a paginated list of the possible outcome types for the specified comment.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment for which to return outcomes |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first outcome type to be returned |
count | Integer | false | Maximum number of outcome types to be returned |
fields | String | false | Fields to be returned on outcome types |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Lock Editable Comment
POST /comments/{commentID}/editable
Attempt to lock the specified comment for editing. This method will not fail if the comment is already locked. Check the 'editingBy' field in returned entity to see who owns the lock.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be locked |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned entity |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field was malformed |
409 (Conflict) | if content is already being edited by another user |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Unlock Editable Comment
DELETE /comments/{commentID}/editable
Attempt to unlock the specified comment for editing. This method will not fail if the comment is not locked or the lock is owned by another user. Check the 'editingBy' field in returned entity to see who owns the lock.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be unlocked |
Return Status:
HTTP Status Code | Description |
---|---|
204 (No Content) | Request was successful |
400 (Bad Request) | An input field was malformed |
403 (Forbidden) | You are not allowed to access this comment |
404 (Not Found) | The specified comment does not exist |
Update Comment
PUT /comments/{commentID}
Update the specified comment with the specified characteristics.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the comment to be updated |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned entity |
updated | String | false | Date and time when this content object was most recently updated. |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a comment to a content object that does not support them, or for which comments have been closed |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |
Update Editable Comment
PUT /comments/{commentID}/editable
Update the specified editable comment with the specified characteristics.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
commentID | String | true | ID of the editable comment to be updated |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to include in the returned entity |
updated | String | false | Date and time when this content object was most recently updated. |
Takes:
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input field is missing or malformed |
409 (Conflict) | You attempt to add a comment to a content object that does not support them, or for which comments have been closed |
403 (Forbidden) | You are not allowed to access the specified comment |
404 (Not Found) | The specified comment does not exist |