📄 Pagination
When the endpoint retrives a list of items as result you can control the number of objects returned and navigate through result pages using the page and limit parameters:
- page: Specifies the page number (e.g., page=2 for the second page);
- limit: Sets the number of contacts per page (e.g., limit=10 for 10 contacts per page);
Example of retrieving the second page with 5 contacts per page:
curl --location 'http://apiurl.com/contacts/?page=2&limit=5' \
--header 'x-api-key: {your-api-key}'\
--header 'octa-agent-email: {agent-email}' \
ℹ️ Response Headers
When making a request that use pagination structure, the API provides additional information in the response headers:
- X-Total-Pages: Indicates the total number of pages available;
- X-Total-Items: Shows the total number of objects available;
- X-Next-Page: Indicates the presence of a next page.
These headers assist in navigating through paginated results and understanding the data set's size and structure.