Skip to content

Commit

Permalink
docs: pagination (#2143)
Browse files Browse the repository at this point in the history
Closes #2039
  • Loading branch information
mitar committed Jan 14, 2022
1 parent f0f89c1 commit 0807a03
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit 0807a03

Please sign in to comment.