4 Roles

4.1 Get Roles

GET https://<HOST>:<PORT>/api/roles/get?version=0

Returns all congigured roles.

Required Permissions

  • API

  • User Management Read Access

Response Body Structure

The response body is structured as Role JSON object. A description for its fields is at section 27.4.1. For the JSON schema refer to section 27.4.2.

Example

GET http://127.0.0.1:8110/api/roles/get?version=0
HTTP Response Body
[
  {
    "displayName": "ADMINISTRATOR",
    "permissions": {
      "userManagement": "READ_WRITE_ACCESS",
      "configurationMode": "READ_WRITE_ACCESS",
      "tracing": "ACCESS",
      "administration": "ACCESS",
      "monitoringMode": "READ_WRITE_ACCESS",
      "webServer": "READ_WRITE_ACCESS",
      "userInterface": "ACCESS",
      "api": "ACCESS",
      "backends": "READ_WRITE_ACCESS",
      "mediaRecording": "NO_ACCESS"
    },
    "id": "ADMINISTRATOR"
  },
  {
    "displayName": "CALL_HISTORY_EXPORTER",
    "permissions": {
      "userManagement": "NO_ACCESS",
      "configurationMode": "NO_ACCESS",
      "tracing": "NO_ACCESS",
      "administration": "NO_ACCESS",
      "monitoringMode": "READ_ACCESS",
      "webServer": "NO_ACCESS",
      "userInterface": "NO_ACCESS",
      "api": "ACCESS",
      "backends": "NO_ACCESS",
      "mediaRecording": "NO_ACCESS"
    },
    "id": "CALL_HISTORY_EXPORTER"
  }
]

4.2 Add Role

PUT https://<HOST>:<PORT>/api/roles/add?version=0

Adds a new role

Required Permissions

  • User Management Read/Write Access

Request Body Structure

The request body is structured as Role JSON object. A description for its fields is at section 27.4.1. For the JSON schema refer to section 27.4.2.

Response Body Structure

The response body is structured as Role JSON object. A description for its fields is at section 27.4.1. For the JSON schema refer to section 27.4.2.

Example

PUT http://127.0.0.1:8110/api/roles/add?version=0
HTTP Request Body
{
  "displayName": "new_role",
  "permissions": {
    "userManagement": "NO_ACCESS",
    "configurationMode": "NO_ACCESS",
    "tracing": "NO_ACCESS",
    "administration": "NO_ACCESS",
    "monitoringMode": "NO_ACCESS",
    "webServer": "NO_ACCESS",
    "userInterface": "NO_ACCESS",
    "api": "ACCESS",
    "backends": "NO_ACCESS",
    "mediaRecording": "NO_ACCESS"
  },
  "id": "new_role"
}
HTTP Response Body
{
  "displayName": "new_role",
  "permissions": {
    "userManagement": "NO_ACCESS",
    "configurationMode": "NO_ACCESS",
    "tracing": "NO_ACCESS",
    "administration": "NO_ACCESS",
    "monitoringMode": "NO_ACCESS",
    "webServer": "NO_ACCESS",
    "userInterface": "NO_ACCESS",
    "api": "ACCESS",
    "backends": "NO_ACCESS",
    "mediaRecording": "NO_ACCESS"
  },
  "id": "new_role"
}

4.3 Remove role

DELETE https://<HOST>:<PORT>/api/roles/remove?version=0

Remove an existing role.

Required Permissions

  • User Management Read/Write Access

Request parameters

  • role

    The id or displayname of the role to be removed.

Example

DELETE http://127.0.0.1:8110/api/roles/remove?role=new_role&version=0
HTTP Response Body
[{
  "displayName": "role_2",
  "permissions": {
    "userManagement": "NO_ACCESS",
    "configurationMode": "NO_ACCESS",
    "tracing": "NO_ACCESS",
    "administration": "NO_ACCESS",
    "monitoringMode": "NO_ACCESS",
    "webServer": "NO_ACCESS",
    "userInterface": "NO_ACCESS",
    "api": "ACCESS",
    "backends": "NO_ACCESS",
    "mediaRecording": "NO_ACCESS"
  },
  "id": "role_2"
}]