Retrieves all comments on a post (if comments are allowed).
GET
/posts/{postId}/comments
curl \
--request GET 'https://api.huy-devops.site/api/posts/{postId}/comments' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"success": true,
"code": 200,
"message": "string",
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440009",
"postId": "550e8400-e29b-41d4-a716-446655440008",
"userId": "550e8400-e29b-41d4-a716-446655440002",
"content": "Thanks for the update!",
"createdAt": "2024-09-20T11:00:00Z",
"updatedAt": "2024-09-20T11:30:00Z",
"deletedAt": "2026-05-04T09:42:00Z"
}
],
"pagination": {
"currentPage": 1,
"pageSize": 10,
"totalItems": 100,
"totalPages": 10
}
}
Response examples (401)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (404)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}
Response examples (500)
{
"success": false,
"code": 42,
"errorCode": "string",
"message": "string",
"timestamp": "2026-05-04T09:42:00Z"
}