Roles

Download OpenAPI specification:Download

Manage user roles and permissions

Assign role

Assign a role to users or groups

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application

role_id
required
string

ID of the role to assign

Request Body schema: application/json
required
entity_ids
required
Array of strings

List of entities to assign the role. All entites must be of the same type.

entity_type
required
string (Entity type)

Type of entities to assign the role. All entities in entity_ids must be of this type.

Enum: "User" "Group" "Application"
Responses
204
404
post/v1/applications/{app_id}/roles/{role_id}/assignments
Request samples
application/json
{
  • "entity_ids": [
    ],
  • "entity_type": "User"
}
Response samples
application/json
{
  • "message": "string",
  • "error_code": 404
}

Revoke role

Delete user or group assignment from a role

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application

role_id
required
string

ID of the role to revoke

entity_id
required
string

ID of the user or group to revoke role from

Responses
204
404
delete/v1/applications/{app_id}/roles/{role_id}/assignments/{entity_id}
Request samples
Response samples
application/json
{
  • "message": "string",
  • "error_code": 404
}

Create role

Create a new role for this application

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application to retrieve its roles

Request Body schema: application/json
required
role_name
required
string

Role name

permissions
Array of strings

Role permissions

description
string

Role description

display_name
string

Role display name

Responses
201
409
post/v1/applications/{app_id}/roles
Request samples
application/json
{
  • "role_name": "string",
  • "permissions": [
    ],
  • "description": "string",
  • "display_name": "string"
}
Response samples
application/json
{
  • "result": {
    }
}

Get roles

Retrieve a list of all roles created for this application

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application to retrieve it's roles

Responses
200
get/v1/applications/{app_id}/roles
Request samples
Response samples
application/json
{
  • "result": [
    ]
}

Get role by ID

Retrieve a role by ID

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application to retrieve its roles

role_id
required
string

ID of the role to retrieve

Responses
200
404
get/v1/applications/{app_id}/roles/{role_id}
Request samples
Response samples
application/json
{
  • "result": {
    }
}

Update role

Update an existing role for this application

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application to retrieve it's roles

role_id
required
string

ID of the role to update

Request Body schema: application/json
required
role_name
string

Role name

permissions
Array of strings

Role permissions

description
string

Role description

display_name
string

Role display name

Responses
202
put/v1/applications/{app_id}/roles/{role_id}
Request samples
application/json
{
  • "role_name": "string",
  • "permissions": [
    ],
  • "description": "string",
  • "display_name": "string"
}
Response samples
application/json
{
  • "result": { }
}

Delete role

Delete role from this application

SecurityOAuth2: AdminAccessToken
Request
path Parameters
app_id
required
string

ID of the application to delete the role from

role_id
required
string

ID of the role to delete

Responses
202
delete/v1/applications/{app_id}/roles/{role_id}
Request samples