Pagination, filtering and sorting

List conventions

Lists use token-based pagination. On the first request you set limit; to walk to the next or previous page you send the opaque pageToken returned by the previous response. There is no public offset parameter — the offset is baked into the token.

sort and order apply to the cohort list only — the other lists are not sortable. Those lists still take their own filters: the members and authors lists accept a query (name search), and the completion-status list accepts enrollment_status.

ParameterRules
limit1–300. Sets the page size on the first request.
pageTokenOpaque cursor from a prior response (paging.tokens.next / paging.tokens.previous). When set it must be the only query parameter — limit, filters and sort are already encoded in the token. Sending it alongside anything else returns 422 (page_token_not_exclusive); a malformed token returns 422 (page_token_invalid).
sortCohort list only. created_at or updated_at. Default created_at.
orderCohort list only. asc or desc. Default desc.

Walking the pages

  1. First page — send limit plus any filters/sort you want.
  2. The response carries paging.tokens.next (and paging.tokens.previous where applicable).
  3. Next page — send only pageToken=<that token>. Do not re-send limit, filters, or sort; they are carried inside the token.

Cohort list filters

  • role — member, author, creator, or invited.
  • status — active or inactive.
  • mandatory — true or false.
  • query — substring match on the cohort name.