API Reference version 2

Glances

Glances show aggregate information for an add-on. Clicking on a glance optionally opens a sidebar, a dialog or an external page.

API Documentation

See the API documentation for Glances

Descriptor Attribute Reference

Type Property Description Required?
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
string key

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

Valid length range: 1 - 40.

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
string queryUrl

The URL of the resource providing the glance content.

str | obj target

Defines the behaviour when clicking on the glance.

object [target, object 2]

An object with the following properties.

Required
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
object options

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

integer weight

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

Defaults to 100.

Glance Data Reference

The glance format to returned by queryUrl endpoint or used to POST to one of these endpoints:

Type Property Description Required?
object label

Free form html label

Required
string type

Valid values: html.

Required
string value

Valid length range: 1 - 1000.

Required
object metadata

Glance metadata for conditions

obj | obj status

A value of one of the following types.

object [status, object 1]

A lozenge with a label text. See https://docs.atlassian.com/aui/latest/docs/lozenges.html

Required
string type

Valid values: lozenge.

Required
object value

An object with the following properties.

Required
string label

Valid length range: 1 - 20.

Required
string type

The colour of AUI lozenge to display, these map to the AUI lozenge class names. Please note the value new is deprecated.

Valid values: default, success, error, current, new, complete, moved.

Required
object [status, object 2]

The icon for the glance

Required
string type

Valid values: icon.

Required
object value

An object with the following properties.

Required
string url

An URL to the icon

Required
string url@2x

An URL to the high resolution icon

Required

Conditions Reference

Glances can be shown conditionally by defining a condition in the Glance descriptor

Type Property Description 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
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
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.

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
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
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.

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
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
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 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