Skip to content

Pagination

List endpoints accept page (default 1) and limit (default 20) query parameters, plus endpoint-specific filters such as search or status:

Terminal window
curl -H "Authorization: Bearer $CATALYST_API_KEY" \
"https://panel.example.com/api/admin/servers?page=2&limit=50&search=survival"
  • Cap your limit. Ask for what you will display (20–100). Full exports belong in bulk endpoints or repeated pages, not limit=100000.
  • Paginate to exhaustion (page++ until a short/empty page) rather than assuming a total — totals shift while you read.
  • Treat pages as snapshots. Items created or deleted mid-walk can shift offsets; for sync jobs, prefer filtering by updated time where offered and reconcile.
  • Cache sparingly. Lists change constantly (server states, node health). Cache seconds, not hours, or re-fetch on user action.