Dashboards

General information

REST API available since v. 1.17.*

Parameter favourite in "Create dashboard" available since 1.18.*

Available ONLY for JIRA administrators

Get all dashboards

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/all

Response format - JSON

Example

{
    "total": 2,
    "maxResults": 1000,
    "dashboards": [
        {
            "favouriteCount": 0,
            "name": "System Dashboard",
            "description": null,
            "ownerUserName": null,
            "isSystemDefaultPortalPage": true,
            "id": 10000,
            "version": 0
        },
        {
            "favouriteCount": 1,
            "name": "Example Dashboard",
            "description": "Example Description",
            "ownerUserName": "admin",
            "isSystemDefaultPortalPage": false,
            "id": 10100,
            "version": 7
        }
    ],
    "startAt": 0
}

Parameters

  • permissions - optional - (true or empty) - response JSON show all dashboard permission
  • layout - optional - (true or empty) - response JSON show dashboard layout configuration
  • gadgets - optional - (true or empty) - response JSON show all dashboard gadgets configuration
  • startAt and maxResults - optional - please see Pagination section bottom of this page


Get all dashboards for specific owner

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/user/{JIRA_USER}

where {JIRA_USER} is JIRA user name, like admin

Example URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/user/admin

Response format - JSON

Example

{
    "total": 2,
    "maxResults": 1000,
    "dashboards": [
        {
            "layout": {
                "numberOfColumns": 2,
                "layoutOption": "BA"
            },
            "favouriteCount": 1,
            "name": "Example Dashboard",
            "description": "Example Description",
            "ownerUserName": "admin",
            "isSystemDefaultPortalPage": false,
            "permission": {
                "isEmpty": false,
                "isGlobal": false,
                "isAuthenticated": false,
                "isPrivate": false,
                "permissionsMap": [
                    {
                        "hasViewRights": true,
                        "hasEditRights": false,
                        "id": 10103,
                        "type": "group",
                        "param1": "jira-administrators",
                        "param2": null
                    },
                    {
                        "hasViewRights": true,
                        "hasEditRights": true,
                        "id": 10104,
                        "type": "project",
                        "param1": "10000",
                        "param2": "10002"
                    }
                ]
            },
            "id": 10100,
            "version": 7,
            "gadgets": [
                {
                    "completeModuleKey": {
                        "defined": false,
                        "empty": true
                    },
                    "color": "color1",
                    "columnNumber": 0,
                    "userPreferences": {
                        "filterId": "10003",
                        "isConfigured": "true",
                        "columnNames": "issuetype|issuekey|summary|priority",
                        "isPopup": "false",
                        "num": "10",
                        "refresh": "15"
                    },
                    "id": 10101,
                    "gadgetUrl": "rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml",
                    "rowNumber": 0
                },
                {
                    "completeModuleKey": {
                        "defined": false,
                        "empty": true
                    },
                    "color": "color1",
                    "columnNumber": 1,
                    "userPreferences": {
                        "isConfigured": "true",
                        "statType": "assignees",
                        "isPopup": "false",
                        "name": "Example project",
                        "refresh": "15",
                        "projectOrFilterId": "",
                        "id": "10000",
                        "type": "project"
                    },
                    "id": 10100,
                    "gadgetUrl": "rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml",
                    "rowNumber": 0
                }
            ]
        }
    ],
    "startAt": 1
}

Parameters

  • permissions - optional - (true or empty) - response JSON show dashboard permissions
  • layout - optional - (true or empty) - response JSON show dashboard layout configuration
  • gadgets - optional - (true or empty) - response JSON show all dashboard gadgets configuration
  • startAt and maxResults - optional - please see Pagination section bottom of this page


Get dashboard permissions

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/{DASHBOARD_ID}/permissions

where {DASHBOARD_ID} is dashboard id, like 10100

Example URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/10100/permissions

Response format - JSON

Example

{
    "isEmpty": false,
    "isGlobal": false,
    "isAuthenticated": false,
    "isPrivate": false,
    "permissionsMap": [
        {
            "hasViewRights": true,
            "hasEditRights": false,
            "id": 10103,
            "type": "group",
            "param1": "jira-administrators",
            "param2": null
        },
        {
            "hasViewRights": true,
            "hasEditRights": true,
            "id": 10104,
            "type": "project",
            "param1": "10000",
            "param2": "10002"
        }
    ]
}


Get dashboard layout

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/{DASHBOARD_ID}/layout

where {DASHBOARD_ID} is dashboard id, like 10100

Example URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/10100/layout

Response format - JSON

Example

{
    "numberOfColumns": 2,
    "layoutOption": "BA"
}


Get dashboard gadgets

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/{DASHBOARD_ID}/gadgets

where {DASHBOARD_ID} is dashboard id, like 10100

Example URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/10100/gadgets

Response format - JSON

Example

[
    {
        "completeModuleKey": {
            "defined": false,
            "empty": true
        },
        "color": "color1",
        "columnNumber": 0,
        "userPreferences": {
            "filterId": "10003",
            "isConfigured": "true",
            "columnNames": "issuetype|issuekey|summary|priority",
            "isPopup": "false",
            "num": "10",
            "refresh": "15"
        },
        "id": 10101,
        "openSocialSpecUri": {
            "defined": true,
            "empty": false
        },
        "rowNumber": 0
    },
    {
        "completeModuleKey": {
            "defined": false,
            "empty": true
        },
        "color": "color1",
        "columnNumber": 1,
        "userPreferences": {
            "isConfigured": "true",
            "statType": "assignees",
            "isPopup": "false",
            "name": "Example project",
            "refresh": "15",
            "projectOrFilterId": "",
            "id": "10000",
            "type": "project"
        },
        "id": 10100,
        "openSocialSpecUri": {
            "defined": true,
            "empty": false
        },
        "rowNumber": 0
    }
]


Create dashboard

Method type - POST

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/create

Request format - JSON

Response format - JSON

Example request:

 Simple request - only required fields
{
    "name": "Dashboard name",
    "owner": "user_name"
}
 Full request - with all available fields
{
    "name": "Dashboard name",
    "owner": "user_name",
	"description": "Dashboard description", 
	"layout": "AB",
    "permissions": 
    	[
    		{
    			"type": "group",
    			"param1": "jira-administrators",
				"param2": null,
				"rights": "view"
    		},
    		{
    			"type": "project",
    			"param1": "10000",
    			"param2": "10002",
    			"rights": "edit"
    		}
    	]
}
  • name - required - dashboard name
  • owner - required - owner name, like admin 
  • description - optional - dashboard description
  • favourite - optional - true/false
  • layout - optional - dashboard layout (A, AA, AB, BA, AAA or ABA) 
  • permissions - optional - permission set for dashboard


Add gadget

Method type - POST

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/{DASHBOARD_ID}/addGadget

where {DASHBOARD_ID} is dashboard id, like 10100

Example URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/10100/addGadget

Request format - JSON

Response format - JSON

Example request:

{
    "gadgetUrl": "rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml",
    "column": 0,
    "row": 7,
    "color":"color6",
    "userPreferences":{
    	"filterId": "10000",
    	"isConfigured": "true",
    	"isPopup": "false",
    	"columnNames": "issuetype|issuekey|summary",
    	"refresh": "15",
    	"num": "20"
    }
}
  • gadgetUrl - required - gadget URL
  • column - required - column number (starting from 0, 0 = first column, 1 = second column etc. )
  • row required - row number (starting from 0, 0 = first row, 1 = second row etc. )
  • color - required - gadget color - available option: colorX (where X is number form 1 to 8)
  • userPreferences - gadget configurations


Before you create new gadget, please configure one and check its configuration using Get dashboard gadgets



Edit gadget

Method type - POST

URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/editGadget/{GADGET_ID}

where {GADGET_ID} is gadget id, like 10101

Example URL:

  • {JIRA_URL}/rest/extender/1.0/dashboard/editGadget/10101

Request format - JSON

Response format - JSON

Example request:

{
    "column": 0,
    "row": 7,
    "color":"color6",
    "userPreferences":{
    	"filterId": "10000",
    	"isConfigured": "true",
    	"isPopup": "false",
    	"columnNames": "issuetype|issuekey|summary",
    	"refresh": "15",
    	"num": "20"
    }
}
  • column - optional - column number (starting from 0, 0 = first column, 1 = second column etc. )
  • row optional - row number (starting from 0, 0 = first row, 1 = second row etc. )
  • color - optional - gadget color - available option: colorX (where X is number form 1 to 8)
  • userPreferences - gadget configurations


Before you edit gadget, please configure one and check its configuration using Get dashboard gadgets




Differences in this API between JIRA versions

RESTJira 7.2.X - 7.5.XJira 7.6.X - 7.11.XJira 7.12.X and later

.../dashboard/all

and

.../dashboard/user/{JIRA_USER}

Parameters not supported

  • hasViewRights

  • hasEditRights

  • permissionsMap

Parameters not supported

  • hasViewRights

  • hasEditRights

  • permissionsMap

All parameters supported

.../dashboard/permissions/{DASHBOARD_ID}

Parameters not supported

  • hasViewRights

  • hasEditRights

  • permissionsMap

Parameters not supported

  • hasViewRights

  • hasEditRights

  • permissionsMap

All parameters supported

.../dashboard/layout/{DASHBOARD_ID}

All parameters supportedAll parameters supportedAll parameters supported

.../dashboard/gadgets/{DASHBOARD_ID}

All parameters supportedAll parameters supportedAll parameters supported

...//dashboard/gadgets/create

Parameters not supported

  • rights

Value not supported

  • parameters "type" value USER
    and
    AUTHENTICATED

Parameters not supported

  • rights

Value not supported

  • parameters "type" value USER

All parameters supported



Pagination

This REST API uses pagination to improve performance for all Jira users. Pagination is enforced for methods that could return a large collection of items. When you make a request to a paged API, the response will wrap the returned array of values in a JSON object with paging metadata, for example:

{
    "startAt" : 0,
    "maxResults" : 10,
    "total": 200,
    "XXXXXXXX": [
        { /* result 0 */ },
        { /* result 1 */ },
        { /* result 2 */ }
    ]
}

Where:

  • startAt is the index of the first item returned in the page of results.
  • maxResults is the maximum number of items that can be returned per page. Each API endpoint may have a different limit for the number of items returned, and these limits may change without notice. (default value - 1000)
  • total is the total number of items contained in all pages. This number may change as the client requests the subsequent pages, therefore the client should always assume that the requested page can be empty.

Example:

  • {JIRA_URL}/rest/extender/1.0/dashboards/all&startAt=10&maxResults=20
  • {JIRA_URL}/rest/extender/1.0/dashboards/admin&startAt=1&maxResults=010