Pagination and filtering

Pagination

Asset list endpoints use zero-based pagination. The events feed uses an after cursor instead.

FieldMeaning
pageIndexZero-based page number; defaults to 0.
pageSizeItems per page, from 1 through 100.
orderingAn 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.

Signing in

Signing out

Cookies on CalmLens

We use essential cookies to keep you signed in and the site secure. With your permission, we'll also use functional cookies to remember preferences such as your layout and documentation language, and to offer Google One Tap sign-in. We don't use analytics or advertising cookies. Manage cookies