Pagination
All list endpoints (/wins, /spaces, /tags) support pagination.
Query parameters
Section titled “Query parameters”| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
page | integer | 1 | 1+ | Page number |
per_page | integer | 25 | 1–100 | Items per page |
Response headers
Section titled “Response headers”Pagination metadata is returned in response headers:
| Header | Type | Description |
|---|---|---|
X-Total-Count | integer | Total number of records matching the query |
X-Page | integer | Current page number |
X-Per-Page | integer | Items per page |
Example
Section titled “Example”Request
Section titled “Request”curl "https://app.myhypedoc.com/api/v1/wins?page=2&per_page=10" \ -H "Authorization: Bearer YOUR_TOKEN"Response headers
Section titled “Response headers”X-Total-Count: 47X-Page: 2X-Per-Page: 10The response body contains items 11–20 of 47 total.
Calculating pages
Section titled “Calculating pages”To determine the total number of pages:
total_pages = ceil(X-Total-Count / X-Per-Page)For the example above: ceil(47 / 10) = 5 pages.
pagevalues below 1 are clamped to 1per_pagevalues are clamped to the range 1–100- Requesting a page beyond the last page returns an empty array
- The default
per_pageof 25 works well for most use cases