Pagination and sorting
Pagination
Every list query (for example grants or disclosures) accepts page and limit arguments and returns a collection plus metadata.
pagestarts at 1. Omitting it, or passing 0, returns the first page.limitdefaults to 50. The maximum is 200, and larger values return 200 records.
To read every record, request page: 1, then keep requesting metadata.nextPage until hasNextPage is false.
Sorting
List queries accept sortField and sortDirection.
sortFieldiscreated_atorupdated_at. Each list query has its own enum type, such asDisclosureSortFieldEnumfordisclosures; use that type when you passsortFieldas a variable. Any other value fails query validation withextensions.status400.sortDirectionisASCorDESC. The default isDESC.- Every list query defaults to
updated_at, so the most recently updated records come first.