Skip to content

Pagination

List endpoints return newest items first.

Use limit to control page size. Supported list endpoints clamp limit between 1 and 100.

List responses include:

FieldMeaning
has_moretrue when another page is available.
next_starting_afterRun ID to pass as starting_after for the next page. null when there is no next page.
ParameterTypeDescription
limitintegerPage size. Defaults to 20.
starting_afterstringRun ID from the previous page.

First page:

Terminal window
curl -s "https://api.sleepwalker.ai/v1/visibility/runs?limit=20" \
-H "Authorization: Bearer sw_api_live_..."

Next page:

Terminal window
curl -s "https://api.sleepwalker.ai/v1/visibility/runs?limit=20&starting_after=6a75b22b-..." \
-H "Authorization: Bearer sw_api_live_..."

If starting_after does not match a run visible to the authenticated account, the API returns 400.