Roles: GetRoles

Returns a list of roles associated with a company account.

Permissions

Any user with a valid access token can call this method.

Request

HTTP request

GET /v2/accounts/{accountId}/roles

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

(Required) The id of the account.

Optional Query Parameters
onlyAssignableboolean

(Optional) When set to true, returns only the roles that the current user can assign to someone else. The default value is false.

filterstring

(Optional) A search filter that returns roles by the beginning of the role name. You can enter the beginning of the role name only to return all of the roles that begin with the text that you entered.

For example, if your company has set up roles such as Manager Beginner, Manager Pro, Agent Expert, and Agent Superstar, you could enter Manager to return all of the Manager roles (Manager Beginner and Manager Pro).

Note: You do not enter a wildcard (*) at the end of the name fragment.

startPositioninteger

(Optional) The starting zero-based index position of the result set. The default value is 0.

countinteger

(Optional) The number of results to return. This value must be a number between 1 and 100 (default).

Responses

CodeDescriptionReference
200

Roles successfully retrieved.

RoleSummaryList
400

Bad request. See ErrorCode and Message for details

ApiError
401

Not authorized to make this request.

ApiError

SDK Method

Roles::GetRoles

Definitions

ApiError

This object describes errors that occur. It is valid only for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

RoleSummary

Contains details about a role.

roleIdinteger

In Rooms v6, this is the id of the company role assigned to the user.

legacyRoleIdstring

The legacy name of the role in Rooms Version 5.

namestring

The name of the role.

isDefaultForAdminboolean

When true, the role is the default for account administrators.

isExternalboolean

When set to true, the role is an external role. You assign external roles to people from outside your company when you invite them into a room.

createdDatestring

The UTC date and time when the item was created. This is a read-only value that the service assigns.

Example: 2019-07-17T17:45:42.783Z

RoleSummaryList

This complex type contains details about the roles that are associated with an account.

roles[RoleSummary]

An array of role objects.

resultSetSizeinteger

The number of results returned in this response.

startPositioninteger

The starting zero-based index position of the results set. When this property is used as a query parameter, the default value is 0.

endPositioninteger

The last zero-based index position in the result set.

nextUristring

The URI for the next chunk of records based on the search request. This property is null for the last set of search results.

priorUristring

The URI for the previous chunk of records based on the search request. This property is null for the first set of search results.

}} />