Pagination
List endpoints that return multiple items support pagination via query parameters.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
page_size | integer | 20 | Number 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
}
| Field | Description |
|---|---|
data | Array of items for the current page |
page | Current page number |
page_size | Number of items per page |
total | Total 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 requestsGET /api/v1/endpoints/:endpoint_id/requests/:request_id/forwards— request forwardsGET /api/v1/uptime-monitors/:id/checks— monitor checks