Pagination

1 minute read

Defaults

Requests that return multiple items will be paginated to 30 items by default.

You can specify further pages with the ?page parameter. You can also set a custom page size up to 50 with the ?per_page parameter.

Note that page numbering is 1-based and that omitting the ?page parameter will return the first page.

The link header includes pagination information:

Link: <https://api.codeship.com/v2/organizations/1234/projects?page=3>; rel="next", <https://api.codeship.com/v2/organizations/1234/projects?page=5>; rel="last"

The example includes a line break for readability.

The possible rel values are:

Name Description

next

The link relation for the immediate next page of results

last

The link relation for the last page of results

first

The link relation for the first page of results

prev

The link relation for the immediate previous page of results