Skip to content

Commit 4bd9883

Browse files
author
Samuel Gomis
committed
fix(API-1852): Update API rest pagination offset section
1 parent 9602700 commit 4bd9883

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

content/rest-api/pagination.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,22 @@ curl -X GET /api/rest/v1/products-uuid
163163
```
164164
:::
165165

166-
:::warning
166+
### Limitation
167+
167168
When trying to request a quite high page number, you will notice that this method spend more and more time to respond. This method can also be responsible for giving you duplicates. That is why we introduced another way to request paginated resources, see the [`Search-after` method](/documentation/pagination.html#the-search-after-method). It is only avalailable on products, product models, published products, assets, reference entities and reference entity records right now.
168-
:::
169169

170+
For somes high volume entities, an offset limit exist, after that an error with code 422 will be sent back.
171+
``` bash
172+
173+
// Max offset for product trying to fetch after the 10.000th product
174+
curl -X GET api/rest/v1/products-uuid?page=101&limit=100
175+
{
176+
"code": 422,
177+
"message": "You have reached the maximum number of pages you can retrieve with the \"page\" pagination type. Please use the search after pagination type instead",
178+
"_links": {
179+
"documentation": {
180+
"href": "http://api.akeneo.com/documentation/pagination.html#the-search-after-method"
181+
}
182+
}
183+
}
184+
```

0 commit comments

Comments
 (0)