File tree 1 file changed +15
-5
lines changed
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -85,16 +85,16 @@ GET /posts?id=1&id=2
85
85
GET /comments?author.name=typicode
86
86
```
87
87
88
- ### Slice
88
+ ### Paginate
89
89
90
- Add ` _start ` and ` _end ` or ` _limit ` (an ` X-Total-Count ` header is included in the response)
90
+ Add ` _page ` and in the ` Link ` header you'll get ` first ` , ` prev ` , ` next ` and ` last ` links
91
91
92
92
```
93
- GET /posts?_start=20&_end=30
94
- GET /posts/1/comments?_start=20&_end=30
95
- GET /posts/1/comments?_start=20&_limit=10
93
+ GET /posts?_page=7
96
94
```
97
95
96
+ _ 10 items are returned by default_
97
+
98
98
### Sort
99
99
100
100
Add ` _sort ` and ` _order ` (ascending order by default)
@@ -104,6 +104,16 @@ GET /posts?_sort=views&_order=DESC
104
104
GET /posts/1/comments?_sort=votes&_order=ASC
105
105
```
106
106
107
+ ### Slice
108
+
109
+ Add ` _start ` and ` _end ` or ` _limit ` (an ` X-Total-Count ` header is included in the response)
110
+
111
+ ```
112
+ GET /posts?_start=20&_end=30
113
+ GET /posts/1/comments?_start=20&_end=30
114
+ GET /posts/1/comments?_start=20&_limit=10
115
+ ```
116
+
107
117
### Operators
108
118
109
119
Add ` _gte ` or ` _lte ` for getting a range
You can’t perform that action at this time.
0 commit comments