Editing permission schemes using REST APIs
You need administrator rights in Jira to perform the tasks on this page.
Permission schemes only affect what users can do through the UI. Permissions schemes don’t restrict what users can do through scripting or the API.
To improve readability, all JSON results will be beautified, whereas the actual results will not.
Request URI
The base request URI for all APIs on this page is as follows:
http://{JIRA Instance Name}/rest/com.okapya.jira.checklist/latest/permissions
See Configuring checklists using REST APIs: Base configuration path for more help with the Request URI.
Permission Scheme APIs
Create permission scheme
POST [...]/permissions
You can create a new permission scheme in the field configuration.
Description | Example | |
---|---|---|
Request | A JSON representation of the permission rule to create. The JSON can be simplified to only include the required fields, such as the name. Only the |
JSON
or
JSON
|
Response | Returns the full JSON representation of the newly created item. |
JSON
|
Get all permission schemes
GET [...]/permissions
You can get all permission schemes and their content, with the option to include metadata.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Response | Returns the full JSON representation of the list of permission schemes. | The following example has the
JSON
|
Get a single permission scheme
GET [...]/permissions/{permissionSchemeId}
By providing a permission scheme ID, you can get the contents of a single scheme, with the option to include metadata.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Response | Returns the full JSON representation of the requested scheme. | The following example does not have the
JSON
|
Update a permission scheme
PUT [...]/permissions/{permissionSchemeId}
You can update the specified scheme’s content, with the option to include metadata in the response.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Request | A JSON representation of the fields to update, including their values. To keep updating simple, you only have to list the fields and values that you want to update. Only the |
JSON
or
JSON
|
Response | Returns the full JSON representation of the updated scheme. |
JSON
|
See where a permission scheme is in use
GET [...]/permissions/{permissionSchemeId}/usage
You can query to find out how many field configuration contexts currently use the permission scheme.
Description | Example | |
---|---|---|
Response | Returns a JSON representation of the list of field configuration contexts (IDs and names) where the permission scheme is used. |
JSON
|
Delete
DELETE [...]/permissions/{permissionSchemeId}
You can delete a permission scheme.
Permission Scheme Rules APIs
Create rule
POST [...]/permissions/{permissionSchemeId}/rules
You can create a new permission scheme in the field configuration, with the option to include metadata in the response.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Request | A JSON representation of the permission rule to create. |
JSON
|
Response | Returns the full JSON representation of the newly created item. |
JSON
|
Get all rules inside a permission scheme
GET [...]/permissions/{permissionSchemeId}/rules
You can get all of a permission scheme’s rules, with the option to include metadata.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Response | Returns the full JSON representation of the list of permission schemes. | The following example has the
JSON
|
Get a single rule from a permission scheme
GET [...]/permissions/{permissionSchemeId}/rules/{ruleId}
By providing a rule ID, you can get the contents of a single rule.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Response | Returns the full JSON representation of the requested scheme. | The following example does not have the
JSON
|
Update a rule inside a permission scheme
PUT [...]/permissions/{permissionSchemeId}/rules/{ruleId}
You can update the specified rule’s content.
Description | Example | |
---|---|---|
Query parameters | OPTIONAL
|
|
Request | A JSON representation of the fields to update, including their values. To keep updating simple, you only have to list the fields and values that you want to update. |
JSON
or
JSON
or
JSON
|
Response | Returns the full JSON representation of the updated scheme. |
JSON
|
Delete a rule from a permission scheme
DELETE [...]/permissions/{permissionSchemeId}/rules/{ruleId}
You can delete a rule from a permission scheme.
Exceptions
For the list of potential exceptions, see Exceptions for configuration REST APIs: Permission schemes.