This resource represents dashboards. Use it to obtain the details of dashboards as well as get, create, update, or remove item properties and gadgets from dashboards.

Hierarchy

  • CommonHttpService
    • DashboardsService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns DashboardsService

Methods

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

    Parameters

    Returns Promise<BulkEditShareableEntityResponse>

    Returned if the request is successful.

    example:

    {
    "action": "changePermission",
    "entityErrors": {
    "10002": {
    "errorMessages": [
    "Only owner or editors of the dashboard can change permissions."
    ],
    "errors": {}
    }
    }
    }

    PUT /rest/api/3/dashboard/bulk/edit @scopes-current write:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, write:dashboard:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

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

    Parameters

    • params: {
          dashboardDetails: DashboardDetails;
          extendAdminPermissions?: boolean;
          id: string;
      }
      • dashboardDetails: DashboardDetails

        Dashboard details.

      • OptionalextendAdminPermissions?: boolean

        Whether admin level permissions are used. It should only be true if the user has Administer Jira global permission

      • id: string

    Returns Promise<Dashboard>

    Returned if the request is successful.

    example:

    {
    "id": "10000",
    "isFavourite": false,
    "name": "System Dashboard",
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/10000",
    "sharePermissions": [
    {
    "type": "global"
    }
    ],
    "view": "https://your-domain.atlassian.net/secure/Dashboard.jspa?selectPageId=10000"
    }

    POST /rest/api/3/dashboard/{id}/copy @scopes-current write:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, write:dashboard:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

  • Creates a dashboard.

    Permissions required: None.

    Parameters

    • params: {
          dashboardDetails: DashboardDetails;
          extendAdminPermissions?: boolean;
      }
      • dashboardDetails: DashboardDetails

        Dashboard details.

      • OptionalextendAdminPermissions?: boolean

        Whether admin level permissions are used. It should only be true if the user has Administer Jira global permission

    Returns Promise<Dashboard>

    Returned if the request is successful.

    example:

    {
    "id": "10000",
    "isFavourite": false,
    "name": "System Dashboard",
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/10000",
    "sharePermissions": [
    {
    "type": "global"
    }
    ],
    "view": "https://your-domain.atlassian.net/secure/Dashboard.jspa?selectPageId=10000"
    }

    POST /rest/api/3/dashboard @scopes-current write:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, write:dashboard:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

  • Deletes a dashboard item property.

    This operation can be accessed anonymously.

    Permissions required: The user must be the owner of the dashboard. Note, users with the Administer Jira global permission are considered owners of the System dashboard.

    Parameters

    • params: {
          dashboardId: string;
          itemId: string;
          propertyKey: string;
      }
      • dashboardId: string

        The ID of the dashboard.

      • itemId: string

        The ID of the dashboard item.

      • propertyKey: string

        The key of the dashboard item property.

    Returns Promise<void>

    Returned if the dashboard item property is deleted.

    DELETE /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta delete:dashboard.property:jira

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

    Parameters

    • params: {
          filter?: "favourite" | "my";
          maxResults?: number;
          startAt?: number;
      } = {}
      • Optionalfilter?: "favourite" | "my"

        The 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.
      • OptionalmaxResults?: number

        The maximum number of items to return per page.

      • OptionalstartAt?: number

        The index of the first item to return in a page of results (page offset).

    Returns Promise<PageOfDashboards>

    Returned if the request is successful.

    example:

    {
    "dashboards": [
    {
    "id": "10000",
    "isFavourite": false,
    "name": "System Dashboard",
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/10000",
    "sharePermissions": [
    {
    "type": "global"
    }
    ],
    "view": "https://your-domain.atlassian.net/secure/Dashboard.jspa?selectPageId=10000"
    },
    {
    "id": "20000",
    "isFavourite": true,
    "name": "Build Engineering",
    "owner": {
    "key": "Mia",
    "self": "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
    "name": "mia",
    "displayName": "Mia Krystof",
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    }
    },
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/20000",
    "sharePermissions": [
    {
    "group": {
    "name": "administrators",
    "self": "https://your-domain.atlassian.net/rest/api/3/group?groupname=administrators"
    },
    "id": 10105,
    "type": "group"
    }
    ],
    "view": "https://your-domain.atlassian.net/secure/Dashboard.jspa?selectPageId=20000"
    }
    ],
    "maxResults": 10,
    "next": "https://your-domain.atlassian.net/rest/api/3/dashboard?startAt=10",
    "prev": "https://your-domain.atlassian.net/rest/api/3/dashboard?startAt=0",
    "startAt": 10,
    "total": 143
    }

    GET /rest/api/3/dashboard @scopes-current read:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

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

    Parameters

    • params: {
          dashboardId: number;
          gadgetId?: number[];
          moduleKey?: string[];
          uri?: string[];
      }
      • dashboardId: number

        The ID of the dashboard.

      • OptionalgadgetId?: number[]

        The list of gadgets IDs. To include multiple IDs, separate IDs with ampersand: gadgetId=10000&gadgetId=10001.

      • OptionalmoduleKey?: string[]

        The list of gadgets module keys. To include multiple module keys, separate module keys with ampersand: moduleKey=key:one&moduleKey=key:two.

      • Optionaluri?: string[]

        The list of gadgets URIs. To include multiple URIs, separate URIs with ampersand: uri=/rest/example/uri/1&uri=/rest/example/uri/2.

    Returns Promise<DashboardGadgetResponse>

    Returned if the request is successful.

    example:

    {
    "gadgets": [
    {
    "id": 10001,
    "moduleKey": "com.atlassian.plugins.atlassian-connect-plugin:com.atlassian.connect.node.sample-addon__sample-dashboard-item",
    "color": "blue",
    "position": {
    "row": 0,
    "column": 0
    },
    "title": "Issue statistics"
    },
    {
    "id": 10002,
    "moduleKey": "com.atlassian.plugins.atlassian-connect-plugin:com.atlassian.connect.node.sample-addon__sample-dashboard-graph",
    "color": "red",
    "position": {
    "row": 1,
    "column": 0
    },
    "title": "Activity stream"
    },
    {
    "id": 10003,
    "moduleKey": "com.atlassian.plugins.atlassian-connect-plugin:com.atlassian.connect.node.sample-addon__sample-dashboard-item",
    "color": "yellow",
    "position": {
    "row": 0,
    "column": 1
    },
    "title": "Bubble chart"
    }
    ]
    }

    GET /rest/api/3/dashboard/{dashboardId}/gadget @scopes-current read:jira-work @scopes-beta read:dashboard:jira

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

    Parameters

    • params: {
          id: string;
      }
      • id: string

        The ID of the dashboard.

    Returns Promise<Dashboard>

    Returned if the request is successful.

    example:

    {
    "id": "10000",
    "isFavourite": false,
    "name": "System Dashboard",
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/10000",
    "sharePermissions": [
    {
    "type": "global"
    }
    ],
    "view": "https://your-domain.atlassian.net/secure/Dashboard.jspa?selectPageId=10000"
    }

    GET /rest/api/3/dashboard/{id} @scopes-current read:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

  • 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\u2019s anonymous access is permitted.

    Parameters

    • params: {
          dashboardId: string;
          itemId: string;
          propertyKey: string;
      }
      • dashboardId: string

        The ID of the dashboard.

      • itemId: string

        The ID of the dashboard item.

      • propertyKey: string

        The key of the dashboard item property.

    Returns Promise<EntityProperty>

    Returned if the request is successful.

    example:

    {
    "key": "issue.support",
    "value": {
    "system.conversation.id": "b1bf38be-5e94-4b40-a3b8-9278735ee1e6",
    "system.support.time": "1m"
    }
    }

    GET /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey} @scopes-current read:jira-work @scopes-beta read:dashboard.property:jira

  • Returns the keys of all properties for a dashboard item.

    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\u2019s anonymous access is permitted.

    Parameters

    • params: {
          dashboardId: string;
          itemId: string;
      }
      • dashboardId: string

        The ID of the dashboard.

      • itemId: string

        The ID of the dashboard item.

    Returns Promise<PropertyKeys>

    Returned if the request is successful.

    example:

    {
    "keys": [
    {
    "key": "issue.support",
    "self": "https://your-domain.atlassian.net/rest/api/3/issue/EX-2/properties/issue.support"
    }
    ]
    }

    GET /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties @scopes-current read:jira-work @scopes-beta read:dashboard.property:jira

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

    Parameters

    • params: {
          accountId?: string;
          dashboardName?: string;
          expand?: string;
          groupId?: string;
          groupname?: string;
          maxResults?: number;
          orderBy?:
              | "id"
              | "name"
              | "description"
              | "owner"
              | "-description"
              | "+description"
              | "favorite_count"
              | "-favorite_count"
              | "+favorite_count"
              | "-id"
              | "+id"
              | "is_favorite"
              | "-is_favorite"
              | "+is_favorite"
              | "-name"
              | "+name"
              | "-owner"
              | "+owner";
          owner?: string;
          projectId?: number;
          startAt?: number;
          status?: "active" | "archived" | "deleted";
      } = {}
      • OptionalaccountId?: string

        User account ID used to return dashboards with the matching owner.accountId. This parameter cannot be used with the owner parameter.

      • OptionaldashboardName?: string

        String used to perform a case-insensitive partial match with name.

      • Optionalexpand?: string

        Use 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.
      • OptionalgroupId?: string

        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.

      • Optionalgroupname?: string

        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.

      • OptionalmaxResults?: number

        The maximum number of items to return per page.

      • OptionalorderBy?:
            | "id"
            | "name"
            | "description"
            | "owner"
            | "-description"
            | "+description"
            | "favorite_count"
            | "-favorite_count"
            | "+favorite_count"
            | "-id"
            | "+id"
            | "is_favorite"
            | "-is_favorite"
            | "+is_favorite"
            | "-name"
            | "+name"
            | "-owner"
            | "+owner"

        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.
      • Optionalowner?: string

        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.

      • OptionalprojectId?: number

        Project ID used to returns dashboards that are shared with a project that matches sharePermissions.project.id.

      • OptionalstartAt?: number

        The index of the first item to return in a page of results (page offset).

      • Optionalstatus?: "active" | "archived" | "deleted"

        The status to filter by. It may be active, archived or deleted.

    Returns Promise<PageBeanDashboard>

    Returned if the request is successful.

    example:

    {
    "isLast": true,
    "maxResults": 100,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/search?expand=owner&maxResults=50&startAt=0",
    "startAt": 0,
    "total": 2,
    "values": [
    {
    "description": "Testing program",
    "id": "1",
    "isFavourite": true,
    "name": "Testing",
    "owner": {
    "self": "https://your-domain.atlassian.net/user?accountId=5b10a2844c20165700ede21g",
    "displayName": "Mia",
    "active": true,
    "accountId": "5b10a2844c20165700ede21g",
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    }
    },
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/1",
    "sharePermissions": [
    {
    "type": "global"
    }
    ],
    "view": "https://your-domain.atlassian.net/Dashboard.jspa?selectPageId=1"
    },
    {
    "description": "Quantum initiative",
    "id": "2",
    "isFavourite": false,
    "name": "Quantum ",
    "owner": {
    "self": "https://your-domain.atlassian.net/user?accountId=5b10a2844c20165700ede21g",
    "displayName": "Mia",
    "active": true,
    "accountId": "5b10a2844c20165700ede21g",
    "avatarUrls": {
    "16x16": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
    "24x24": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
    "32x32": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
    "48x48": "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
    }
    },
    "popularity": 0,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/2",
    "sharePermissions": [
    {
    "type": "loggedin"
    }
    ],
    "view": "https://your-domain.atlassian.net/Dashboard.jspa?selectPageId=2"
    }
    ]
    }

    GET /rest/api/3/dashboard/search @scopes-current read:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

  • 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 be the owner of the dashboard. Note, users with the Administer Jira global permission are considered owners of the System dashboard.

    Parameters

    • params: {
          dashboardId: string;
          itemId: string;
          propertyKey: string;
          requestBody: unknown;
      }
      • dashboardId: string

        The ID of the dashboard.

      • itemId: string

        The ID of the dashboard item.

      • propertyKey: string

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

      • requestBody: unknown

        The value of the property. The value has to be a valid, non-empty JSON value. The maximum length of the property value is 32768 bytes.

    Returns Promise<{
        body: unknown;
        created: boolean;
    }>

    • status: 200, mediaType: application/json

      Returned if the dashboard item property is updated.

    • status: 201, mediaType: application/json

      Returned if the dashboard item property is created.

    PUT /rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey} @scopes-current write:jira-work @scopes-beta write:dashboard.property:jira

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

    Parameters

    • params: {
          dashboardDetails: DashboardDetails;
          extendAdminPermissions?: boolean;
          id: string;
      }
      • dashboardDetails: DashboardDetails

        Replacement dashboard details.

      • OptionalextendAdminPermissions?: boolean

        Whether admin level permissions are used. It should only be true if the user has Administer Jira global permission

      • id: string

        The ID of the dashboard to update.

    Returns Promise<Dashboard>

    Returned if the request is successful.

    example:

    {
    "id": "10000",
    "isFavourite": false,
    "name": "System Dashboard",
    "popularity": 1,
    "self": "https://your-domain.atlassian.net/rest/api/3/dashboard/10000",
    "sharePermissions": [
    {
    "type": "global"
    }
    ],
    "view": "https://your-domain.atlassian.net/secure/Dashboard.jspa?selectPageId=10000"
    }

    PUT /rest/api/3/dashboard/{id} @scopes-current write:jira-work @scopes-beta read:dashboard:jira, read:group:jira, read:project:jira, read:project-role:jira, read:user:jira, write:dashboard:jira, read:application-role:jira, read:avatar:jira, read:issue-type-hierarchy:jira, read:issue-type:jira, read:project-category:jira, read:project-version:jira, read:project.component:jira

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void