Provides a way to manage content comments. Use this service add, delete, and update comments on
content in the application. This service does not provide the ability to configure settings for comments.
Adds a new comment to the specified content object.
POST http://domain:port/application_context/rpc/rest/commentService/comments
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object to add the comment to. |
| objectID |
xs:long |
ID of the object to add the comment to. |
| userID |
xs:long |
ID of the user adding the comment. |
| body |
xs:string |
The comment's body (such as its text). |
Arguments Template
<addComment>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<userID>xs:long</userID>
<body>xs:string</body>
</addComment>Response
| Type |
Description |
| Comment |
The newly created comment. |
Response Template
<addCommentResponse>
<return>
<!-- Contents of Comment -->
<return>
</addCommentResponse>Errors
| Error |
When Returned |
| com.jivesoftware.community.RejectedException |
If the message is rejected for some unknown reason. |
| NotFound |
If the specified user does not exist. |
| Unauthorized |
If the specified user does not have CREATE_COMMENT permissions. |
Adds a new comment to the specified parent comment.
POST http://domain:port/application_context/rpc/rest/commentService/comments/addChild
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The parent object's object type. |
| objectID |
xs:long |
ID of the parent object. |
| commentID |
xs:long |
ID of the parent comment. |
| userID |
xs:long |
Body of the comment to add. |
| body |
xs:string |
ID of user adding the comment. |
Arguments Template
<addCommentToComment>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<commentID>xs:long</commentID>
<userID>xs:long</userID>
<body>xs:string</body>
</addCommentToComment>Response
| Type |
Description |
| Comment |
The newly created comment. |
Response Template
<addCommentToCommentResponse>
<return>
<!-- Contents of Comment -->
<return>
</addCommentToCommentResponse>Errors
| Error |
When Returned |
| NotFound |
If the parent object and user do not exist. |
| com.jivesoftware.community.RejectedException |
If one of the installed interceptors prevents the comment
from being posted.
|
| Unauthorized |
If user does not have CREATE_COMMENT permissions. |
Deletes all comments on the object.
DELETE http://domain:port/application_context/rpc/rest/commentService/comments/{objectType}/{objectID}
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object the comment is on. |
| objectID |
xs:long |
ID of the object the comment is on. |
Arguments Template
<deleteAllComments>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
</deleteAllComments>Errors
| Error |
When Returned |
| NotFound |
If the parent object does not exist. |
| Unauthorized |
If the caller does not have administrator permissions. |
Deletes a comment in the object. Deleting a comment also deletes all of its child comments. The search index
and other resources that referenced the comment and its children will be updated appropriately.
DELETE http://domain:port/application_context/rpc/rest/commentService/comments/{objectType}/{objectID}/{commentID}
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object the comment is on. |
| objectID |
xs:long |
ID of the object the comment is on. |
| commentID |
xs:long |
ID of the comment to delete. |
Arguments Template
<deleteComment>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<commentID>xs:long</commentID>
</deleteComment>Errors
| Error |
When Returned |
| NotFound |
If the commented object does not exist or the comment
does not exist.
|
| Unauthorized |
If the caller does not have administrator permissions. |
Deletes a comment in the object. The search index and other resources that referenced the comment will also be
updated appropriately.
DELETE http://domain:port/application_context/rpc/rest/commentService/comments/recursiveDelete/{objectType}/{objectID}/{commentID}/{recursive}
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object the comment is on. |
| objectID |
xs:long |
ID of the object the comment is on. |
| commentID |
xs:long |
ID of the comment to delete. |
| recursive |
xs:boolean |
true to delete all the child comments; false to leave the children. |
Arguments Template
<deleteCommentRecursive>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<commentID>xs:long</commentID>
<recursive>xs:boolean</recursive>
</deleteCommentRecursive>Errors
| Error |
When Returned |
| NotFound |
If the parent object or the community does not
exist.
|
| Unauthorized |
If the caller does not have administrator permissions. |
Returns the specified comment.
GET http://domain:port/application_context/rpc/rest/commentService/comments/{objectType}/{objectID}/{commentID}
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object the comment is on. |
| objectID |
xs:long |
ID of the object the comment is on. |
| commentID |
xs:long |
ID of the comment. |
Arguments Template
<getComment>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<commentID>xs:long</commentID>
</getComment>Response
| Type |
Description |
| Comment |
The comment matching the ID. |
Response Template
<getCommentResponse>
<return>
<!-- Contents of Comment -->
<return>
</getCommentResponse>Errors
| Error |
When Returned |
| NotFound |
If the comment or parent object doesn't exist. |
| Unauthorized |
If the user doesn't have permissions to view the comment. |
Returns the number of comments on the content specified by objectType and objectID.
GET http://domain:port/application_context/rpc/rest/commentService/commentcount/{objectType}/{objectID}
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object to acquire comment count for. |
| objectID |
xs:long |
ID of the object. |
Arguments Template
<getCommentCount>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
</getCommentCount>Response
| Type |
Description |
| xs:int |
the number of comments in the object. |
Response Template
<getCommentCountResponse>
<return>xs:int</return>
</getCommentCountResponse>Returns the number of comments on the content specified by objectType and objectID, where the number is
constrained by the filter. This is useful for determining such things as the number of comments in a date
range.
POST http://domain:port/application_context/rpc/rest/commentService/comments/count
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of object to count comments on. |
| objectID |
xs:long |
ID of the object. |
| filter |
Contents of CommentResultFilter
|
A filter to constrain the number. |
Arguments Template
<getCommentCountWithFilter>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<filter>
<!-- Contents of CommentResultFilter -->
<filter>
</getCommentCountWithFilter>Response
| Type |
Description |
| xs:int |
The number of comments in the object based on the filter. |
Response Template
<getCommentCountWithFilterResponse>
<return>xs:int</return>
</getCommentCountWithFilterResponse>Returns a list of the comments on the content specified by objectType and objectID.
GET http://domain:port/application_context/rpc/rest/commentService/comments/{objectType}/{objectID}
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The type of content object to get comments for. |
| objectID |
xs:long |
ID of the object to get comments for. |
Arguments Template
<getComments>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
</getComments>Response
| Type |
Description |
| List of
Comment |
A list of the comments for the object. |
Response Template
<getCommentsResponse>
<!-- List of ... -->
<return>
<!-- Contents of Comment -->
<return>
</getCommentsResponse>Returns a count of all the comments in all content that has been authored by the specified user.
GET http://domain:port/application_context/rpc/rest/commentService/usercommentcount/{userID}
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose content will be searched for comments. |
Arguments Template
<getUserContentCommentCount>
<userID>xs:long</userID>
</getUserContentCommentCount>Response
| Type |
Description |
| xs:int |
A count of the comments found. |
Response Template
<getUserContentCommentCountResponse>
<return>xs:int</return>
</getUserContentCommentCountResponse>Errors
| Error |
When Returned |
| UserNotFound |
If the specified user does not exist. |
Returns a count of all the comments in all content which has been authored by the supplied user,
with the count constrained by the specified filter.
POST http://domain:port/application_context/rpc/rest/commentService/comments/user/count
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose content will be searched for comments. |
| filter |
Contents of UserContentCommentResultFilter
|
A filter to constrain the results. |
Arguments Template
<getUserContentCommentCountWithFilter>
<userID>xs:long</userID>
<filter>
<!-- Contents of UserContentCommentResultFilter -->
<filter>
</getUserContentCommentCountWithFilter>Response
| Type |
Description |
| xs:int |
The number of comments found. |
Response Template
<getUserContentCommentCountWithFilterResponse>
<return>xs:int</return>
</getUserContentCommentCountWithFilterResponse>Errors
| Error |
When Returned |
| UserNotFound |
If the specified user does not exist. |
Returns a list of all the comments in all content which has been authored by the supplied user.
GET http://domain:port/application_context/rpc/rest/commentService/usercomments/{userID}
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose content will be searched for comments. |
Arguments Template
<getUserContentComments>
<userID>xs:long</userID>
</getUserContentComments>Response
| Type |
Description |
| List of
Comment |
A list of the comments found. |
Response Template
<getUserContentCommentsResponse>
<!-- List of ... -->
<return>
<!-- Contents of Comment -->
<return>
</getUserContentCommentsResponse>Errors
| Error |
When Returned |
| UserNotFound |
If the specified user does not exist. |
Returns a list of all the comments in all content which has been authored by the supplied user.
POST http://domain:port/application_context/rpc/rest/commentService/comments/user
Arguments
| Name |
Type |
Description |
| userID |
xs:long |
ID of the user whose content will be searched for comments. |
| filter |
Contents of UserContentCommentResultFilter
|
A filter to constrain the results |
Arguments Template
<getUserContentCommentsWithFilter>
<userID>xs:long</userID>
<filter>
<!-- Contents of UserContentCommentResultFilter -->
<filter>
</getUserContentCommentsWithFilter>Response
| Type |
Description |
| List of
Comment |
A list of the comments on the object as constrained by the filter. |
Response Template
<getUserContentCommentsWithFilterResponse>
<!-- List of ... -->
<return>
<!-- Contents of Comment -->
<return>
</getUserContentCommentsWithFilterResponse>Errors
| Error |
When Returned |
| UserNotFound |
If the specified user does not exist. |
Updates an existing comment.
PUT http://domain:port/application_context/rpc/rest/commentService/comments
Arguments
| Name |
Type |
Description |
| objectType |
xs:int |
The object type of the object the existing comment is on. |
| objectID |
xs:long |
The object ID of the object the existing comment is on. |
| comment |
Contents of Comment
|
The comment to update. |
Arguments Template
<updateComment>
<objectType>xs:int</objectType>
<objectID>xs:long</objectID>
<comment>
<!-- Contents of Comment -->
<comment>
</updateComment>Errors
| Error |
When Returned |
| NotFound |
If the parent object does not exist. |
| com.jivesoftware.community.RejectedException |
If the comment update was rejected. |
| Unauthorized |
If the caller does not have permission to update this comment. |