API Reference version 2

Create room glance

PUT/v2/room/{room_id_or_name}/extension/glance/{key}

Create a glance.

Dynamically created glances have the following restrictions:

  • You can only create 10 glances in a room
  • You cannot modify a glance that was declared in the descriptor

Path parameters

Type Parameter Description Required?
string key

Unique key (in the context of the integration) to identify this glance.

Valid length range: 1 - 40.

Required
string room_id_or_name

The id of the room

Valid length range: 1 - 100.

Required

Request body

Type Property Description Required?
str | obj target

Defines the behaviour when clicking on the glance.

object [target, object 2]

An object with the following properties.

Required
object options

An object containing options which vary based on the type of target.

string key

The key of a dialog, glance or web panel that should be opened in response to this action.

Valid length range: 1 - 40.

Required
integer weight

Determines the order in which glances appear. Glances are displayed top to bottom in order of ascending weight.

Defaults to 100.

string key

Unique key (in the context of the integration) to identify this glance.

Valid length range: 1 - 40.

Required
string queryUrl

The URL of the resource providing the glance content.

object icon

Icon to display on the left side of the glance.

Required
string url

Url for the icon.

Required
string url@2x

Url for the retina version of the icon.

Required
array conditions

Conditions determine whether this glance is shown

A mixed array of the following types.

object [conditions array, option 1]

An object with the following properties.

Required
boolean invert

A flag indicating whether to invert the boolean result of the condition.

object params

A map of key/value parameters for a built-in condition.

string condition

The identifier of a built-in condition.

Valid values: room_is_public, user_is_admin, user_is_guest, user_is_room_owner, glance_matches.

Required
object [conditions array, option 2]

An object with the following properties.

Required
array conditions

The conditions to compose using the specific logical operator.

A mixed array of the following types.

Required
object [conditions array, option 1]

An object with the following properties.

Required
boolean invert

A flag indicating whether to invert the boolean result of the condition.

object params

A map of key/value parameters for a built-in condition.

string condition

The identifier of a built-in condition.

Valid values: room_is_public, user_is_admin, user_is_guest, user_is_room_owner, glance_matches.

Required
object [conditions array, option 2]

An object with the following properties.

Required
array conditions

The conditions to compose using the specific logical operator.

A mixed array of the following types.

Required
object [conditions array, option 1]

An object with the following properties.

Required
boolean invert

A flag indicating whether to invert the boolean result of the condition.

object params

A map of key/value parameters for a built-in condition.

string condition

The identifier of a built-in condition.

Valid values: room_is_public, user_is_admin, user_is_guest, user_is_room_owner, glance_matches.

Required
string type

Defines what logical operator is used to evaluate the list of conditions.

Valid values: and, or, AND, OR.

Required
string type

Defines what logical operator is used to evaluate the list of conditions.

Valid values: and, or, AND, OR.

Required
object name

The display name of the glance.

Required
string i18n

The optional localization key, used to look up the localized value.

Valid length range: 1 - 40.

string value

The default text.

Valid length range: 1 - 100.

Required
201 application/json
Type Property Description Required?
str | int id

The unique identifier for the created entity

Required
object links

An object with the following properties.

Required
string self Required