The Labels API enables you to categorize and organize resources such as apps, groups, entitlements, and collections. You can create, update, and assign key-value labels to resources to support automation, streamline configuration, and simplify the management of access reviews and requests.
Creates a label that includes the key name of the label and its values
Resource label created successfully
A request failed validation
When authentication fails
When authorization fails
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "name": "Compliance",
- "values": [
- {
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}, - {
- "name": "PII",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
]
}
{- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}, - {
- "labelValueId": "lblo3v6xlwdtEX2il1d6",
- "name": "PII",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d6"
}
}
}
Lists all labels
filter | string <scim-filter> A filter expression that returns entries based on the following properties and supported operators:
filter=values.name sw "SOD" filter=values.name co "SOD" |
A list of labels
When authentication fails
When authorization fails
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "data": [
- {
- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}, - {
- "labelValueId": "lblo3v6xlwdtEX2il1d6",
- "name": "PII",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d6"
}
}
}, - {
- "labelId": "lbco3v6xlwdtEX2il1d7",
- "name": "Security",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d2",
- "name": "GDPR",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/labels"
}
}
}
Deletes a label key and its associated label values
Note: You can only delete a label key if there are no associated label values assigned to any resources.
Label deleted successfully
When authentication fails
When authorization fails
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "errorCode": "E0000004",
- "errorSummary": "Authentication failed.",
- "errorLink": "E0000004",
- "errorId": "oaeWCGz73hpRCG75VHP6-RRXw",
- "errorCauses": [ ]
}
Retrieves a single label
Resource label retrieved successfully
When authentication fails
When authorization fails
When the requested resource wasn't found
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}, - {
- "labelValueId": "lblo3v6xlwdtEX2il1d6",
- "name": "PII",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d6"
}
}
}
Updates the properties of a label
Resource label updated successfully
A request failed validation
When authentication fails
When authorization fails
When the requested resource wasn't found
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
Request body for updating label category
[- {
- "op": "REPLACE",
- "path": "/name",
- "value": "Compliance",
- "refType": "LABEL-CATEGORY"
}
]
{- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}, - {
- "labelValueId": "lblo3v6xlwdtEX2il1d6",
- "name": "PII",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d6"
}
}
}
Lists all labeled resources
Note: If you create a custom admin role to view labeled resources, ensure that the custom role has permissions to view the resource and governance labels. For example, to view labeled apps, the custom admin role must have the
okta.apps.read
and theokta.governance.labels.read
permissions.
after | string The pagination cursor that points to the last record of the previous request. Example: after=00u68w6vzKLultXS97g6 |
filter required | string <scim-filter> A filter expression that returns entries based on the following properties and supported operators:
filter=orn eq "orn:okta:idp:00o11edPwGqbUrsDm0g4:apps:oidc:0oafxqCAJWWGELFTYASJ" filter=labelValueId eq "lblo3v6xlwdtEX2il1d6" AND resourceType eq "apps" filter=labelValueId eq "lblo3v6xlwdtEX2il1d6" AND resourceType eq "groups" filter=labelValueId eq "ento3v6xlwdtEX2il1d6" AND resourceType eq "entitlement-values" filter=labelValueId eq "ento3v6xlwdtEX2il1d6" AND resourceType eq "collections" filter=(labelValueId eq "lblo3v6xlwdtEX2il1d6" OR labelValueId eq "lblo3v6xlwdtEX2il1d7") AND resourceType eq "apps" filter=(labelValueId eq "lblo3v6xlwdtEX2il1d6" AND resourceType eq "apps") OR (labelValueId eq "lblo3v6xlwdtEX2il1d7" AND resourceType eq "groups") |
limit | integer [ 1 .. 200 ] Default: 20 The maximum number of records returned in a response |
A list of resources with labels
When authentication fails
When authorization fails
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "data": [
- {
- "orn": "orn:okta:idp:00o11edPwGqbUrsDm0g4:apps:oidc:0oafxqCAJWWGELFTYASJ",
- "profile": {
- "id": "0oafxqCAJWWGELFTYASJ",
- "name": "Github application",
- "description": "Github application"
}, - "labels": [
- {
- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}, - {
- "labelId": "lbco3v6xlwdtEX2il1d7",
- "name": "Security",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d2",
- "name": "GDPR",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}
]
}
], - "_links": {
- "self": {
- "href": "/governance/api/v1/resource-labels?filter=orn eq \"orn:okta:idp:00o11edPwGqbUrsDm0g4:apps:oidc:0oafxqCAJWWGELFTYASJ\""
}
}
}
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 theokta.governance.labels.manage
permissions.
labelValueIds required | Array of strings [ 1 .. 10 ] items Labels assigned to resources in the |
resourceOrns required | Array of strings <okta-resource-orn> [ 1 .. 10 ] items Resources assigned to labels (in ORN format) |
A list of resources with labels
A request failed validation
When authentication fails
When authorization fails
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "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"
]
}
{- "data": [
- {
- "orn": "orn:okta:idp:00o11edPwGqbUrsDm0g4:apps:oidc:0oafxqCAJWWGELFTYASJ",
- "profile": {
- "id": "0oafxqCAJWWGELFTYASJ",
- "name": "Github application",
- "description": "Github application"
}, - "labels": [
- {
- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}, - {
- "labelId": "lbco3v6xlwdtEX2il1d7",
- "name": "Security",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d2",
- "name": "GDPR",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}
]
}, - {
- "orn": "orn:okta:directory:00o11edPwGqbUrsDm0g4:groups:00g10ctakVI6XlTdk0g4",
- "profile": {
- "id": "00g10ctakVI6XlTdk0g4",
- "name": "Github user group",
- "description": "Github user group"
}, - "labels": [
- {
- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}, - {
- "labelId": "lbco3v6xlwdtEX2il1d7",
- "name": "Security",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d2",
- "name": "GDPR",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}
]
}, - {
- "orn": "orn:okta:governance:00o11edPwGqbUrsDm0g4:entitlement-bundles:enbogpaj3XUzcM62u1d6",
- "profile": {
- "id": "enbogpaj3XUzcM62u1d6",
- "name": "Github admin bundle",
- "description": "Github bundle for administrative access"
}, - "labels": [
- {
- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}, - {
- "labelId": "lbco3v6xlwdtEX2il1d7",
- "name": "Security",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d2",
- "name": "GDPR",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}
]
}, - {
- "orn": "orn:okta:governance:00o11edPwGqbUrsDm0g4:collections:cologpaj3XUzcM62u1d6",
- "profile": {
- "id": "cologpaj3XUzcM62u1d6",
- "name": "DevOps collection",
- "description": "Collection of DevOps resources"
}, - "labels": [
- {
- "labelId": "lbco3v6xlwdtEX2il1d6",
- "name": "Compliance",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d1",
- "name": "SOX",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "blue"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}, - {
- "labelId": "lbco3v6xlwdtEX2il1d7",
- "name": "Security",
- "values": [
- {
- "labelValueId": "lblo3v6xlwdtEX2il1d2",
- "name": "GDPR",
- "metadata": {
- "additionalProperties": {
- "backgroundColor": "yellow"
}
}
}
], - "_links": {
- "self": null,
- "href": "/governance/api/v1/labels/lbco3v6xlwdtEX2il1d7"
}
}
]
}
]
}
Removes the specified label values from resources
Note: If you create a custom admin role for assigning and unassigning labels to resources, ensure that the custom role has permissions to edit the resource and governance labels. For example, to unassign labels from apps, the custom admin role must have the
okta.apps.manage
and theokta.governance.labels.manage
permissions.
labelValueIds required | Array of strings [ 1 .. 10 ] items Labels assigned to resources in the |
resourceOrns required | Array of strings <okta-resource-orn> [ 1 .. 10 ] items Resources assigned to labels (in ORN format) |
Label deleted successfully
A request failed validation
When authentication fails
When authorization fails
When the rate limit has been exceeded
When there is a server fault due to an unexpected error
{- "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": [
- "lblo3v6xlwdtEX2il1d2"
]
}
{- "errorCode": "string",
- "errorId": "string",
- "errorSummary": "string",
- "errorLink": "string",
- "errorCauses": [
- {
- "errorSummary": "string",
- "reason": "string",
- "location": "string",
- "locationType": "string",
- "domain": "string"
}
]
}