CorefinityCorefinityDocs
Open the Control PanelControl Panel
Essentials · 6 of 12

Pagination

The three ways lists are paged and which endpoints use which.

On this page

Lists are paged in one of three ways. The name of the list field differs by endpoint (items, sites, tickets, rows, events), so read it from the endpoint's reference page.

Cursor

Most lists use a cursor. Send the previous answer's next_cursor as cursor; on the last page it is null, or on a few lists left out.

ParameterMeaning
limitItems a page. Usually 1 to 100 with a default of 25; each endpoint names its own range
cursorThe next_cursor of the page before
Terminal
curl "https://manage.corefinity.com/api/corestack/sites?limit=20&cursor=NzcxMjA" \
  -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"
json
{
  "sites": [],
  "next_cursor": null
}

Send only a cursor the list gave you, and keep the same filters while following it. What a made-up cursor answers differs by list: most refuse it 422 on cursor, and a few, the sites list among them, answer the first page again.

Page and page size

A few lists use page numbers. The tickets list answers the totals beside the list, as below; each list's reference page shows its own answer.

ParameterMeaning
pageThe page, from 1
per_pageItems a page
json
{
  "tickets": [],
  "page": 1,
  "per_page": 10,
  "total": 0,
  "last_page": 1
}

Before markers

Activity feeds page backwards in time with two values. Send the previous answer's next_before and next_before_id as before and before_id; both are null on the last page.

Which lists use which

ListStyleItems a page
GET /corestack/clusters/{cluster}/activityBefore markers1 to 100; default 25
GET /corestack/sites/{site}/activityBefore markers1 to 100; default 25
GET /agency/page-change-requestsCursor1 to 100; default 25
GET /agency/referralsCursor1 to 100; default 25
GET /companies/{company}/deployment-connectionsCursorFixed
GET /company/deployment-connectionsCursorFixed
GET /corestack/demosCursor1 to 50; default 20
GET /corestack/sitesCursor1 to 100; default 50
GET /corestack/sites/{site}/operationsCursor1 to 100; default 25
GET /environments/{environment}/deploymentsCursor1 to 100; default 25
GET /performance-auditsCursor1 to 100; default 25
GET /performance-audits/{audit}/gtmetrix-reportsCursor1 to 10; default 5
GET /team/membersCursor1 to 100; default 25
GET /whats-newCursor1 to 50; default 10
GET /support/ticketsPage and page size1 to 100; default 25
GET /corestack/billing/invoicesCursor1 to 100; default 25
GET /corestack/billing/ledgerCursorFixed
GET /corestack/companies/{company}/deploy-templates/{platform}/usageCursorFixed
GET /corestack/companies/{company}/deploy-templates/{platform}/versionsCursorFixed
GET /corestack/sites/{site}/error-pages/revisionsCursor1 to 100; default 20
GET /companies/{company}/firewall/activityCursorFixed
GET /environments/{environment}/firewall/activityCursorFixed
GET /user/firewall/activityCursorFixed
GET /websites/{website}/firewall/activityCursorFixed
GET /corestack/sites/{site}/maintenance-window/historyCursorFixed
GET /corestack/websitesPage and page size25, 50, 100; default 25
GET /corestack/sites/{site}/nginx-rules/revisionsCursor1 to 100; default 20
GET /corestack/ordersCursorFixed
GET /corestack/sites/{site}/php-runtime/historyCursorFixed
GET /companies/{company}/ssh/legacyCursorFixed
GET /environments/{environment}/ssh/activityCursorFixed
GET /corestack/sites/{site}/varnish/vcl/revisionsCursorFixed

"Fixed" means the list has no page size to send. Lists that are always short, such as GET /companies, a site's snapshots or a site's scheduled tasks, are answered whole.

Was this helpful?
Open in ClaudeOpen in ChatGPT