curl --request POST \
--url https://api.example.com/api/roles \
--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>"
}
}Creates a new role with the specified permissions and project assignments.
curl --request POST \
--url https://api.example.com/api/roles \
--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
Name of the role
Whether this role should apply to all projects
Description of the role
Identity provider groups to map to this role
Identity provider group name
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 File-level permissions to grant
Show child attributes
List of user IDs to assign to this role
User ID
List of project IDs this role applies to (ignored if allProjects is true)
Project ID
The created role
The created 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?