Hi Team,
We have a dashboard with a chart widget in it. I need to extract the data inside the widget. Is there any JIRA Rest API which can get the details ?
Go through this link it details various endpoints that can be used for getting and creating dashboard and its widgets
Hi @Vishal Biyani
I went through all of them, but none of them are able to provide me with the widget Value details. I tried using Get Gadget, and it retrieves the below information, but not the values that are within the gadget:
"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" }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have done this a while back and it is tedious process to get the values.
Let me try and recall how I did it.
In the meantime, can you confirm which Chart widget you need details for like Workload pie chart, Pie chart or something else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The way that I am aware about how to get the details is below.
In your dashboard, add a gadget that you want to create going forward using APIs (in your case doughnut chart) and configure it completly.
After that, call
GET -> https://{{domain}}.atlassian.net/rest/api/3/dashboard/{{dashboardId}}/gadget
get the id of the doughnut chart.
Then call this API
GET - https://{{domain}}.atlassian.net/rest/api/3/dashboard/{{dashboardId}}/items/{{itemId}}/properties
This call will give you list of the properties that need to be configured. based on your example above itemId will be 10001
Then do get the properties of each key call
GET - > https://{{domain}}.atlassian.net/rest/api/3/dashboard/{{dashboardId}}/items/{{itemId}}/properties/{propertyKey}
This will give all the values that need to be supplied to configure the gadget.
Once you the details, you can then use the APIs to
add gadget and configure the gadget.
As there is no documentation available that gives you key and value of various gadget, this is the way that I know of to make progress.
Let me know if you are able to move forward with this approach
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all Thank You,
I get the details in below format, when i use:
GET - > https://{{domain}}.atlassian.net/rest/api/3/dashboard/{{dashboardId}}/items/{{itemId}}/properties/{propertyKey}
{
"key": "",
"value": {
"id": "",
"isConfigured": "",
"isPopup": "",
"name": "",
"projectOrFilterId": "",
"refresh": "",
"statType": "",
"type": ""
}
}
I think there's a confusion I don't want the values that need to be supplied to configure the gadget, I want to fetch the values that are being displayed in doughnut chart.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah!!! I see.
What you are asking about is the gadget is rendered with data on browser. As the data resides on client side, REST API won't help.
In my opinion as the data resides on client side, the user will have to do web scrapping to extract this data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.