Skip to main content

Pagination

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

Query parameters​

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
page_sizeinteger50Number of items per page (most lists; a few use a smaller default, noted on their 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 a pagination object next to the data:

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

Calculating pages​

total_pages is ceil(total_count / 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