Docs
Live demo
PUT/api/v2/organizations/{id}/roles/{role_id}

Replace the name, description and permissions of a custom role. Members, groups and tokens that hold the role get the new permissions on their next request. Every permission of the role, before and after the change, must be a permission of the caller. Needs members:manage.

Returns 403 (role_exceeds_caller) if permissions exceed caller’s.

Parameters

Path2 required of 2
idstringpathrequired

Organization ID (UUID)

role_idstring · uuidpathrequired

Custom role ID (UUID)

Request body application/json · OrgCustomRoleRequest

Required2 of 3 fields
namestringrequired
max length 64
permissionsarray of string (OrgPermission)required

A manage or access:apply permission also brings the read permission of its area and jobs:read. Drift and applications permissions also bring targets:read, access:manage, access:apply and applications:manage also bring targets:read and identities:read.

access:applyaccess:manageaccess:readapplications:manageapplications:readaudit:readdrift:managedrift:readidentities:manageidentities:readjobs:managejobs:readmembers:managemembers:readnotifications:managenotifications:readorganization:readsecurity:managesecurity:readtargets:managetargets:readtokens:managetokens:read
min items 1
Optional1 field
descriptionstring
max length 500

Responses

200

OK

OrgCustomRoleResponse · 9 fields
idstring · uuidrequired
namestringrequired
descriptionstringrequired
permissionsarray of string (OrgPermission)required
access:applyaccess:manageaccess:readapplications:manageapplications:readaudit:readdrift:managedrift:readidentities:manageidentities:readjobs:managejobs:readmembers:managemembers:readnotifications:managenotifications:readorganization:readsecurity:managesecurity:readtargets:managetargets:readtokens:managetokens:read
membersintegerrequired

Members of the organization who hold the role on top of their built-in role.

groupsintegerrequired

Groups that give the role to their direct members.

tokensintegerrequired

Usable API tokens that hold the role.

created_atstring · date-timerequired
updated_atstring · date-timerequired
400

Bad Request: the name is empty or too long, or a permission is not in the permission list.

403

Forbidden: the caller lacks members:manage, or the role names permissions the caller does not have (details.reason=role_exceeds_caller, details.missing_permissions lists them).

404

Not Found: the organization, role or group does not exist or belongs to another organization.

409

Conflict: another role of the organization has this name. Also (details.error_code organization_administrator_required) the change would leave the organization without a person who holds every permission and can sign in.

Common errors: 401 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close