Pagination and filtering
Pagination
Asset list endpoints use zero-based pagination. The events feed uses an after cursor instead.
| Field | Meaning |
|---|---|
pageIndex | Zero-based page number; defaults to 0. |
pageSize | Items per page, from 1 through 100. |
ordering | An array of { field, direction } values. |
Responses include items, total, pageIndex, pageSize, ordering, and hasMore.
const page = await client.assets.list({
pageIndex: 0,
pageSize: 25,
ordering: [{ field: "createdAt", direction: "DESC" }],
});
Asset filters
The asset list accepts an RSQL-style filter. Supported operators include equality (==), inequality (!=), comparisons (>, >=, <, <=), and inclusion (=in=). Use ; for AND, , for OR, and parentheses for grouping.
# Approved assets
status==approved
# Approved or pending assets
status=in=(approved,pending)
# Rejected top-level assets
status==rejected;parentId==null
# Private assets awaiting or passing moderation
(status==approved,status==pending);visibility==private
# Assets tagged homepage
tags=in=(homepage)Pass the expression as one URL-encoded query value or directly through the SDK:
const page = await client.assets.list({
pageIndex: 0,
filter: "status==approved;tags=in=(homepage)",
});
Invalid syntax or unknown fields return a client error. Avoid constructing filters from untrusted input without restricting allowed fields and operators.