Get all the ProjectRoles available in Jira. Currently this list is global.
This request has no parameters.
Returns full details of the roles available in Jira.
1
2
3
4
curl --request GET \
--url 'http://{baseurl}/rest/api/2/role' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
Creates a new ProjectRole to be available in Jira. The created role does not have any default actors assigned.
The role to create
string
string
Returns full details of the created role
1
2
3
4
5
curl --request POST \
--url 'http://{baseurl}/rest/api/2/role' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Get a specific ProjectRole available in Jira.
integer
RequiredReturns full details of the role available in Jira.
1
2
3
4
curl --request GET \
--url 'http://{baseurl}/rest/api/2/role/{id}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
Fully updates a roles. Both name and description must be given.
integer
Requiredstring
string
Returns updated role.
1
2
3
4
5
curl --request PUT \
--url 'http://{baseurl}/rest/api/2/role/{id}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Partially updates a roles name or description.
integer
Requiredstring
string
Returns updated role.
1
2
3
4
5
curl --request POST \
--url 'http://{baseurl}/rest/api/2/role/{id}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Deletes a role. May return 403 in the future
integer
Requiredinteger
Returned if the delete was successful.
1
2
3
curl --request DELETE \
--url 'http://{baseurl}/rest/api/2/role/{id}' \
--user 'email@example.com:<api_token>'
Gets default actors for the given role.
integer
RequiredReturns actor list.
1
2
3
4
curl --request GET \
--url 'http://{baseurl}/rest/api/2/role/{id}/actors' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
Adds default actors to the given role. The request data should contain a list of usernames or a list of groups to add.
integer
Requiredarray<string>
array<string>
Returns actor list.
1
2
3
4
5
curl --request POST \
--url 'http://{baseurl}/rest/api/2/role/{id}/actors' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Removes default actor from the given role.
integer
Requiredstring
string
Returns updated actors list.
1
2
3
4
curl --request DELETE \
--url 'http://{baseurl}/rest/api/2/role/{id}/actors' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
Rate this page: