GET /api/data/:collectionName
Returns a list of documents from the specified collection. Supports pagination, sorting, and field-level filtering via query parameters.
Required header
x-api-key: your pk_live_… or sk_live_… key.
Path parameters
string
required
The name of the collection to query (e.g.,
posts, comments, inventory).Query parameters
number
Page number for pagination. Defaults to
1.number
Number of documents per page. Defaults to
20.string
Field to sort by. Prefix with
- for descending order (e.g., sort=-createdAt for newest
first, sort=title for ascending alphabetical).string
Filter documents by field value. Append an operator suffix to the field name for comparisons (e.g.,
_gt, _lt, _ne, _in, _regex). For exact matches, use the field name without a suffix. Example: status=published&views_gt=100boolean
Setting
include_deleted to true includes soft-deleted documents; it defaults to falseRLS behavior
If the collection has RLS enabled:public-readmode: anyone can read all documents with a validx-api-key.privatemode: requiresAuthorization: Bearer <accessToken>— only the owner’s documents are returned.
Response fields
boolean
true when the request succeeded.object
Object containing the results and pagination metadata.
string
Human-readable status message.
