GET content/{contentId}/comments

Related

Retrieve a paged list of comments for the indicated content item. The results are paged (so as to be able to handle large volumes of comments) and are sorted chronologically (oldest to newest).

Example

GET /api/v1/content/39b7a825-a8b6-4cf9-9233-d9ae698830ce/comments HTTP/1.1
Accept: application/json
----------------------------------------
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 1032
ETag: W/"a20-5lUqb9H7NGBW3ZZyLt3cUMh48Fw"

{
  "items": [{
    "id": 13,
    "parentId": null,
    "authorId": "66a5db1f-2785-498d-9068-e24ddbba03f2",
    "body": "Test post please ignore.",
    "created": 1539715796,
    "updated": 1539715796,
    "deleted": false
  }, {
    "id": 15,
    "parentId": 13,
    "authorId": "66a5db1f-2785-498d-9068-e24ddbba03f2",
    "body": "Reply!",
    "created": 1539715820,
    "updated": 1539715820,
    "deleted": false
  }, {
    "id": 24,
    "parentId": 13,
    "authorId": "66a5db1f-2785-498d-9068-e24ddbba03f2",
    "body": "Another reply.",
    "created": 1539715843,
    "updated": 1539715843,
    "deleted": false
  }, {
    "id": 14,
    "parentId": null,
    "authorId": "66a5db1f-2785-498d-9068-e24ddbba03f2",
    "body": "Best post don't ignore.",
    "created": 1539715805,
    "updated": 1539715805,
    "deleted": false
  }, {
    "id": 16,
    "parentId": 14,
    "authorId": "66a5db1f-2785-498d-9068-e24ddbba03f2",
    "body": "SPAM IN THE PLACE WHERE YOU LIVE",
    "created": 1539715834,
    "updated": 1539715834,
    "deleted": false
  }, {
    "id": 31,
    "parentId": 14,
    "authorId": "66a5db1f-2785-498d-9068-e24ddbba03f2",
    "body": "SPAM IN THE PLACE WHERE YOU LIVE",
    "created": 1539715934,
    "updated": 1539715934,
    "deleted": false
  }],
  "page": 0,
  "pageSize": 100,
  "total": 6
}

Security

Authentication is not generally required, but special rules apply as noted in GET content/{contentId}.

URL Parameters

NameDescriptionValue
contentIdthe ID of the content as a GUID with dashesstring

Query Parameters

NameDescriptionValue
sizethe size of the page to return; default 100 optionalnumber
pagethe 0-based index of the page to return; default 0 optionalnumber

Request Body

NONE

Response

Successful responses are code 200 with data in the response body. Error responses are standard.

Response Body

NameDescriptionValue
pagethe 0-based index of the page of these resultsnumber
countthe number of items on this pagenumber
totalthe number of items across all pagesnumber
itemsthe array of comments on this pagearray of object; see Comment

Comment

NameDescriptionValue
idthe ID of the comment; simple integernumber
parentIdthe ID of the parent this comment is nested under, or null for root-level commentsnumber
authorIdthe ID of the comment's author, as a GUID with dashesstring
bodythe textual content of this commentstring
createdthe date this comment was created, as a Unix timestampnumber
updatedthe date this comment was last updated, as a Unix timestamp; will be equal to created if the comment has not been altered since creationnumber
deletedtrue if this comment has been deleted, false otherwiseboolean