Skip to content

Pagination

List and activity endpoints return newest items first. Their page-size controls are endpoint-specific.

Endpoint Parameter Default Range Cursor pagination
GET /v1/visibility/runs limit 20 1-100 Yes
GET /v1/content-intelligence/runs limit 20 1-100 Yes
GET /v1/tests limit 50 1-50 No
GET /v1/reports/by-url limit 5 1-20 No; limits recent runs per matched test
GET /v1/activity limit 20 1-100 No
GET /v1/usage recent_limit 20 1-100 No

The two direct-run list responses include:

Field Meaning
has_more true when another page is available.
next_starting_after Run ID to pass as starting_after for the next page. null when there is no next page.
Parameter Type Description
limit integer Page size. Defaults to 20 and is clamped to 1-100.
starting_after string Run 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 with detail.error = "invalid_cursor".