Pagination
Page through large collections such as builds and diffs using Argos's page-based pagination.
List endpoints — such as listing a project's builds or a build's diffs — can return more results than fit in a single response. These endpoints use page-based pagination so you can fetch results one page at a time.
Query parameters
Control pagination with two optional query parameters:
page
integer
1
The page number to retrieve, starting at 1.
perPage
integer
30
The number of items per page. Must be between 1 and 100.
Response shape
Every paginated endpoint returns the same envelope: a pageInfo object describing the current page and a results array containing the items.
{
"pageInfo": {
"total": 248,
"page": 1,
"perPage": 30
},
"results": [
{
"id": "123",
"number": 248
// ...
}
]
}pageInfo.total
integer
The total number of items across all pages.
pageInfo.page
integer
The current page number.
pageInfo.perPage
integer
The number of items per page.
results
array
The items for the current page.
Fetching a page
Request the second page of builds, 50 at a time:
Iterating over all pages
Use pageInfo.total and perPage to compute how many pages exist, then loop until you've fetched them all.
Last updated
Was this helpful?