Skip to content

GET/posts/{id}/comments

List post's comments

Retrieve post's comments. Same filtering, sorting, and pagination as `/comments`.

Parameters 13

NameTypeDescription
_pagequery · integerPage number (1-based)
_limitquery · integerItems per page
_startquery · integerSlice start index (alternative to page-based)

ReturnsComment

Bearer token required

Response examples

200Array of comments

application/json example derived from schema

[
  {
    "id": 1,
    "postId": 1,
    "userId": 1,
    "body": "How does this compare to the approach described in the official docs?",
    "likes": 16,
    "createdAt": "2023-04-28T06:59:47.906Z"
  }
]
404404 — resource not found

application/json

{
  "error": {
    "status": 404,
    "message": "users #999 not found"
  }
}

Released under the MIT License.