i have been able to add a gadget in the dashboard using REST APIs
url = "https://your-domain.atlassian.net/rest/api/3/dashboard"
and
url = "https://your-domain.atlassian.net/rest/api/3/dashboard/{dashboardId}/gadget"
Once a gadget is added, which REST API to use to populate the gadget?
e.g. i added Filter Count gadget. Now how do i add using REST API
1. filter
2. specify the counts
Hi @Vishal Biyani , I think you will need to use following rest endpoint:
{"key":"config","value":{"filterId":"10004","isConfigured":"true","columnNames":"issuetype|issuekey|summary|priority|customfield_10058","isPopup":"false","num":"10","refresh":"false"}}
@Martin Bayer _MoroSystems_ s_r_o__
i added the dashboard gadget using
got the itemId using =
response.json()["id"]
Now when i try to run below API, replacing dashboardId and itemId received from above
url = "https://your-domain.atlassian.net/rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties"
getting 404
b'{"message":"null for uri: https://your-domain.atlassian.net/rest/api/3/10671/items/39921/properties","status-code":404}'
Not sure why is that happening. i even added a sleep of 5 seconds to ensure the gadget is getting added to the dashboard
never mind. i had missed dashboard and hence was getting 404 :-(
The issue is resolved now. thanks for your guidance though
Hi @Vishal Biyani , sorry for the late reply, but I'm happy that you were able to resolve the problem yourself
You can accept the answer if you think it could help other users...
I am able to add "Filter Results" gadget using put method.
However, I am struggling to add "Filter Counts" gadget. i am not sure what is the right payload to use.
I tried using two calls with below payload
for projectFilterDetails i used
payload_value={"id": "11860", "type": "filter",}
for countOptions i used
{"hasTrigger": False,"trigger": {"display": "warning","triggerEquality": "above","triggerOn": "undefined" },"name": "High+ Open","jql": "priority in (Critical, High, 'Show Stopper') and status in (Open, 'In Progress')","id": "c976"}
When i call put API i get 201 and i can browse the end point
But on dashboard, the gadget shows error and does not allow me to edit it also.
Any guidance with this will be helpful.
It looks like you're new here. Sign in or register to get started.