Skip to main content

Pagination

List endpoints that return multiple items support pagination via query parameters.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
page_sizeinteger20Number of items per page

Example request

curl "https://app.hooklistener.com/api/v1/endpoints/<endpoint-id>/requests?page=2&page_size=50" \
-H "Authorization: Bearer hklst_your_api_key"

Response format

Paginated responses include metadata alongside the data:

{
"data": [
{ "id": "req_001", "method": "POST", "..." : "..." },
{ "id": "req_002", "method": "GET", "..." : "..." }
],
"page": 2,
"page_size": 50,
"total": 142
}
FieldDescription
dataArray of items for the current page
pageCurrent page number
page_sizeNumber of items per page
totalTotal number of items across all pages

Calculating pages

Total pages = ceil(total / page_size)

For example, with 142 items and page_size of 50:

  • Page 1: items 1-50
  • Page 2: items 51-100
  • Page 3: items 101-142

Endpoints that support pagination

  • GET /api/v1/endpoints/:id/requests — captured requests
  • GET /api/v1/endpoints/:endpoint_id/requests/:request_id/forwards — request forwards
  • GET /api/v1/uptime-monitors/:id/checks — monitor checks