Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: pagination #2143

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/docs/concepts/rest-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ pages (where applicable):
- Previous (prev)
- Last

Pages are created based on the values of `per_page` and `page` provided in the
Pagination is done based on `per_page` and `page` parameters provided in the
querystring, where `per_page` is the page size, and `page` is the current page.

In most scenarios, the `per_page` should be a multiple of the `page`.

Example:

```
Expand All @@ -35,7 +33,7 @@ Example:
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Link: </resources?per_page=5&page=0>; rel="first",</resources?per_page=5&page=15>; rel="next",</resources?per_page=5&page=5>; rel="prev",</resources?per_page=5&page=20>; rel="last"
< Link: </resources?per_page=5&page=0>; rel="first",</resources?per_page=5&page=11>; rel="next",</resources?per_page=5&page=9>; rel="prev",</resources?per_page=5&page=20>; rel="last"
< Date: Mon, 22 Apr 2019 23:34:29 GMT
< Transfer-Encoding: chunked
<
Expand Down