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>"
}
}Updates an existing role with new permissions, users, and project assignments.
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>"
}
}Personal access token is obtained through your profile
Unique identifier of the role to update
Updated name of the role
Whether this role should apply to all projects
Updated description of the role
Updated identity provider groups to map to this role
Identity provider group name
Updated list of project-level permissions to grant
Permission type
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 Updated file-level permissions to grant
Show child attributes
Updated list of user IDs to assign to this role
User ID
Updated list of project IDs this role applies to (ignored if allProjects is true)
Project ID
The updated role
The updated role
Unique identifier of the role
Name of the role
Whether this role applies to all projects
ID of the organisation this role belongs to
Timestamp when the role was created
Timestamp when the role was last updated
Description of the role
Identity provider groups mapped to this role
List of project-level permissions granted by this role
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 File-level permissions granted by this role
Show child attributes
Groups associated with this role
Show child attributes
Users assigned to this role
Show child attributes
Organisation this role belongs to
Show child attributes
Was this page helpful?