mirror of
https://github.com/adidas/api-guidelines.git
synced 2025-10-25 15:19:19 +00:00
Creates rest/core-principles/quality.md
Auto commit by GitBook Editor
This commit is contained in:
27
rest/execution/pagination.md
Normal file
27
rest/execution/pagination.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Pagination
|
||||
A collection resource **SHOULD** provide the [`first`, `last`, `next` and `prev` link](https://tools.ietf.org/html/rfc5988#section-6.2.2)s for navigation within the collection.
|
||||
|
||||
#### Example
|
||||
The Collection of Orders using the collection navigation link and `offset` and `limit` query parameters:
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"_links": {
|
||||
"self": { "href": "/orders?offset=100&limit=10" },
|
||||
"prev": { "href": "/orders?offset=90&limit=10" },
|
||||
"next": { "href": "/orders?offset=110&limit=10" },
|
||||
"first": { "href": "/orders?limit=10" },
|
||||
"last": { "href": "/orders?offset=900&limit=10" }
|
||||
},
|
||||
"total_count": 910,
|
||||
"_embedded": {
|
||||
"order": [
|
||||
{ ... },
|
||||
{ ... },
|
||||
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user