Comments

Feedback comments linked relationally to blog posts. All mutations persist in your isolated session overlay.

List All Comments

Retrieve a paginated list of comments across posts with full-text search and sorting.

Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/comments
Parameters
ParameterTypeDescription
post_idintegerFilter comments linked to post ID.
pageintegerPage number.
limitintegerItems per page (max 200).
qstringSearch term across name, email, body.
_sortstringField name to sort by (name, email, id).
_orderstringSort direction: asc or desc.
1
{
2
"data": [
3
{
4
"id": 1,
5
"post_id": 1,
6
"name": "id labore ex et quam laborum",
7
"email": "Eliseo@gardner.biz",
8
"body": "laudantium enim quasi est quidem magnam voluptate ipsam eos"
9
}
10
],
11
"pagination": {
12
"page": 1,
13
"limit": 10,
14
"total": 300,
15
"totalPages": 30,
16
"hasNextPage": true,
17
"hasPrevPage": false
18
}
19
}

Get Single Comment

Retrieve a single comment by global integer ID or session sandbox local-<uuid> ID.

Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/comments/:id
Parameters
ParameterTypeDescription
idstring | integerComment ID (global integer or local-<uuid>).
1
{
2
"id": 1,
3
"post_id": 1,
4
"name": "id labore ex et quam laborum",
5
"email": "Eliseo@gardner.biz",
6
"body": "laudantium enim quasi est quidem magnam voluptatem aut eveniet quas aliquid sint expedita consequuntur alias ea quam expedita possimus"
7
}

Create Comment

Add a new comment overlay linked to a post in your session view.

Request Endpoint
POSThttps://playground.nileslabs.com/api/v1/comments
Request Body Example
1
{
2
"post_id": 1,
3
"name": "Awesome API Prototyping Tool",
4
"email": "developer@playground.dev",
5
"body": "Saved time building my Next.js client app!"
6
}
1
{
2
"id": "local-9b1deb4d-3b7d-4bad",
3
"post_id": 1,
4
"name": "Awesome API Prototyping Tool",
5
"email": "developer@playground.dev",
6
"body": "Saved time building my Next.js client app!",
7
"_sandbox": "created"
8
}

Replace Comment (PUT)

Replace an existing comment record in your session overlay.

Request Endpoint
PUThttps://playground.nileslabs.com/api/v1/comments/:id
Request Body Example
1
{
2
"post_id": 1,
3
"name": "Updated Reviewer Name",
4
"email": "reviewer.updated@example.com",
5
"body": "Updated detailed comment feedback."
6
}
1
{
2
"id": 1,
3
"post_id": 1,
4
"name": "Updated Reviewer Name",
5
"email": "reviewer.updated@example.com",
6
"body": "Updated detailed comment feedback.",
7
"_sandbox": "updated"
8
}

Partial Comment Update (PATCH)

Partially update selected fields (such as body text or reviewer name) of a comment.

Request Endpoint
PATCHhttps://playground.nileslabs.com/api/v1/comments/:id
Request Body Example
1
{
2
"body": "Patched feedback comment body."
3
}
1
{
2
"id": 1,
3
"post_id": 1,
4
"name": "id labore ex et quam laborum",
5
"email": "Eliseo@gardner.biz",
6
"body": "Patched feedback comment body.",
7
"_sandbox": "updated"
8
}

Delete Comment

Remove a comment from your session overlay view.

Request Endpoint
DELETEhttps://playground.nileslabs.com/api/v1/comments/:id
1
204 No Content
Playground API — Free Stateful Mock REST & GraphQL Service