Returns a paginated list of policies for the organization. Policies can be paginated in one of two ways. Page-based pagination uses page and page_size and returns the total number of matching policies in the X-Total-Count header. Cursor-based pagination uses limit and cursor and returns the cursor for the next page in the X-Next-Cursor header. Cursor-based pagination stays fast however deep you page, so use it to walk through a large number of policies.
To paginate by cursor, send limit on the first request. If more policies remain, the response includes an X-Next-Cursor header. Send its value as cursor, with limit and the same filters and sort, to fetch the next page. The last page has no X-Next-Cursor header. Cursor-based pagination does not return a total; use HEAD /policies with the same filters to get one in X-Total-Count.
To filter by when policies were created or last updated, send created_at_from and created_at_to, or updated_at_from and updated_at_to, as ISO 8601 date-time strings in UTC. Both bounds are inclusive and either can be sent alone. These filters only work with cursor-based pagination, so limit is required. A request can filter on only one of created_at and updated_at, and sort, if sent, must be that same field. When sort is omitted, policies are sorted by that field. HEAD /policies accepts the same filters without limit.
400The query is invalid. With cursor-based pagination this includes sending page or page_size with limit or cursor, sending cursor without limit, a malformed cursor, and a cursor reused with a different sort or different filters. With a date-range filter it includes sending it without limit, combining created_at_* with updated_at_*, a sort other than the filtered field, and a *_from after its *_to.