POST /role

Edits the permissions of a specific role.

Resource Name: /settings/permissions/role

Permissions Required:
  • administrator
Request URL Parameters:

Parameter

Type

Description

name
Mandatory

String

Role name.

Request Body Parameters:

Parameter

Type

Description

authorizedApplicationsChanges

Array of Add/Remove (see Add/Remove)

List of application permissions to add (ID, permission).

List of application IDs to remove from permissions.

authorizedViewsAndActionChanges

Array of Add/Remove (see Add/Remove)

List of views and actions to add.

List of views and actions to remove.

users

Array of Add/Remove (see Add/Remove)

Support only if LDAP role association is not configured.

List of users to associate with role.

List of users to disassociate from role.

Return:

Parameter

Type

Description

name

String

User name

authorizedViewsAndActions

Array of NameAllowedPair (see NameAllowedPair )

View and action permissons.

authorizedApplications

Array of authorizedApplications (see authorizedApplications )

Permissions on applications.

roleUsers

Arrary of String

Associated usernames according to last login.

enabled

Boolean

Whether role is enabled.

Request example:

{

"authorizedApplicationsChanges": {

"add": [

{

"applicationID": 10,

"permission": "view"

},

{

"applicationID": 11,

"permission": "edit"

}

],

"remove": [

13,14

]

},

"authorizedViewsAndActionChanges": {

"add": [

"viewActivityLog",”applyDrafts”

],

"remove": [

"viewChangeRequests",”createNewApplications”

]

},

"users": {

"add": [

"Sue",”Joe”

],

"remove": [

"Eric",”John”

]

}

}

Return Example:

{
  "name": "DNS-role",
  "authorizedViewsAndActions": [
    {
      "name": "viewActivityLog",
      "allowed": true
    },
    {
      "name": "applyDrafts",
      "allowed": true
    },
...
  ],
  "authorizedApplications": [
    {
      "applicationID": 1,
      "name": "Backkup",
      "permission": "view"
    },
    {
      "applicationID": 2,
      "name": "DNS",
      "permission": "edit"
    }
  ],
  "roleUsers": [
    "Sue","Joe"
  ],
  "enabled": true
}

 

â See also: