Todos
Task item records with completion status. All mutations persist in your isolated session overlay.
List All Todos
Retrieve a paginated list of task todos with user filtering, completion status, and sorting.
Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/todos
Parameters
| Parameter | Type | Description |
|---|---|---|
| user_id | integer | Filter by owner user ID. |
| completed | boolean | Filter by completion state (true/false). |
| page | integer | Page number. |
| limit | integer | Items per page (max 200). |
| q | string | Full-text search query term across title. |
| _sort | string | Field name to sort by (title, id, completed). |
| _order | string | Sort direction: asc or desc. |
1
{
2
"data": [
3
{
4
"id": 1,
5
"user_id": 1,
6
"title": "delectus aut autem",
7
"completed": false
8
}
9
],
10
"pagination": {
11
"page": 1,
12
"limit": 10,
13
"total": 125,
14
"totalPages": 13,
15
"hasNextPage": true,
16
"hasPrevPage": false
17
}
18
}
Get Single Todo
Retrieve a single todo item by integer ID or local sandbox string ID.
Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/todos/:id
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | integer | Todo ID (global integer or local-<uuid>). |
1
{
2
"id": 1,
3
"user_id": 1,
4
"title": "delectus aut autem",
5
"completed": false
6
}
Create Todo Task
Create a new todo item in your session sandbox overlay.
Request Endpoint
POSThttps://playground.nileslabs.com/api/v1/todos
Request Body Example
1
{
2
"user_id": 1,
3
"title": "Build Next.js Frontend App",
4
"completed": false
5
}
1
{
2
"id": "local-7a6b5c4d-3e2f",
3
"user_id": 1,
4
"title": "Build Next.js Frontend App",
5
"completed": false,
6
"_sandbox": "created"
7
}
Replace Todo (PUT)
Replace an existing todo task record in your session overlay.
Request Endpoint
PUThttps://playground.nileslabs.com/api/v1/todos/:id
Request Body Example
1
{
2
"user_id": 1,
3
"title": "Build Next.js Frontend App (Completed)",
4
"completed": true
5
}
1
{
2
"id": 1,
3
"user_id": 1,
4
"title": "Build Next.js Frontend App (Completed)",
5
"completed": true,
6
"_sandbox": "updated"
7
}
Partial Todo Update (PATCH)
Toggle completion status or edit the title of an existing todo.
Request Endpoint
PATCHhttps://playground.nileslabs.com/api/v1/todos/:id
Request Body Example
1
{
2
"completed": true
3
}
1
{
2
"id": 1,
3
"user_id": 1,
4
"title": "delectus aut autem",
5
"completed": true,
6
"_sandbox": "updated"
7
}
Delete Todo Task
Remove a todo item from your session overlay view.
Request Endpoint
DELETEhttps://playground.nileslabs.com/api/v1/todos/:id
1
204 No Content