Skip to content

dashboard

add-gadget

Add gadget to dashboard

Adds a gadget to a dashboard.

Permissions required: None.

POST /rest/api/3/dashboard/{dashboardId}/gadget

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--dashboardIdstringYesThe ID of the dashboard.

Example:

bash
jr dashboard add-gadget --dashboardId <dashboardId>

bulk-edit

Bulk edit dashboards

Bulk edit dashboards. Maximum number of dashboards to be edited at the same time is 100.

Permissions required: None

The dashboards to be updated must be owned by the user, or the user must be an administrator.

PUT /rest/api/3/dashboard/bulk/edit

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)

Example:

bash
jr dashboard bulk-edit

copy

Copy dashboard

Copies a dashboard. Any values provided in the dashboard parameter replace those in the copied dashboard.

Permissions required: None

The dashboard to be copied must be owned by or shared with the user.

POST /rest/api/3/dashboard/{id}/copy

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--extendAdminPermissionsstringNoWhether admin level permissions are used. It should only be true if the user has Administer Jira global permission
--idstringYes

Example:

bash
jr dashboard copy --id <id>

create

Create dashboard

Creates a dashboard.

Permissions required: None.

POST /rest/api/3/dashboard

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--extendAdminPermissionsstringNoWhether admin level permissions are used. It should only be true if the user has Administer Jira global permission

Example:

bash
jr dashboard create

delete

Delete dashboard

Deletes a dashboard.

Permissions required: None

The dashboard to be deleted must be owned by the user.

DELETE /rest/api/3/dashboard/{id}

FlagTypeRequiredDescription
--idstringYesThe ID of the dashboard.

Example:

bash
jr dashboard delete --id <id>

delete-item-property

Delete dashboard item property

Deletes a dashboard item property.

This operation can be accessed anonymously.

Permissions required: The user must have edit permission of the dashboard.

DELETE /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}

FlagTypeRequiredDescription
--dashboardIdstringYesThe ID of the dashboard.
--itemIdstringYesThe ID of the dashboard item.
--propertyKeystringYesThe key of the dashboard item property.

Example:

bash
jr dashboard delete-item-property --dashboardId <dashboardId> --itemId <itemId> --propertyKey <propertyKey>

get

Get dashboard

Returns a dashboard.

This operation can be accessed anonymously.

Permissions required: None.

However, to get a dashboard, the dashboard must be shared with the user or the user must own it. 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.

GET /rest/api/3/dashboard/{id}

FlagTypeRequiredDescription
--idstringYesThe ID of the dashboard.

Example:

bash
jr dashboard get --id <id>

get-all

Get all dashboards

Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards.

This operation can be accessed anonymously.

Permissions required: None.

GET /rest/api/3/dashboard

FlagTypeRequiredDescription
--filterstringNoThe filter applied to the list of dashboards. Valid values are:
  • favourite Returns dashboards the user has marked as favorite.
  • my Returns dashboards owned by the user. | | --maxResults | string | No | The maximum number of items to return per page. | | --startAt | string | No | The index of the first item to return in a page of results (page offset). |

Example:

bash
jr dashboard get-all

get-all-available-dashboard-gadgets

Get available gadgets

Gets a list of all available gadgets that can be added to all dashboards.

Permissions required: None.

GET /rest/api/3/dashboard/gadgets

Example:

bash
jr dashboard get-all-available-dashboard-gadgets

get-all-gadgets

Get gadgets

Returns a list of dashboard gadgets on a dashboard.

This operation returns:

  • Gadgets from a list of IDs, when id is set.
  • Gadgets with a module key, when moduleKey is set.
  • Gadgets from a list of URIs, when uri is set.
  • All gadgets, when no other parameters are set.

This operation can be accessed anonymously.

Permissions required: None.

GET /rest/api/3/dashboard/{dashboardId}/gadget

FlagTypeRequiredDescription
--dashboardIdstringYesThe ID of the dashboard.
--gadgetIdstringNoThe list of gadgets IDs. To include multiple IDs, separate IDs with ampersand: gadgetId=10000&gadgetId=10001.
--moduleKeystringNoThe list of gadgets module keys. To include multiple module keys, separate module keys with ampersand: moduleKey=key:one&moduleKey=key:two.
--uristringNoThe list of gadgets URIs. To include multiple URIs, separate URIs with ampersand: uri=/rest/example/uri/1&uri=/rest/example/uri/2.

Example:

bash
jr dashboard get-all-gadgets --dashboardId <dashboardId>

get-item-property

Get dashboard item property

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 have read permission of the dashboard or have the dashboard shared with them.

GET /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}

FlagTypeRequiredDescription
--dashboardIdstringYesThe ID of the dashboard.
--itemIdstringYesThe ID of the dashboard item.
--propertyKeystringYesThe key of the dashboard item property.

Example:

bash
jr dashboard get-item-property --dashboardId <dashboardId> --itemId <itemId> --propertyKey <propertyKey>

get-item-property-keys

Get dashboard item property keys

Returns the keys of all properties for a dashboard item.

This operation can be accessed anonymously.

Permissions required: The user must have read permission of the dashboard or have the dashboard shared with them.

GET /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties

FlagTypeRequiredDescription
--dashboardIdstringYesThe ID of the dashboard.
--itemIdstringYesThe ID of the dashboard item.

Example:

bash
jr dashboard get-item-property-keys --dashboardId <dashboardId> --itemId <itemId>

get-paginated

Search for dashboards

Returns a paginated list of dashboards. This operation is similar to Get dashboards except that the results can be refined to include dashboards that have specific attributes. For example, dashboards with a particular name. When multiple attributes are specified only filters matching all attributes are returned.

This operation can be accessed anonymously.

Permissions required: The following dashboards that match the query parameters are returned:

  • Dashboards owned by the user. Not returned for anonymous users.
  • Dashboards shared with a group that the user is a member of. Not returned for anonymous users.
  • Dashboards shared with a private project that the user can browse. Not returned for anonymous users.
  • Dashboards shared with a public project.
  • Dashboards shared with the public.

GET /rest/api/3/dashboard/search

FlagTypeRequiredDescription
--accountIdstringNoUser account ID used to return dashboards with the matching owner.accountId. This parameter cannot be used with the owner parameter.
--dashboardNamestringNoString used to perform a case-insensitive partial match with name.
--expandstringNoUse expand to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include:
  • description Returns the description of the dashboard.

  • owner Returns the owner of the dashboard.

  • viewUrl Returns the URL that is used to view the dashboard.

  • favourite Returns isFavourite, an indicator of whether the user has set the dashboard as a favorite.

  • favouritedCount Returns popularity, a count of how many users have set this dashboard as a favorite.

  • sharePermissions Returns details of the share permissions defined for the dashboard.

  • editPermissions Returns details of the edit permissions defined for the dashboard.

  • isWritable Returns whether the current user has permission to edit the dashboard. | | --groupId | string | No | Group ID used to return dashboards that are shared with a group that matches sharePermissions.group.groupId. This parameter cannot be used with the groupname parameter. | | --groupname | string | No | As a group's name can change, use of groupId is recommended. Group name used to return dashboards that are shared with a group that matches sharePermissions.group.name. This parameter cannot be used with the groupId parameter. | | --maxResults | string | No | The maximum number of items to return per page. | | --orderBy | string | No | Order the results by a field:

  • description Sorts by dashboard description. Note that this sort works independently of whether the expand to display the description field is in use.

  • favourite_count Sorts by dashboard popularity.

  • id Sorts by dashboard ID.

  • is_favourite Sorts by whether the dashboard is marked as a favorite.

  • name Sorts by dashboard name.

  • owner Sorts by dashboard owner name. | | --owner | string | No | This parameter is deprecated because of privacy changes. Use accountId instead. See the migration guide for details. User name used to return dashboards with the matching owner.name. This parameter cannot be used with the accountId parameter. | | --projectId | string | No | Project ID used to returns dashboards that are shared with a project that matches sharePermissions.project.id. | | --startAt | string | No | The index of the first item to return in a page of results (page offset). | | --status | string | No | The status to filter by. It may be active, archived or deleted. |

Example:

bash
jr dashboard get-paginated

remove-gadget

Remove gadget from dashboard

Removes a dashboard gadget from a dashboard.

When a gadget is removed from a dashboard, other gadgets in the same column are moved up to fill the emptied position.

Permissions required: None.

DELETE /rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}

FlagTypeRequiredDescription
--dashboardIdstringYesThe ID of the dashboard.
--gadgetIdstringYesThe ID of the gadget.

Example:

bash
jr dashboard remove-gadget --dashboardId <dashboardId> --gadgetId <gadgetId>

set-item-property

Set dashboard item property

Sets the value of a dashboard item property. Use this resource in apps to store custom data against a dashboard item.

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.

The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.

This operation can be accessed anonymously.

Permissions required: The user must have edit permisson of the dashboard.

PUT /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--dashboardIdstringYesThe ID of the dashboard.
--itemIdstringYesThe ID of the dashboard item.
--propertyKeystringYesThe key of the dashboard item property. The maximum length is 255 characters. For dashboard items with a spec URI and no complete module key, if the provided propertyKey is equal to "config", the request body's JSON must be an object with all keys and values as strings.

Example:

bash
jr dashboard set-item-property --dashboardId <dashboardId> --itemId <itemId> --propertyKey <propertyKey>

update

Update dashboard

Updates a dashboard, replacing all the dashboard details with those provided.

Permissions required: None

The dashboard to be updated must be owned by the user.

PUT /rest/api/3/dashboard/{id}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--extendAdminPermissionsstringNoWhether admin level permissions are used. It should only be true if the user has Administer Jira global permission
--idstringYesThe ID of the dashboard to update.

Example:

bash
jr dashboard update --id <id>

update-gadget

Update gadget on dashboard

Changes the title, position, and color of the gadget on a dashboard.

Permissions required: None.

PUT /rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--dashboardIdstringYesThe ID of the dashboard.
--gadgetIdstringYesThe ID of the gadget.

Example:

bash
jr dashboard update-gadget --dashboardId <dashboardId> --gadgetId <gadgetId>