Description: Adds a new role to the project.
Since: 7.17.4
Security: Requires a user assigned with the 'Administer the Platform' role or Project Admin permissions if admin_privileges.manage_resoures
is enabled.
Usage: POST /v1/projects/{project_key}/roles
Produces: application/json
Parameters:
Name | Description |
---|---|
(path) | The project key |
(body) | role object that needs to be added |
Header parameter: Authorization: Bearer
Sample Request:
{ "name": "senior developer", "actions": [ "READ_REPOSITORY" ], "type": "PREDEFINED", "environments": [ "DEV" ] }
Sample Response:
{ "name": "senior developer", "actions": [ "READ_REPOSITORY" ], "type": "CUSTOM", "environments": [ "DEV" ] }