Custom Collections

Dynamic custom resource collections (e.g. /custom/products, /custom/orders) created on the fly. All mutations persist in your isolated session overlay.

List Active Custom Collections

Returns a summary of all active dynamic custom resource collections in your session sandbox with record counts.

Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/custom
1
{
2
"totalCollections": 2,
3
"collections": [
4
{
5
"name": "products",
6
"endpoint": "/custom/products",
7
"count": 3,
8
"lastUpdated": "2026-08-07T00:00:00.000Z"
9
},
10
{
11
"name": "orders",
12
"endpoint": "/custom/orders",
13
"count": 2,
14
"lastUpdated": "2026-08-07T00:00:00.000Z"
15
}
16
]
17
}

Seed Domain Mock Data Template

Instantly populates pre-built domain collections into your session sandbox with one request (templates: ecommerce, saas, blog, crm).

Request Endpoint
POSThttps://playground.nileslabs.com/api/v1/custom/seed
Parameters
ParameterTypeDescription
templatestringDomain template name ("ecommerce", "saas", "blog", "crm").
Request Body Example
1
{
2
"template": "ecommerce"
3
}
1
{
2
"message": "Seeded 5 records across custom collections: products, orders.",
3
"template": "ecommerce",
4
"collections": [
5
"products",
6
"orders"
7
],
8
"totalSeeded": 5
9
}

Query Custom Collection Items

Retrieves a paginated list of items from any dynamic custom collection with search and sorting.

Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/custom/:collection
Parameters
ParameterTypeDescription
collectionstringCustom collection name (e.g. products, orders, leads).
pageintegerPage number (default 1).
limitintegerRecords per page (default 10).
qstringCase-insensitive full-text search term.
_sortstringField name to sort by.
_orderstringSort direction (asc or desc).
1
{
2
"data": [
3
{
4
"id": "local-f9e8d7c6-5432-10ab",
5
"name": "MacBook Pro M3 Max",
6
"price": 3499,
7
"category": "Laptops",
8
"createdAt": "2026-08-07T00:00:00.000Z",
9
"_sandbox": "created"
10
}
11
],
12
"pagination": {
13
"page": 1,
14
"limit": 10,
15
"total": 1,
16
"totalPages": 1,
17
"hasNextPage": false,
18
"hasPrevPage": false
19
}
20
}

Get Single Custom Record

Retrieve a single custom collection record by collection name and string or integer ID.

Request Endpoint
GEThttps://playground.nileslabs.com/api/v1/custom/:collection/:id
Parameters
ParameterTypeDescription
collectionstringCustom collection name.
idstringRecord ID.
1
{
2
"id": "local-f9e8d7c6-5432-10ab",
3
"name": "MacBook Pro M3 Max",
4
"price": 3499,
5
"category": "Laptops",
6
"createdAt": "2026-08-07T00:00:00.000Z",
7
"_sandbox": "created"
8
}

Create Custom Collection Record

Creates a new custom record in any arbitrary collection with automatic ID, createdAt, and updatedAt metadata attachment.

Request Endpoint
POSThttps://playground.nileslabs.com/api/v1/custom/:collection
Parameters
ParameterTypeDescription
collectionstringCustom collection name (e.g. products, orders).
Request Body Example
1
{
2
"name": "MacBook Pro M3",
3
"price": 2499,
4
"category": "Laptops"
5
}
1
{
2
"id": "local-f9e8d7c6-5432-10ab",
3
"name": "MacBook Pro M3",
4
"price": 2499,
5
"category": "Laptops",
6
"createdAt": "2026-08-07T00:00:00.000Z",
7
"_sandbox": "created"
8
}

Replace Custom Record (PUT)

Completely replace a custom record inside the specified collection.

Request Endpoint
PUThttps://playground.nileslabs.com/api/v1/custom/:collection/:id
Parameters
ParameterTypeDescription
collectionstringCustom collection name.
idstringRecord ID to replace.
Request Body Example
1
{
2
"name": "MacBook Pro M3 (Updated Spec)",
3
"price": 2699,
4
"category": "Laptops",
5
"ram": "64GB"
6
}
1
{
2
"id": "local-f9e8d7c6-5432-10ab",
3
"name": "MacBook Pro M3 (Updated Spec)",
4
"price": 2699,
5
"category": "Laptops",
6
"ram": "64GB",
7
"updatedAt": "2026-08-07T00:01:00.000Z",
8
"_sandbox": "updated"
9
}

Partial Custom Update (PATCH)

Partially merge specific fields into an existing custom collection record.

Request Endpoint
PATCHhttps://playground.nileslabs.com/api/v1/custom/:collection/:id
Parameters
ParameterTypeDescription
collectionstringCustom collection name.
idstringRecord ID to update.
Request Body Example
1
{
2
"price": 2299,
3
"onSale": true
4
}
1
{
2
"id": "local-f9e8d7c6-5432-10ab",
3
"name": "MacBook Pro M3",
4
"price": 2299,
5
"category": "Laptops",
6
"onSale": true,
7
"updatedAt": "2026-08-07T00:02:00.000Z",
8
"_sandbox": "updated"
9
}

Delete Custom Collection Record

Removes a custom record from your session sandbox collection.

Request Endpoint
DELETEhttps://playground.nileslabs.com/api/v1/custom/:collection/:id
Parameters
ParameterTypeDescription
collectionstringCustom collection name.
idstringRecord ID to delete.
1
{
2
"message": "Record 'local-f9e8d7c6-5432-10ab' removed from custom collection 'products'"
3
}
Playground API — Free Stateful Mock REST & GraphQL Service