Internal
Pagination
Every list is cursor paginated. Follow nextCursor until hasMore is false.
Every list returns the same envelope: a data array, a hasMore flag and, when there is more, a nextCursor to pass back.
{
"data": [
{
"id": "brd_3f9e2a",
"title": "Q4 Launch Planning"
}
],
"hasMore": true,
"nextCursor": "eyJvIjoyNX0"
}
Reading a whole list
Pass the nextCursor you were given as ?cursor= and keep going until hasMore is false. Do not build a cursor yourself and do not parse one: it is opaque and its contents will change.
let cursor = null;
const boards = [];
do {
const url = new URL("https://api.mockflow.com/v1/boards");
if (cursor) url.searchParams.set("cursor", cursor);
const page = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOCKFLOW_API_KEY}` }
}).then((r) => r.json());
boards.push(...page.data);
cursor = page.hasMore ? page.nextCursor : null;
} while (cursor);
Page size
Query parameters
limitintegerHow many to return. Defaults to 50 and is capped at 100, whatever you ask for.
cursorstringThe nextCursor from the previous response. Omit it for the first page.
A cursor is tied to the filters it was made with. Change q or sort and start again from the first page.
Was this page helpful?