GET/api/v1/posts/comment| Name | Type | Required | Description |
|---|---|---|---|
| postId | String | ✅ Yes | ID of the post to fetch comments for. |
| start | Number | ✅ Yes | Starting index for pagination. |
| count | Number | ✅ Yes | Number of comments to fetch. |
| Name | Type | Required | Description |
|---|---|---|---|
| x-api-key | String | ✅ Yes | Confidential key provided by Networked. Required for all API calls. |
{
"data": {
"count": 2,
"start": 0,
"contents": {
"postId": "6855529c78bddf001282dd01",
"comments": [
{
"user": {
"id": "6787893423126f0012a92ed6",
"name": "Spencer Johnson Spencer",
"image": "https://ntwc-us-east-2-qa-eks-s3-files-storage.s3.us-east-2.amazonaws.com/user-6787893423126f0012a92ed6/file_1741258763688_image (25).png",
"title": " Software Development Test Engineer WBC Community Test Engineer"
},
"commentId": "6858c0a078bddf001282e06d",
"comment": "<p class='preserveHtml' class='preserveHtml'>test comment 2</p>",
"parentCommentId": null,
"childCommentscount": 0,
"likesCount": 0,
"selfLike": false,
"shareCount": 0
},
{
"user": {
"id": "6787893423126f0012a92ed6",
"name": "Spencer Johnson Spencer",
"image": "https://ntwc-us-east-2-qa-eks-s3-files-storage.s3.us-east-2.amazonaws.com/user-6787893423126f0012a92ed6/file_1741258763688_image (25).png",
"title": " Software Development Test Engineer WBC Community Test Engineer"
},
"commentId": "6858c08378bddf001282e03f",
"comment": "<p class='preserveHtml' class='preserveHtml'>test comment</p>",
"parentCommentId": null,
"childCommentscount": 0,
"likesCount": 0,
"selfLike": false,
"shareCount": 0
}
]
},
"nextStart": false
},
"error": false,
"message": "Success"
}
| Field | Type | Description |
|---|---|---|
| count | Number | Total number of comments fetched in this call. |
| start | Number | Index from which comments are returned. |
| nextStart | Boolean | Indicates whether more comments are available to fetch. |
| contents | Object | Contains the postId and comments array. |
| contents.postId | String | ID of the post. |
| contents.comments | Array | List of comment objects. |
| error | Boolean | Indicates if the request failed. |
| message | String | Server response message. |
Comment Object| Field | Type | Description |
|---|---|---|
| user | Object | Details of the user who made the comment. |
| commentId | String | Unique identifier of the comment. |
| comment | String | HTML-formatted content of the comment. |
| parentCommentId | String | if current comment is a reply to a comment then parentCommentId relates to its parent comment. |
| childCommentscount | Number | Number of replies (child comments) under this comment. |
| likesCount | Number | Number of likes the comment has received. |
| selfLike | Boolean | true if the comment is liked by the current (logged-in) user. |
| shareCount | Number | Number of times the comment has been shared. |
user Object (Nested)| Field | Type | Description |
|---|---|---|
| id | String | Unique ID of the user. |
| name | String | Full name of the user. |
| image | String | URL to the user's profile picture. |
| title | String | Professional title or designation of user. |
selfLike indicates whether the logged-in user has liked a specific comment.parentCommentId and implement a thread-based reply structure.start and count to avoid performance bottlenecks.curl --location 'https://backend.networked.co/api/v1/posts/comment?postId=6855529c78bddf001282dd01&start=0&count=10' \
--header 'x-api-key: <your-api-key>'{
"data": {
"count": 2,
"start": 0,
"contents": {
"postId": "6855529c78bddf001282dd01",
"comments": [
{
"user": {
"id": "6787893423126f0012a92ed6",
"name": "Spencer Johnson Spencer",
"image": "https://ntwc-us-east-2-qa-eks-s3-files-storage.s3.us-east-2.amazonaws.com/user-6787893423126f0012a92ed6/file_1741258763688_image%20%2825%29.png",
"title": " Software Development Test Engineer WBC Community Test Engineer"
},
"commentId": "6858c0a078bddf001282e06d",
"comment": "<p>test comment 2</p>",
"parentCommentId": null,
"childCommentscount": 0,
"likesCount": 0,
"selfLike": false,
"shareCount": 0
},
{
"user": {
"id": "6787893423126f0012a92ed6",
"name": "Spencer Johnson Spencer",
"image": "https://ntwc-us-east-2-qa-eks-s3-files-storage.s3.us-east-2.amazonaws.com/user-6787893423126f0012a92ed6/file_1741258763688_image%20%2825%29.png",
"title": " Software Development Test Engineer WBC Community Test Engineer"
},
"commentId": "6858c08378bddf001282e03f",
"comment": "<p>test comment</p>",
"parentCommentId": null,
"childCommentscount": 0,
"likesCount": 0,
"selfLike": false,
"shareCount": 0
}
]
},
"nextStart": false
},
"error": false,
"message": "Operation completed successfully"
}