Skip to main content
PUT
/
api
/
roles
/
{roleId}
Update role
curl --request PUT \
  --url https://api.example.com/api/roles/{roleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "allProjects": true,
  "description": "<string>",
  "idpGroups": [
    "<string>"
  ],
  "projectPermissions": [
    "owner"
  ],
  "projectFilePermissions": [],
  "users": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "projects": []
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "allProjects": true,
  "organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "description": "<string>",
  "idpGroups": [
    "<string>"
  ],
  "projectPermissions": [
    "owner"
  ],
  "projectFilePermissions": [
    {
      "effect": "allow",
      "id": "<string>",
      "actions": [
        "visible"
      ],
      "patterns": "<string>"
    }
  ],
  "groups": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "description": "<string>",
      "project": {
        "name": "<string>"
      },
      "roleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "users": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "[email protected]",
      "firstName": "<string>",
      "lastName": "<string>"
    }
  ],
  "organisation": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Personal access token is obtained through your profile

Path Parameters

roleId
string<uuid>
required

Unique identifier of the role to update

Body

application/json
name
string
required

Updated name of the role

allProjects
boolean
required

Whether this role should apply to all projects

description
string

Updated description of the role

idpGroups
string[] | null

Updated identity provider groups to map to this role

Identity provider group name

projectPermissions
enum<string>[]

Updated list of project-level permissions to grant

Permission type

Available options:
owner,
documents,
releases,
releases:manage,
releases:deploy,
releases:delete,
integrations:manage,
documents:full,
documents:view-content,
documents:edit-content,
documents:edit-view,
branches,
branches:create,
branches:merge,
branches:delete,
project:manage,
environments,
environments:manage,
environments:delete
projectFilePermissions
object[] | null

Updated file-level permissions to grant

users
string<uuid>[]

Updated list of user IDs to assign to this role

User ID

projects
string<uuid>[]

Updated list of project IDs this role applies to (ignored if allProjects is true)

Project ID

Response

200 - application/json

The updated role

The updated role

id
string<uuid>
required

Unique identifier of the role

name
string
required

Name of the role

allProjects
boolean
required

Whether this role applies to all projects

organisationId
string<uuid>
required

ID of the organisation this role belongs to

createdAt
string
required

Timestamp when the role was created

updatedAt
string
required

Timestamp when the role was last updated

description
string | null

Description of the role

idpGroups
string[] | null

Identity provider groups mapped to this role

projectPermissions
enum<string>[] | null

List of project-level permissions granted by this role

Available options:
owner,
documents,
releases,
releases:manage,
releases:deploy,
releases:delete,
integrations:manage,
documents:full,
documents:view-content,
documents:edit-content,
documents:edit-view,
branches,
branches:create,
branches:merge,
branches:delete,
project:manage,
environments,
environments:manage,
environments:delete
projectFilePermissions
object[] | null

File-level permissions granted by this role

groups
object[]

Groups associated with this role

users
object[]

Users assigned to this role

organisation
object

Organisation this role belongs to