How to obtain {ItemId} in api/2/dashboard/{dashboardId}/items/{itemId}/properties

We are getting the dashbords list in json with "api/2/dashboard/{dashboardId}".

In one of the dash board it has lot of graphs there. Now, is there any way we can try to pull the values of each graph ? 

 

Next, what is  'items' and itemid in the dashboard URL . How can we identify values ? How to  obtain {ItemId} in api/2/dashboard/{dashboardId}/items/{itemId}/properties.

2 answers

0 vote
Tarun Sapra Community Champion Feb 21, 2017

From the docs-

A dashboard item is similar to a gadget, in that it provides discrete dynamic content that a user can use to customize their dashboard. However, dashboard items use modern rendering technologies like AMD, Soy, LESS, etc. Dashboard items are also able to share web-resources, which greatly improves page load performance by reducing the number of requests and the overall size of data to be transferred on a dashboard load.

Currently, it doesn't seem possible to fetch list of items of dashboard using REST API, similar question here -

https://answers.atlassian.com/questions/39553910

 

In the latest API documentation - https://docs.atlassian.com/jira/REST/server/#api/2/dashboard-list 

There is no method getting dashboard item list, something like - GET /rest/api/2/dashboard/{dashboardId}/items/ 

Hi Tarun,

what data we need to pass in 'itemid' in URL which is under 'dashboard/items'.

Say for example : one of the  dash board has a single Pie Gadget.

Now, what I need to pass a value for an itemid in 'api/2/dashboard/{dashboardId}/items/{itemId}/properties' URL ?

Please provide an answer.

 
Tarun Sapra Community Champion Feb 21, 2017

I will suggest you to create your own REST end point using the script runner plugin or the REST plugin module and use the Java API of the script runner to fetch the details of the dashboard gadgets.

There is no possibility to find out the itemid from API. Only way I find the itemid is from source code of page. 

<div class="dashboard-item-frame gadget-container" id="gadget-17972-chrome">

 "17972" is the itemid.

 

I'm not sure when this ID is changed and if it'll stay the same all the time... but at least there is some way how to find it out.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

543 views 3 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you