Pagination

List endpoints return their results paginated. You can change the page size with per_page and walk through pages with page.

Default per_page varies by endpoint:

  • /api/v1/servers — 10 per page
  • /api/v1/projects — 15 per page
  • /api/v1/projects/{id}/deployments — 15 per page

Sample Request

GET
/v1/projects
curl -G "https://app.depfloy.com/api/v1/projects?page=2&per_page=15" \
  -H "Authorization: Bearer {API_KEY}" \
  -H "Accept: application/json"

Response shape

Paginated responses look like this:

{
  "current_page": 2,
  "data": [
    /* the requested page of items */
  ],
  "per_page": 15,
  "total_pages": 4,
  "total_items": 58
}

To walk every page, increment current_page and request again until current_page === total_pages.

Was this page helpful?