Commit 83941ca2080432938cfcd8e4de9b8d2e616af09e
Exists in
spb-stable
and in
3 other branches
Merge branch 'pagination-link-header-doc' into 'master'
Pagination-link-header-doc
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
doc/api/README.md
@@ -130,6 +130,10 @@ When listing resources you can pass the following parameters: | @@ -130,6 +130,10 @@ When listing resources you can pass the following parameters: | ||
130 | + `page` (default: `1`) - page number | 130 | + `page` (default: `1`) - page number |
131 | + `per_page` (default: `20`, max: `100`) - number of items to list per page | 131 | + `per_page` (default: `20`, max: `100`) - number of items to list per page |
132 | 132 | ||
133 | +[Link headers](http://www.w3.org/wiki/LinkHeader) are send back with each response. | ||
134 | +These have `rel` prev/next/first/last and contain the relevant url. | ||
135 | +Please use these instead of generating your own urls. | ||
136 | + | ||
133 | ## id vs iid | 137 | ## id vs iid |
134 | 138 | ||
135 | When you work with API you may notice two similar fields in api entites: id and iid. | 139 | When you work with API you may notice two similar fields in api entites: id and iid. |