Skip to content

Assign the labels to resources

Request

OAuth 2.0 scope:
  • okta.governance.labels.manage
Admin roles:
  • SUPER_ADMIN

Assigns the specified label values to resources

Note: If you create a custom admin role for assigning label values to resources, ensure that the custom role has permissions to edit the resource and governance labels. For example, to assign labels to apps, the custom admin role must have the okta.apps.manage and the okta.governance.labels.manage permissions.

Bodyapplication/jsonrequired
resourceOrnsArray of strings, [ 1 .. 10 ] itemsrequired

Resources assigned to labels (in ORN format)

labelValueIdsArray of strings, [ 1 .. 10 ] itemsrequired

Labels assigned to resources in the resourceOrns list

POST
/governance/api/v1/resource-labels/assign
curl -i -X POST \
  https://okta-subdomain.pixtulate.com/governance/api/v1/resource-labels/assign \
  -H 'Content-Type: application/json' \
  -d '{
    "resourceOrns": [
      "orn:okta:idp:00o11edPwGqbUrsDm0g4:apps:oidc:0oafxqCAJWWGELFTYASJ",
      "orn:okta:directory:00o11edPwGqbUrsDm0g4:groups:00g10ctakVI6XlTdk0g4",
      "orn:okta:governance:00o11edPwGqbUrsDm0g4:entitlement-bundles:enbogpaj3XUzcM62u1d6",
      "orn:okta:governance:00o11edPwGqbUrsDm0g4:collections:cologpaj3XUzcM62u1d6",
      "orn:okta:governance:00o11rndFqmZ5rNfs0g4:entitlement-values:ent63C22YQoNMWOJf0g2"
    ],
    "labelValueIds": [
      "lblo3v6xlwdtEX2il1d1",
      "lblo3v6xlwdtEX2il1d2"
    ]
  }'

Responses

A list of resources with labels

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(resource-label)required

Resources with labels

Response
{ "data": [ {}, {}, {}, {} ] }