Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Add actor to project role

Adds an actor (user or group) to a project role. For user actors, their usernames should be used.

POST/api/2/project/{projectIdOrKey}/role/{id}
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Path parameters
projectIdOrKeystringrequired

The project id or project key

idinteger<int64>required

The project role id

Request body
requiredapplication/json

The actors to add to the role

emptyboolean
Responses
200

Role details and its actors after modification

actorsRoleActorBean[]
Show properties
Array of RoleActorBean
namestring
descriptionstring
idinteger<int64>
namestring
selfstring<uri>
404

Returned if the project or role is not found, the calling user does not have permission to view it or does not have permission to modify the actors in the project role.

410

Returned if none of the specified groups and users exist.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'http://jira.example.com/rest/api/2/project/string/role/0' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "empty": true,
  "property1": [
    "string"
  ],
  "property2": [
    "string"
  ]
}'
Response
{
  "actors": [
    {
      "name": "jira-developers"
    }
  ],
  "description": "A project role that represents developers in a project",
  "id": 10360,
  "name": "Developers",
  "self": "http://www.example.com/jira/rest/api/2/project/MKY/role/10360"
}

Was this page helpful?