Skip to content

List all resource collections

Request

Beta
OAuth 2.0 scope:
  • okta.governance.collections.read
Admin roles:
  • APP_ADMIN

Lists all resource collections

Query
includeArray of strings

The include filter adds additional properties in the response.

Items Value:"counts"
Examples:
Include resource counts and assignment counts in the response
include=counts
limitinteger, [ 1 .. 200 ]

The maximum number of records returned in a response

Default:20
afterstring

Specifies the pagination cursor for the next page of results. Treat this as an opaque value obtained through the standard link headers. See pagination.

Example:after=00u68w6vzKLultXS97g6
filterstring, (scim-filter), <= 255 characters

A filter expression that filters data based on id, name, resourceOrn, or principalOrn resource collection properties. The sw and co operators are supported for name, and the eq operator is supported for id, resourceOrn, and principalOrn.

When filtering by resourceOrn, Okta returns only collections that contain the specified resource. Each collection in the response includes a resourceRelationship object with details about when the resource was added.

When filtering by principalOrn, Okta returns only collections assigned to the specified principal. Each collection in the response includes a principalAssignment object with assignment details.

Note: Query parameter percent encoding is required. See Percent-encoding.

Example:filter=name sw "Sales"
Examples:
Search for resource collections with a name that begins with "Sales"
filter=name sw "Sales"
Search for resource collections with a name that contains "Sales"
filter=name co "Sales"
Search for resource collections with specific IDs
filter=id eq "coljqM9a9xerZfRpp0g2" or id eq "coljrNAph4LiA2C1m0g2"
Find collections that contain a specific resource
filter=resourceOrn eq "orn:okta:idp:00o1234567890:apps:0oa1234567890"
Find collections assigned to a specific principal
filter=principalOrn eq "orn:okta:idp:00o1234567890:users:00u1234567890"
GET
/governance/api/v2/collections
curl -i -X GET \
  'https://okta-subdomain.pixtulate.com/governance/api/v2/collections?include=counts&limit=20&after=00u68w6vzKLultXS97g6&filter=name%20sw%20%22Sales%22'

Responses

A successful resource collection list response (v2)

Headers
X-Rate-Limit-Limitinteger, >= 1required

The rate-limit ceiling for the current request

Example:60
X-Rate-Limit-Remaininginteger, >= 0required

The number of requests left for the current rate-limit window

Example:60
X-Rate-Limit-Resetinteger, >= 0required

The time when the rate limit resets, specified in UTC epoch time (in seconds)

Example:1609459200
Bodyapplication/json
dataArray of objects(collection-full-with-filter-context-v2)
metadataobject(list-metadata)

Metadata for the list response

Response
List of collections
{ "data": [ {}, {}, {} ], "_links": { "next": {}, "self": {} }, "metadata": { "total": 3 } }