Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pagination documentation. #7

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,18 @@ All list responses contain the `x-total-count` header which contains the total n

### Pagination

All lists retrieved are actually pages. The following query parameters are used in pagination:
All lists retrieved are actually pages.

There is no default sort order; when no sort order is specified, the order is undefined.
Because of this, and because the server does not save state between network requests,
pagination across multiple pages will only work correctly when a sort order is specified.

The following query parameters are used in pagination:

* limit - the maximum number of items to fetch in a single call; defaults to MAX_RESULTS defined in util/types/constants.js, currently 10,000.
* offset - the number of items to skip before fetching. 0 based.

For instance, `GET /api/v1.1/schemas?limit=3&offset=4` retrieves the schemas at positions 3, 4, and 5.
For instance, `GET /api/v1.1/schemas?limit=3&offset=4&sort=name` retrieves the schemas at positions 4, 5, and 6 (0 based).

### Field selection

Expand Down