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

Update application roles

Updates the ApplicationRoles with the passed data if the version hash is the same as the server. Only the groups and default groups setting of the role may be updated. Requests to change the key or the name of the role will be silently ignored. It is acceptable to pass only the roles that are updated as roles that are present in the server but not in data to update with, will not be deleted.

PUT/api/2/applicationrole
Authorization
AuthorizationBasic auth · headerrequired

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

Header parameters
If-Matchstring
Request body
application/json

the data to update the roles with.

defaultGroupsstring[]
definedboolean
groupsstring[]
hasUnlimitedSeatsboolean
keystring
namestring
numberOfSeatsinteger<int32>
platformboolean
remainingSeatsinteger<int32>
selectedByDefaultboolean
userCountinteger<int32>
userCountDescriptionstring
Responses
200

Returns the updated ApplicationRoles if the update was successful.

defaultGroupsstring[]
definedboolean
groupsstring[]
hasUnlimitedSeatsboolean
keystring
namestring
numberOfSeatsinteger<int32>
platformboolean
remainingSeatsinteger<int32>
selectedByDefaultboolean
userCountinteger<int32>
userCountDescriptionstring
401

Returned if the current user does not have permission to edit roles.

403

Returned if the current user is not an administrator.

404

Returned if the role does not exist.

412

Returned if the versionHash is not null and contains a different version to the server.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'http://jira.example.com/rest/api/2/applicationrole' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "defaultGroups": [
    "jira-software-users"
  ],
  "defined": false,
  "groups": [
    "jira-software-users",
    "jira-testers"
  ],
  "hasUnlimitedSeats": false,
  "key": "jira-software",
  "name": "Jira Software",
  "numberOfSeats": 10,
  "platform": false,
  "remainingSeats": 5,
  "selectedByDefault": false,
  "userCount": 5,
  "userCountDescription": "5 developers"
}'
Response
{
  "defaultGroups": [
    "jira-software-users"
  ],
  "defined": false,
  "groups": [
    "jira-software-users",
    "jira-testers"
  ],
  "hasUnlimitedSeats": false,
  "key": "jira-software",
  "name": "Jira Software",
  "numberOfSeats": 10,
  "platform": false,
  "remainingSeats": 5,
  "selectedByDefault": false,
  "userCount": 5,
  "userCountDescription": "5 developers"
}

Was this page helpful?