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

Update a permission scheme

Updates a permission scheme. If the permissions list is present then it will be set in the permission scheme, which basically means it will overwrite any permission grants that existed in the permission scheme. Sending an empty list will remove all permission grants from the permission scheme. To update just the name and description, do not send permissions list at all. To add or remove a single permission grant instead of updating the whole list at once use the {schemeId}/permission/ resource.

PUT/api/2/permissionscheme/{schemeId}
Authorization
AuthorizationBasic auth · headerrequired

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

Path parameters
schemeIdinteger<int64>required

The id of the permission scheme.

Query parameters
expandstring

Use expand to include full beans in the response. This parameter accepts a comma-separated list of expandable elements. Use 'permissions' to include permissions in the response.

Request body
application/json
descriptionstring
expandstring
idinteger<int64>
namestring
permissionsPermissionGrantBean[]
Show properties
Array of PermissionGrantBean
holderPermissionHolderBean
Show properties
expandstring
fieldFieldBean
Show properties
clauseNamesstring[]
customboolean
idstring
namestring
navigableboolean
orderableboolean
schemaJsonTypeBean
Show properties
customstring
customIdinteger<int64>
itemsstring
systemstring
typestring
searchableboolean
groupGroupJsonBean
Show properties
namestring
selfstring<uri>
parameterstring
projectRoleProjectRoleBean
Show properties
actorsRoleActorBean[]
Show properties
Array of RoleActorBean
avatarUrlstring<uri>
namestring
descriptionstring
idinteger<int64>
namestring
selfstring<uri>
typestring
userUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
idinteger<int64>
permissionstring
selfstring<uri>
selfstring<uri>
Responses
200

Returned if the scheme is updated successfully.

descriptionstring
expandstring
idinteger<int64>
namestring
permissionsPermissionGrantBean[]
Show properties
Array of PermissionGrantBean
holderPermissionHolderBean
Show properties
expandstring
fieldFieldBean
Show properties
clauseNamesstring[]
customboolean
idstring
namestring
navigableboolean
orderableboolean
schemaJsonTypeBean
Show properties
customstring
customIdinteger<int64>
itemsstring
systemstring
typestring
searchableboolean
groupGroupJsonBean
Show properties
namestring
selfstring<uri>
parameterstring
projectRoleProjectRoleBean
Show properties
actorsRoleActorBean[]
Show properties
Array of RoleActorBean
namestring
descriptionstring
idinteger<int64>
namestring
selfstring<uri>
typestring
userUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
idinteger<int64>
permissionstring
selfstring<uri>
selfstring<uri>
401

Returned if user is not logged in.

403

Returned if user is not allowed to edit permission schemes.

404

Returned if the permission is not found.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'http://jira.example.com/rest/api/2/permissionscheme/0' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "description",
  "expand": "string",
  "id": 10100,
  "name": "permission scheme name",
  "permissions": [
    {
      "holder": {
        "expand": "string",
        "field": {
          "clauseNames": "[description]",
          "custom": false,
          "id": "description",
          "name": "Description",
          "navigable": true,
          "orderable": true,
          "schema": {},
          "searchable": true
        },
        "group": {
          "name": "jira-administrators",
          "self": "http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"
        },
        "parameter": "admin",
        "projectRole": {
          "actors": [
            {
              "avatarUrl": "http://example.com",
              "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"
        },
        "type": "user",
        "user": {
          "active": true,
          "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
          "displayName": "Fred F. User",
          "emailAddress": "fred@example.com",
          "key": "fred",
          "name": "Fred",
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "timeZone": "Australia/Sydney"
        }
      },
      "id": 10100,
      "permission": "permission scheme name",
      "self": "http://www.example.com/jira/rest/api/2/permissionscheme/10100"
    }
  ],
  "self": "http://www.example.com/jira/rest/api/2/permissionscheme/10100"
}'
Response
{
  "description": "description",
  "expand": "string",
  "id": 10100,
  "name": "permission scheme name",
  "permissions": [
    {
      "holder": {
        "expand": "string",
        "field": {
          "clauseNames": "[description]",
          "custom": false,
          "id": "description",
          "name": "Description",
          "navigable": true,
          "orderable": true,
          "schema": {},
          "searchable": true
        },
        "group": {
          "name": "jira-administrators",
          "self": "http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"
        },
        "parameter": "admin",
        "projectRole": {
          "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"
        },
        "type": "user",
        "user": {
          "active": true,
          "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
          "displayName": "Fred F. User",
          "emailAddress": "fred@example.com",
          "key": "fred",
          "name": "Fred",
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "timeZone": "Australia/Sydney"
        }
      },
      "id": 10100,
      "permission": "permission scheme name",
      "self": "http://www.example.com/jira/rest/api/2/permissionscheme/10100"
    }
  ],
  "self": "http://www.example.com/jira/rest/api/2/permissionscheme/10100"
}

Was this page helpful?