Guide

Pagination

List endpoints page with an opaque cursor and a limit. Follow the cursor, never build one.

The parameters

ParameterTypeMeaning
cursorstringThe opaque cursor from the previous page's meta.pagination.next_cursor. Omit it for the first page.
limitinteger, 1 to 100Rows per page. The endpoint picks a sensible default when you leave it out.

What a page looks like

json
{
  "data": [ { "id": 812 }, { "id": 813 } ],
  "meta": {
    "request_id": "req_01HZY8N2Q0K3M4P5R6S7T8U9V0",
    "cost": 0.5,
    "pagination": { "limit": 2, "has_more": true, "next_cursor": "Y3Vyc29yOjI" }
  }
}

Walking every page

Keep calling while has_more is true, passing the cursor you were last given. Each page is a separate billable call.

bash
# first page
curl "https://api.klasstack.com/v1/students?limit=50" \
  -H "Authorization: Bearer ks_test_sk_your_key_here"

# next page
curl "https://api.klasstack.com/v1/students?limit=50&cursor=Y3Vyc29yOjI" \
  -H "Authorization: Bearer ks_test_sk_your_key_here"