API
Pagination
Walk long credential lists with cursor pagination: page size, next_cursor and the end of the list.
Updated
On this page
GET /api/v1/credentials uses cursor pagination. Results are ordered newest first, and each page continues exactly where the previous one ended, even while new credentials are being issued.
Parameters
| Parameter | Default | Maximum | Description |
|---|---|---|---|
limit | 50 | 100 | Credentials per page, from 1 to 100. |
cursor | none | The next_cursor value from the previous response. |
Reading a page
Each response contains data (the page) and next_cursor:
- When more credentials exist,
next_cursoris an opaque string. Pass it unchanged ascursorto get the next page. - On the last page,
next_cursorisnull.
Treat the cursor as opaque: do not build or edit it. Keep the same filters (status, record_type, issued_after, issued_before) on every page of one walk. An invalid cursor returns 400; restart from the first page.
Example: fetch every page
async function listAllCredentials(apiKey) {
const all = [];
let cursor = null;
do {
const url = new URL("https://app.arrota.com/api/v1/credentials");
url.searchParams.set("limit", "100");
if (cursor) url.searchParams.set("cursor", cursor);
const response = await fetch(url, { headers: { Authorization: `Bearer ${apiKey}` } });
if (!response.ok) throw new Error(`Arrota API ${response.status}`);
const page = await response.json();
all.push(...page.data);
cursor = page.next_cursor;
} while (cursor);
return all;
}curl "https://app.arrota.com/api/v1/credentials?limit=100&cursor=eyJjIjoiMjAyNi0wOS0xOFQxNDowMjoxMS40ODI5MTMrMDA6MDAiLCJpIjoiNWI2ZjBjMmEtMWQzZS00ZjVhLTliN2MtOGQ5ZTBmMWEyYjNjIn0" \
-H "Authorization: Bearer $ARROTA_API_KEY"Every page counts towards your rate limit. For large walks, use limit=100.