Rooms: GetAssignableRoles

This method returns the room-level roles that the current user can assign to the members that they invite to a room.

Note: This method works only for Rooms v6 and only returns roles that have isExternal set to true.

Request

HTTP request

GET /restapi/v2/accounts/{accountId}/rooms/{roomId}/assignable_roles

Parameters

Parameter NameValueDescription
Path Parameters
roomIdinteger

(Required) The id of the room.

accountIdstring

(Required) The id of the account.

Optional Query Parameters
assigneeEmailstring

(Optional) The email address of a specific member. Using this parameter returns only the roles that the current user can assign to the member with that email address.

filterstring

(Optional) A search filter that returns assignable roles by the beginning of the role name.

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

startPositioninteger

(Optional) The index position within the total result set from which to start returning values. 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

Assignable roles successfully retrieved.

AssignableRoles
400

Bad request. See ErrorCode and Message for details

ApiError
401

Not authorized to make this request.

ApiError

SDK Method

Rooms::GetAssignableRoles

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.

AssignableRoles

This complex type contains information about assignable roles.

currentRoleIdinteger

The id of the invitee's company-level role. This property lets the requester know what room-level role will give the user the same permissions that they have at the company level. A value is returned only when both the requester and the invitee are internal to the company.

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.

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

}} />