Pagination
The three ways lists are paged and which endpoints use which.
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.
| Parameter | Meaning |
|---|---|
limit | Items a page. Usually 1 to 100 with a default of 25; each endpoint names its own range |
cursor | The next_cursor of the page before |
curl "https://manage.corefinity.com/api/corestack/sites?limit=20&cursor=NzcxMjA" \
-H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/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.
| Parameter | Meaning |
|---|---|
page | The page, from 1 |
per_page | Items a page |
{
"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
| List | Style | Items a page |
|---|---|---|
GET / | Before markers | 1 to 100; default 25 |
GET /corestack/sites/{site}/activity | Before markers | 1 to 100; default 25 |
GET /agency/page-change-requests | Cursor | 1 to 100; default 25 |
GET /agency/referrals | Cursor | 1 to 100; default 25 |
GET / | Cursor | Fixed |
GET /company/deployment-connections | Cursor | Fixed |
GET /corestack/demos | Cursor | 1 to 50; default 20 |
GET /corestack/sites | Cursor | 1 to 100; default 50 |
GET / | Cursor | 1 to 100; default 25 |
GET / | Cursor | 1 to 100; default 25 |
GET /performance-audits | Cursor | 1 to 100; default 25 |
GET / | Cursor | 1 to 10; default 5 |
GET /team/members | Cursor | 1 to 100; default 25 |
GET /whats-new | Cursor | 1 to 50; default 10 |
GET /support/tickets | Page and page size | 1 to 100; default 25 |
GET /corestack/billing/invoices | Cursor | 1 to 100; default 25 |
GET /corestack/billing/ledger | Cursor | Fixed |
GET / | Cursor | Fixed |
GET / | Cursor | Fixed |
GET / | Cursor | 1 to 100; default 20 |
GET / | Cursor | Fixed |
GET / | Cursor | Fixed |
GET /user/firewall/activity | Cursor | Fixed |
GET / | Cursor | Fixed |
GET / | Cursor | Fixed |
GET /corestack/websites | Page and page size | 25, 50, 100; default 25 |
GET / | Cursor | 1 to 100; default 20 |
GET /corestack/orders | Cursor | Fixed |
GET / | Cursor | Fixed |
GET /companies/{company}/ssh/legacy | Cursor | Fixed |
GET / | Cursor | Fixed |
GET / | Cursor | Fixed |
"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.