API Pagination
Overview
Some endpoints return a list of resources. You can use limit
and page
query parameters to fetch different pages of results.
Limit Param
You can fetch different pages of results by including a limit
query parameter in your request.
https://api.ittybit.com/files?limit=5
The default limit is 20
.
The minimum limit is 1
and the maximum limit is 100
.
Page Param
You can fetch different pages of results by including a page
query parameter in your request.
https://api.ittybit.com/files?page=2
The default page is 1
.
If you set the page to a number that doesn't exist, you will receive an empty list.
Query Params
You can combine the limit
and page
query params to fetch different pages of results.
https://api.ittybit.com/files?limit=5&page=2
Paginated Responses
Meta
In these cases, the meta
prop will include the additional props:
-
limit integer
The maximum number of resources returned per page
-
total integer
The total number of resources available
-
page integer
The current page
-
pages integer
The total number of pages available
Links
The links
prop will include:
-
self string
The URL to refetch the current page
-
first string
The URL to fetch the first page
-
next string | null
The URL to fetch the next page
-
prev string | null
The URL to fetch the previous page
-
last string
The URL to fetch the last page