Skip to content

Create a resource set

Request

OAuth 2.0 scope:
  • okta.roles.manage

Creates a new resource set. See Supported resources.

Note: The maximum number of resources allowed in a resource set object is 1000. Resources are identified by either an Okta Resource Name (ORN) or by a REST URL format. See Okta Resource Name.

Bodyapplication/jsonrequired
descriptionstringrequired

Description of the resource set

labelstringrequired

Unique name for the resource set

resourcesArray of strings, <= 1000required

The endpoint (URL) that references all resource objects included in the resource set. Resources are identified by either an Okta Resource Name (ORN) or by a REST URL format. See Okta Resource Name.

curl -i -X POST \
  https://subdomain.okta.com/api/v1/iam/resource-sets \
  -H 'Content-Type: application/json' \
  -d '{
    "label": "SF-IT-People",
    "description": "People in the IT department of San Francisco",
    "resources": [
      "https://{yourOktaDomain}/api/v1/groups/00guaxWZ0AOa5NFAj0g3",
      "https://{yourOktaDomain}/api/v1/groups/00gu67DU2qNCjNZYO0g3/users",
      "https://{yourOktaDomain}/api/v1/users",
      "https://{yourOktaDomain}/api/v1/realms/00guaxWZ0AOa5NFAj0g3",
      "https://{yourOktaDomain}/api/v1/realms"
    ]
  }'

Responses

Success

Bodyapplication/json
createdstring, (date-time)read-only

Timestamp when the role was created

descriptionstring

Description of the resource set

idstringread-only

Unique ID for the resource set object

labelstring

Unique label for the resource set

lastUpdatedstring, (date-time)read-only

Timestamp when the role was last updated

Response
{ "id": "iamoJDFKaJxGIr0oamd9g", "label": "SF-IT-People", "description": "People in the IT department of San Francisco", "created": "2021-02-06T16:20:57.000Z", "lastUpdated": "2021-02-06T16:20:57.000Z", "_links": { "self": { … }, "resources": { … }, "bindings": { … } } }