Config API Version 2 Roles

Introduction

Each User can be assigned one or more Roles. These Roles grant the User permission to view data or manage settings. Roles are effective for every organisation that the user has access to.

Certain roles are custom, and defined within the scope of a particular organisation. these roles may only be granted to users within that organisation.

Role Types

Roles may be one of the following types:

List Available Roles

Shows defined roles for a particular organisation. These roles are available to be granted and/or revoked to users of this organisation.

Request:

GET /config/v2/organisations/{ORG SPECIFIER}/roles

URL Path Params

GET Params

Filter Types

The Roles list may be filtered by any of the returned fields.

Sort Types

The Roles list may be sorted by any of the returned fields.

Response:

Returns a list of Roles defined for use within the Organisation.

{"roleId":"17","roleType":"general","roleName":"Administrator"}
{"roleId":"38","roleType":"general","roleName":"User"}
{"roleId":"67","roleType":"feature","roleName":"Call Playback"}

List Granted Roles by User

Shows roles assigned to a User.

Request:

GET /config/v2/users/{USER SPECIFIER}/roleMembers

URL Path Params

GET Params

Filter Types

The User Roles list may be filtered by any of the returned fields.

Sort Types

The User Roles list may be sorted by any of the returned fields.

Response:

Returns a list of Roles assigned to the User.

{"userId":"42","username":"some.person@example.com","roleId":"17","roleType":"general","roleName":"Administrator"}
{"userId":"59","username":"other.person@example.com","roleId":"38","roleType":"general","roleName":"User"}

Grant Roles

Assigns one or more Roles to a User.

Request:

POST /config/v2/users/{USER SPECIFIER}/roleMembers

URL Path Params

POST Params

Response:

Returns the HTTP 204 (No Content) status code if update successful.

HTTP 204 - NO CONTENT

Revoke Roles

Removes one or more granted Roles from a User.

Request:

DELETE /config/v2/users/{USER SPECIFIER}/roleMembers

URL Path Params

POST Params

Response:

Returns the HTTP 204 (No Content) status code if update successful.

HTTP 204 - NO CONTENT