GuideLab API

Pagination

How list endpoints page, limit, and search results.

List endpoints share a common pagination contract. You request a page with query parameters, and the response includes the items plus pagination metadata.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1‑based).
limitinteger20Items per page.
searchstringOptional free‑text search query.
curl "https://api.guidelab.co/patients?page=2&limit=50&search=smith" \
  -H "Authorization: Bearer gl_device_v1_<redacted>"

Response metadata

Paginated responses include a pagination object alongside the data:

{
  "data": [ /* … items … */ ],
  "pagination": {
    "page": 2,
    "limit": 50,
    "total": 327,
    "totalPages": 7
  }
}
FieldTypeDescription
pageintegerThe current page number.
limitintegerItems per page used for this response.
totalintegerTotal number of items matching the query.
totalPagesintegerTotal number of pages.

The exact shape of the data array and any additional filters are documented per endpoint in the API reference. page, limit, and search are consistent across all paginated list endpoints.

On this page