Cloud
Jira Service Management ops / Reference / REST API

Custom user roles

Postman Collection
OpenAPI
GET

Get custom user roleExperimental

Returns details of a custom user role.

  • The user should have admin role and custom user role right.
read:ops-config:jira-service-management

Request

Path parameters

identifier

string

Required

Query parameters

identifierType

string

Responses

Returned if the request is successful.

application/json

GetCustomUserRoleResponse
GET/v1/roles/{identifier}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/roles/{identifier}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "id": "288c1908-2337-47c0-8a15-9d80fb12aaaa", "name": "FinanceRole", "extendedRole": "user", "grantedRights": [ "alert-action", "alert-create" ], "disallowedRights": [ "alert-delete", "alert-delete-note", "alert-close", "alert-close-all" ] }
PUT

Update custom user roleExperimental

Updates the details of a custom user role.

  • The user should have admin role and custom user role right.
read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Path parameters

identifier

string

Required

Query parameters

identifierType

string

Request bodyapplication/json

id

string

name

string

grantedRights

array<string>

disallowedRights

array<string>

Responses

Returned if the request is successful.

application/json

CustomUserRoleSuccessResponse
PUT/v1/roles/{identifier}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 curl --request PUT \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/roles/{identifier}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "conflictRightRole_1", "grantedRights": [ "alerts-access-all", "incident-add-note", "asdasdad" ], "disallowedRights": [ "incident-reopen" ] }'
200Response
1 2 3 4 5 6 7 { "message": "Updated", "data": { "id": "44a48324-f5f9-45af-b8c9-02978ab0aaaa", "name": "FinanceRole" } }
DEL

Delete custom user role.Experimental

Deletes a custom user role.

  • The user should have admin role and custom user role right.
read:ops-config:jira-service-management
,
delete:ops-config:jira-service-management

Request

Path parameters

identifier

string

Required

Query parameters

identifierType

string

Responses

Returned if the request is successful.

DEL/v1/roles/{identifier}
1 2 3 curl --request DELETE \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/roles/{identifier}' \ --user 'email@example.com:<api_token>'
POST

Assign custom user roleExperimental

Assignes a custom user role to a user.

  • The user should have admin role and custom user role right.
  • Assignment on the admin roles can be done through Atlassian Administration.
read:ops-config:jira-service-management
,
write:ops-config:jira-service-management

Request

Request bodyapplication/json

accountId

string

Required
roleId

string

Required

Responses

Returned if the request is successful.

application/json

CustomRolesPaginatedResponse
POST/v1/roles/assign
1 2 3 4 5 6 7 8 9 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/roles/assign' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "accountId": "630a55c646556c72662aaaaa", "roleId": "44a48324-f5f9-45af-b8c9-02978aaaaaaa" }'
200Response
1 2 3 4 5 6 7 { "message": "Created", "data": { "id": "b08dc67b-a19d-4d84-925a-eaa9e13a8aa1", "name": "FinanceRole" } }
GET

List custom user rolesExperimental

Returns the list of the custom user roles.

  • The user should have admin role and custom user role right.
read:ops-config:jira-service-management

Request

Query parameters

offset

integer

size

integer

Responses

Returned if the request is successful.

application/json

PaginatedResponseCustomUserRoleSummaryResponse
GET/v1/roles
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/roles' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "values": [ { "id": "288c1908-2337-47c0-8a15-9d80fb1256ea", "name": "FinanceRole" }, { "id": "2c8f2e0b-4784-4276-a3c9-040e8bc299ab", "name": "DeveloperRole" }, { "id": "33579c31-627c-4cc1-bb94-fd2c214142f7", "name": "SRERole" } ], "links": { "next": "/v1/roles?offset=20&size=3", "last": "/v1/roles?offset=20&size=3" } }
POST

Create custom user roleExperimental

Creates a new custom user role.

  • The user should have admin role and custom user role right.
read:ops-config:jira-service-management

Request

Request bodyapplication/json

name

string

Required
grantedRights

array<string>

disallowedRights

array<string>

Responses

Returned if the request is successful.

application/json

CustomUserRoleSuccessResponse
POST/v1/roles
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 curl --request POST \ --url 'https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/roles' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "Pre req Rest Api 3", "grantedRights": [ "alert-action", "alert-create", "alert-add-note" ], "disallowedRights": [ "alert-delete" ] }'
200Response
1 2 3 4 5 6 7 { "message": "Created", "data": { "id": "b08dc67b-a19d-4d84-925a-eaa9e13a8aa1", "name": "FinanceRole" } }

Rate this page: