Skip to main content

Pagination and Filtering

Status: PUBLIC_CONTRACT_DRAFT. This page describes the pagination and filtering model. Individual endpoints may vary. It is not a production-live availability claim.

Overview

List endpoints support cursor-based and offset-based pagination, with filtering by common fields.

Pagination modes

Cursor-based pagination (preferred)

List endpoints that return large datasets use cursor-based pagination. The response includes a next_cursor field that can be passed as a query parameter to fetch the next page.

Request:

curl -H "Authorization: Bearer <api_key>" \
"https://api.zen-mesh.io/v1/tenants/<tenant_id>/deliveries?limit=10"

Response:

{
"deliveries": [ ... ],
"next_cursor": "eyJvZmZzZXQiOjEwfQ=="
}

Next page:

curl -H "Authorization: Bearer <api_key>" \
"https://api.zen-mesh.io/v1/tenants/<tenant_id>/deliveries?limit=10&cursor=eyJvZmZzZXQiOjEwfQ=="

Offset-based pagination

Some endpoints support limit and offset parameters:

ParameterTypeDescriptionDefaultMax
limitintegerResults per page20100
offsetintegerNumber of records to skip0

Example:

curl -H "Authorization: Bearer <api_key>" \
"https://api.zen-mesh.io/v1/tenants/<tenant_id>/deliveries?limit=20&offset=40"

Filtering

List endpoints support query parameters for filtering results:

ParameterTypeDescriptionExample
statusstringFilter by resource statusdelivered, failed, pending
event_idstringFilter by eventevt_abc123
destination_idstringFilter by target/destinationdest_abc123
source_idstringFilter by source endpointsrc_abc123
levelstringFilter by log levelinfo, warn, error
sinceISO-8601Start of time window2026-06-01T00:00:00Z
untilISO-8601End of time window2026-06-30T23:59:59Z

Combining filters

Multiple filters can be combined with &:

curl -H "Authorization: Bearer <api_key>" \
"https://api.zen-mesh.io/v1/tenants/<tenant_id>/deliveries?status=failed&destination_id=dest_abc123&limit=5"

Sorting

Sorting is not currently exposed as a public API parameter. Results are returned in reverse chronological order by default.

Non-claims

  • Pagination implementation may vary across endpoint groups
  • Sorting by custom fields is not available
  • Cursor format is opaque and may change between releases
  • Filter parameters that are not recognized are silently ignored