GET

Get all permission schemes

Returns a list of all permission schemes. By default only shortened beans are returned. If you want to include permissions of all the schemes, then specify the permissions expand parameter. Permissions will be included also if you specify any other expand parameter.

Request

Query parameters

expand

string

Responses

List of all permission schemes

application/json

PermissionSchemesBean
GET/api/2/permissionscheme
1 2 3 4 curl --request GET \ --url 'http://{baseurl}/rest/api/2/permissionscheme' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
POST

Create a new permission scheme

Create a new permission scheme. This method can create schemes with a defined permission set, or without.

Request

Query parameters

expand

string

Request bodyapplication/json

description

string

expand

string

id

integer

name

string

permissions

array<PermissionGrantBean>

self

string

Responses

Returned if the scheme is created successfully.

application/json

PermissionSchemeBean
POST/api/2/permissionscheme
1 2 3 4 5 curl --request POST \ --url 'http://{baseurl}/rest/api/2/permissionscheme' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'
GET

Get scheme attribute by keyExperimental

Returns the attribute for a permission scheme specified by permission scheme id and attribute key.

Request

Path parameters

permissionSchemeId

integer

Required
attributeKey

string

Required

Responses

Permission scheme attribute

application/json

PermissionSchemeAttributeBean
GET/api/2/permissionscheme/{permissionSchemeId}/attribute/{attributeKey}
1 2 3 4 curl --request GET \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{permissionSchemeId}/attribute/{attributeKey}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
PUT

Update or insert a scheme attributeExperimental

Updates or inserts the attribute for a permission scheme specified by permission scheme id. The attribute consists of the key and the value. The value will be converted to Boolean using Boolean#valueOf.

Request

Path parameters

permissionSchemeId

integer

Required
key

string

Required

Request bodytext/plain

string

Responses

Returned if the attribute is updated successfully.

PUT/api/2/permissionscheme/{permissionSchemeId}/attribute/{key}
1 2 3 curl --request PUT \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{permissionSchemeId}/attribute/{key}' \ --user 'email@example.com:<api_token>'
GET

Get a permission scheme by ID

Returns a permission scheme identified by the given id.

Request

Path parameters

schemeId

integer

Required

Query parameters

expand

string

Responses

Permission scheme

application/json

PermissionSchemeBean
GET/api/2/permissionscheme/{schemeId}
1 2 3 4 curl --request GET \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
PUT

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.

Request

Path parameters

schemeId

integer

Required

Query parameters

expand

string

Request bodyapplication/json

description

string

expand

string

id

integer

name

string

permissions

array<PermissionGrantBean>

self

string

Responses

Returned if the scheme is updated successfully.

application/json

PermissionSchemeBean
PUT/api/2/permissionscheme/{schemeId}
1 2 3 4 5 curl --request PUT \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'
DEL

Delete a permission scheme by ID

Deletes a permission scheme identified by the given id.

Request

Path parameters

schemeId

integer

Required

Responses

Returned if the permission scheme is successfully deleted.

DEL/api/2/permissionscheme/{schemeId}
1 2 3 curl --request DELETE \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}' \ --user 'email@example.com:<api_token>'
GET

Get all permission grants of a scheme

Returns all permission grants of the given permission scheme.

Request

Path parameters

schemeId

integer

Required

Query parameters

expand

string

Responses

Permission grants

application/json

PermissionGrantsBean
GET/api/2/permissionscheme/{schemeId}/permission
1 2 3 4 curl --request GET \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}/permission' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
POST

Create a permission grant in a scheme

Creates a permission grant in a permission scheme.

Request

Path parameters

schemeId

integer

Required

Query parameters

expand

string

Request bodyapplication/json

holder

PermissionHolderBean

id

integer

permission

string

self

string

Responses

Returned if the scheme permission is created successfully.

application/json

PermissionGrantBean
POST/api/2/permissionscheme/{schemeId}/permission
1 2 3 4 5 curl --request POST \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}/permission' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'
GET

Get a permission grant by ID

Returns a permission grant identified by the given id.

Request

Path parameters

permissionId

integer

Required
schemeId

integer

Required

Query parameters

expand

string

Responses

Permission grant

application/json

PermissionGrantBean
GET/api/2/permissionscheme/{schemeId}/permission/{permissionId}
1 2 3 4 curl --request GET \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}/permission/{permissionId}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
DEL

Delete a permission grant from a scheme

Deletes a permission grant from a permission scheme.

Request

Path parameters

permissionId

integer

Required
schemeId

integer

Required

Responses

Returned if the permission grant is deleted successfully.

DEL/api/2/permissionscheme/{schemeId}/permission/{permissionId}
1 2 3 curl --request DELETE \ --url 'http://{baseurl}/rest/api/2/permissionscheme/{schemeId}/permission/{permissionId}' \ --user 'email@example.com:<api_token>'

Rate this page: