getDashboardItemProperty method

Future<EntityProperty> getDashboardItemProperty({
  1. required String dashboardId,
  2. required String itemId,
  3. required String propertyKey,
})

Returns the key and value of a dashboard item property.

A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see Adding and customizing gadgets.

When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see Building a dashboard item for a JIRA Connect add-on and the Dashboard Item documentation.

There is no resource to set or get dashboard items.

This operation can be accessed anonymously.

Permissions required: The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the Administer Jira global permission are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted.

Implementation

Future<EntityProperty> getDashboardItemProperty(
    {required String dashboardId,
    required String itemId,
    required String propertyKey}) async {
  return EntityProperty.fromJson(await _client.send(
    'get',
    'rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}',
    pathParameters: {
      'dashboardId': dashboardId,
      'itemId': itemId,
      'propertyKey': propertyKey,
    },
  ));
}