[MGNLREST-340] Delivery API to return limit, size and start of the results Created: 03/Jan/22 Updated: 13/Jul/22 Resolved: 04/Jan/22 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | High |
| Reporter: | Bartosz Staryga | Assignee: | Christopher Zimmermann |
| Resolution: | Duplicate | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
Currently, Delivery API endpoint does not return the number of all results. It makes it hard to paginate/lazy load with help of offset and limit, as we do not know how many pages should there be. It would be nice to extend the response to have the following properties:
e.g.:
{
"limit": 5,
"size": 10,
"start": 0,
"results": [...]
}
|
| Comments |
| Comment by Roman Kovařík [ 03/Jan/22 ] |
|
I don't think this is possible without iterating all results on server. Related forum post: https://groups.google.com/a/magnolia-cms.com/g/user-list/c/UbPAaE7JKEY/m/EEk_YwRHCQAJ?utm_medium=email&utm_source=footer. |