getComments
- Home
- Commenting
- UgcDiscussion
- getComments
getComments
Retrieves comments from a discussion.
Parameters
Name | Description |
nodeID required | Node of content we are working with. |
discussionID optional | Id of discussion (topic_id) to work with. |
ecPartnerID optional | ID of partner for ext_content. |
ecXrefID optional | ID of content for ext_content. |
ecType optional | Type of content for ext_content. |
userID optional | User we are working with. |
page optional | Page #. |
num optional | Number of items to show. |
sortKey optional | Key to sort results on. |
sortOrder optional | Direction to sort results (ASC or DESC). |
greaterThanPost optional | ID of comment used to determine the minimum comment ID to return. |
status optional | Status of comment/discussion. |
threaded optional | Whether or not to return comments for a threaded view. |
viewOptions optional | List of items to output (comma-separated). |
output optional | The response output format. Accepts JSON and XML. |
xrefID optional | The cross reference id that the discussion is attached to. (ie: video_id, photo_id, statusId, etc.) Do not use along with ecXrefID / ecXrefType / ecPartnerID. |
type optional | The cross reference content type that the discussion is attached to. (ie: blog_post, photo, video, photo_gallery, user_profile, group, forum_post, forum_thread, forum, message, site, audio, audio_gallery, podcast, petition, document, article, article_version, calendar_event, calendar, wiki_page, ugc_status, ext_content, discussion_post) Do not use along with ecXrefID / ecXrefType / ecPartnerID. |
Request Syntax
https://services.onesite.com/rest/ugcDiscussion?action=getComments&nodeID=188234&page=1&num=1&ecPartnerID=335&ecXrefID=12345678&ecType=web&devkey=[devkey] |
JSON Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
{ "service":"ugcDiscussion", "action":"getComments", "code":1, "message":"Comments retrieved", "item":[ { "commentID":157882243, "discussionID":3978127, "nodeID":188234, "title":"TEST", "content":"TEST", "parentID":0, "numChildren":0, "anonymous":0, "edited":null, "editedBy":null, "censored":null, "censoredBy":null, "userIP":"127.0.0.1", "createdBy":229928503, "dateCreated":"2019-02-07 14:03:51", "dateCreated_ts":1549569831, "status":"active", "permissions":1073718561, "isPublic":1, "numViews":0, "rating":"0" } ], "total":10, "page":1, "per_page":1 } |
Service Information
Service | ugcDiscussion |
Method | getComments |
Type | REST |
Response Types | JSON, XML |