permissionscheme
create-permission-grant
Create permission grant
Creates a permission grant in a permission scheme.
Permissions required: Administer Jira global permission.
POST /rest/api/3/permissionscheme/{schemeId}/permission
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: |
permissionsReturns all permission grants for each permission scheme.userReturns information about the user who is granted the permission.groupReturns information about the group that is granted the permission.projectRoleReturns information about the project role granted the permission.fieldReturns information about the custom field granted the permission.allReturns all expandable information. | |--schemeId| string | Yes | The ID of the permission scheme in which to create a new permission grant. |
Example:
jr permissionscheme create-permission-grant --schemeId <schemeId>create-permission-scheme
Create permission scheme
Creates a new permission scheme. You can create a permission scheme with or without defining a set of permission grants.
Permissions required: Administer Jira global permission.
POST /rest/api/3/permissionscheme
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: |
allReturns all expandable information.fieldReturns information about the custom field granted the permission.groupReturns information about the group that is granted the permission.permissionsReturns all permission grants for each permission scheme.projectRoleReturns information about the project role granted the permission.userReturns information about the user who is granted the permission. |
Example:
jr permissionscheme create-permission-schemedelete-permission-scheme
Delete permission scheme
Deletes a permission scheme.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/permissionscheme/{schemeId}
| Flag | Type | Required | Description |
|---|---|---|---|
--schemeId | string | Yes | The ID of the permission scheme being deleted. |
Example:
jr permissionscheme delete-permission-scheme --schemeId <schemeId>delete-permission-scheme-entity
Delete permission scheme grant
Deletes a permission grant from a permission scheme. See About permission schemes and grants for more details.
Permissions required: Administer Jira global permission.
DELETE /rest/api/3/permissionscheme/{schemeId}/permission/{permissionId}
| Flag | Type | Required | Description |
|---|---|---|---|
--permissionId | string | Yes | The ID of the permission grant to delete. |
--schemeId | string | Yes | The ID of the permission scheme to delete the permission grant from. |
Example:
jr permissionscheme delete-permission-scheme-entity --permissionId <permissionId> --schemeId <schemeId>get-all-permission-schemes
Get all permission schemes
Returns all permission schemes.
About permission schemes and grants
A permission scheme is a collection of permission grants. A permission grant consists of a holder and a permission.
Holder object
The holder object contains information about the user or group being granted the permission. For example, the Administer projects permission is granted to a group named Teams in space administrators. In this case, the type is "type": "group", and the parameter is the group name, "parameter": "Teams in space administrators" and the value is group ID, "value": "ca85fac0-d974-40ca-a615-7af99c48d24f".
The holder object is defined by the following properties:
typeIdentifies the user or group (see the list of types below).parameterAs a group's name can change, use ofvalueis recommended. The value of this property depends on thetype. For example, if thetypeis a group, then you need to specify the group name.valueThe value of this property depends on thetype. If thetypeis a group, then you need to specify the group ID. For othertypeit has the same value asparameter
The following types are available. The expected values for parameter and value are given in parentheses (some types may not have a parameter or value):
anyoneGrant for anonymous users.applicationRoleGrant for users with access to the specified application (application name, application name). See Update product access settings for more information.assigneeGrant for the user currently assigned to an issue.groupGrant for the specified group (parameter: group name,value: group ID).groupCustomFieldGrant for a user in the group selected in the specified custom field (parameter: custom field ID,value: custom field ID).projectLeadGrant for a project lead.projectRoleGrant for the specified project role (parameter:project role ID,value: project role ID).reporterGrant for the user who reported the issue.sd.customer.portal.onlyJira Service Desk only. Grants customers permission to access the customer portal but not Jira. See Customizing Jira Service Desk permissions for more information.userGrant for the specified user (parameter: user ID - historically this was the userkey but that is deprecated and the account ID should be used,value: user ID).userCustomFieldGrant for a user selected in the specified custom field (parameter: custom field ID,value: custom field ID).
Built-in permissions
The built-in Jira permissions are listed below. Apps can also define custom permissions. See the project permission and global permission module documentation for more information.
Administration permissions
ADMINISTER_PROJECTSEDIT_WORKFLOWEDIT_ISSUE_LAYOUT
Project permissions
BROWSE_PROJECTSMANAGE_SPRINTS_PERMISSION(Jira Software only)SERVICEDESK_AGENT(Jira Service Desk only)VIEW_DEV_TOOLS(Jira Software only)VIEW_READONLY_WORKFLOW
Issue permissions
ASSIGNABLE_USERASSIGN_ISSUESCLOSE_ISSUESCREATE_ISSUESDELETE_ISSUESEDIT_ISSUESLINK_ISSUESMODIFY_REPORTERMOVE_ISSUESRESOLVE_ISSUESSCHEDULE_ISSUESSET_ISSUE_SECURITYTRANSITION_ISSUES
Voters and watchers permissions
MANAGE_WATCHERSVIEW_VOTERS_AND_WATCHERS
Comments permissions
ADD_COMMENTSDELETE_ALL_COMMENTSDELETE_OWN_COMMENTSEDIT_ALL_COMMENTSEDIT_OWN_COMMENTS
Attachments permissions
CREATE_ATTACHMENTSDELETE_ALL_ATTACHMENTSDELETE_OWN_ATTACHMENTS
Time tracking permissions
DELETE_ALL_WORKLOGSDELETE_OWN_WORKLOGSEDIT_ALL_WORKLOGSEDIT_OWN_WORKLOGSWORK_ON_ISSUES
Permissions required: Permission to access Jira.
GET /rest/api/3/permissionscheme
| Flag | Type | Required | Description |
|---|---|---|---|
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: |
allReturns all expandable information.fieldReturns information about the custom field granted the permission.groupReturns information about the group that is granted the permission.permissionsReturns all permission grants for each permission scheme.projectRoleReturns information about the project role granted the permission.userReturns information about the user who is granted the permission. |
Example:
jr permissionscheme get-all-permission-schemesget-permission-scheme
Get permission scheme
Returns a permission scheme.
Permissions required: Permission to access Jira.
GET /rest/api/3/permissionscheme/{schemeId}
| Flag | Type | Required | Description |
|---|---|---|---|
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are included when you specify any value. Expand options include: |
allReturns all expandable information.fieldReturns information about the custom field granted the permission.groupReturns information about the group that is granted the permission.permissionsReturns all permission grants for each permission scheme.projectRoleReturns information about the project role granted the permission.userReturns information about the user who is granted the permission. | |--schemeId| string | Yes | The ID of the permission scheme to return. |
Example:
jr permissionscheme get-permission-scheme --schemeId <schemeId>get-permission-scheme-grant
Get permission scheme grant
Returns a permission grant.
Permissions required: Permission to access Jira.
GET /rest/api/3/permissionscheme/{schemeId}/permission/{permissionId}
| Flag | Type | Required | Description |
|---|---|---|---|
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: |
allReturns all expandable information.fieldReturns information about the custom field granted the permission.groupReturns information about the group that is granted the permission.permissionsReturns all permission grants for each permission scheme.projectRoleReturns information about the project role granted the permission.userReturns information about the user who is granted the permission. | |--permissionId| string | Yes | The ID of the permission grant. | |--schemeId| string | Yes | The ID of the permission scheme. |
Example:
jr permissionscheme get-permission-scheme-grant --permissionId <permissionId> --schemeId <schemeId>get-permission-scheme-grants
Get permission scheme grants
Returns all permission grants for a permission scheme.
Permissions required: Permission to access Jira.
GET /rest/api/3/permissionscheme/{schemeId}/permission
| Flag | Type | Required | Description |
|---|---|---|---|
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: |
permissionsReturns all permission grants for each permission scheme.userReturns information about the user who is granted the permission.groupReturns information about the group that is granted the permission.projectRoleReturns information about the project role granted the permission.fieldReturns information about the custom field granted the permission.allReturns all expandable information. | |--schemeId| string | Yes | The ID of the permission scheme. |
Example:
jr permissionscheme get-permission-scheme-grants --schemeId <schemeId>update-permission-scheme
Update permission scheme
Updates a permission scheme. Below are some important things to note when using this resource:
- If a permissions list is present in the request, then it is set in the permission scheme, overwriting all existing grants.
- If you want to update only the name and description, then do not send a permissions list in the request.
- Sending an empty list will remove all permission grants from the permission scheme.
If you want to add or delete a permission grant instead of updating the whole list, see Create permission grant or Delete permission scheme entity.
See About permission schemes and grants for more details.
Permissions required: Administer Jira global permission.
PUT /rest/api/3/permissionscheme/{schemeId}
| Flag | Type | Required | Description |
|---|---|---|---|
--body | string | No | request body (JSON string, @file, or - for stdin) |
--expand | string | No | Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: |
allReturns all expandable information.fieldReturns information about the custom field granted the permission.groupReturns information about the group that is granted the permission.permissionsReturns all permission grants for each permission scheme.projectRoleReturns information about the project role granted the permission.userReturns information about the user who is granted the permission. | |--schemeId| string | Yes | The ID of the permission scheme to update. |
Example:
jr permissionscheme update-permission-scheme --schemeId <schemeId>