Overview
Monime uses cursor-based pagination for list endpoints. Everylisting Responses include a pagination object with a cursor you pass back to fetch the next page.
This design is stable, efficient, and avoids the pitfalls of offset-based paging under changing datasets.
Request Shape
Pagination on Monime APIs is controlled with query parameters:limit→ how many objects to return in one page.after→ an opaque cursor (usually theidof the last object from the previous page).
Response Shape
Every paginated response includes apagination object:
When to Stop Paging
-
If
pagination.nextis present → there are more results. Pass this value asafterin your next request. -
If
pagination.nextisnullor absent → you’ve reached the end of the collection. Stop paging.
A smaller
count than your requested limit often indicates you’re on the final page, but the definitive signal
is when next is null or missing. Best Practices for Paging
Choose sane page sizes
- Start with
limit=30–50for bulk jobs; use smaller limits for interactive UIs. - Larger pages → fewer round trips; balance with payload size and client memory.
Always drive from the cursor
- Read
pagination.nextand pass it back asafterin the next call. - Don’t fabricate or modify cursors; they are opaque and query-specific.
- Stop when
pagination.nextisnull/ absent.
Keep filters stable while paging
- Apply all filterss before paging.
- Changing filters mid-stream invalidates the cursor and can skip/duplicate items.
Checkpoint for resumability
- Persist
{endpoint, filters}after each page. - On restart, resume with the last
after. For strict windows, bound by timestamp.
Be nice to rate limits
- Pace requests: small delay (50–200ms) between pages for steady flows.
- On
429, honorRetry-After; then continue from the same cursor. - Remember endpoint caps (live: 20 req/s, test: 5 req/s) and token/space quotas.
Avoid N+1 request patterns
- Prefer list responses that already include fields you need.
- If you must hydrate per-item, batch those lookups and rate-gate them.
Control parallelism
- Cap concurrency per token and per endpoint; add jitter to avoid synchronized bursts.