data
List data in collection
List all documents in a collection with optional pagination, sort, and filter. Accepts BearerToken (JWT) or ApiKeyAuth (X-API-Key).
GET
/api/data/projects/{projectId}/collections/{collectionId}/dataAuthentication
Requires JWT
Note
Include your JWT in the
Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | Project ID. |
collectionId | string | Yes | Collection ID. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (1-based). |
limit | integer | No | Number of documents per page. |
sort | string | No | Sort field and order (e.g. -createdAt, name). |
filter | string | No | JSON string for filtering documents (e.g. {"status":"active"}). |
SDK setup
Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.
import { MudbaseClient } from "mudbase";
const client = new MudbaseClient();
client.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig");import { MudbaseClient } from "mudbase";
const client = new MudbaseClient();
client.setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig");Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const result = await client.data.list({
projectId: "proj_cOxyPi8SfxPP",
collectionId: "GHZeC9xM6xyLNDNQ"
});const result = await client.data.list({
projectId: "proj_cOxyPi8SfxPP",
collectionId: "GHZeC9xM6xyLNDNQ"
});Try It Live
Test this endpoint with your own credentials. Your requests will be sent to the live API.
Use the auth endpoints to obtain a JWT.
No Request Yet
Send a request to see the full inspector
Responses
200Data list
json
{
"data": [
{
"_id": "696bbe5b99eeb7f929a93e0b",
"title": "Laptop",
"price": 8500,
"description": "High-performance laptop for developers",
"createdAt": "2026-01-17T16:52:43.541Z",
"updatedAt": "2026-01-17T16:52:43.542Z"
},
{
"_id": "696bbe5c99eeb7f929a93e0c",
"title": "Mouse",
"price": 25,
"description": "Wireless mouse",
"createdAt": "2026-01-17T16:53:10.123Z",
"updatedAt": "2026-01-17T16:53:10.123Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"totalPages": 1
}
}{
"data": [
{
"_id": "696bbe5b99eeb7f929a93e0b",
"title": "Laptop",
"price": 8500,
"description": "High-performance laptop for developers",
"createdAt": "2026-01-17T16:52:43.541Z",
"updatedAt": "2026-01-17T16:52:43.542Z"
},
{
"_id": "696bbe5c99eeb7f929a93e0c",
"title": "Mouse",
"price": 25,
"description": "Wireless mouse",
"createdAt": "2026-01-17T16:53:10.123Z",
"updatedAt": "2026-01-17T16:53:10.123Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"totalPages": 1
}
}401Authentication required or invalid token.
403Access denied or insufficient permissions.
Errors
| Code | Meaning |
|---|---|
401 | Authentication required or invalid token. |
403 | Access denied or insufficient permissions. |