Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get content of Dashboard - Text Gadget via API

Alexander Richter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2020

Is there a way to retrieve the content of the text gadget on a specific dashboard via API.

We want to create a report that shows where this gadget is used and what is it's content.

There were/are some security issues with pasting HTML into this gadget, so we want to check that from time to time.

I already found this community post: https://community.atlassian.com/t5/Answers-Developer-Questions/how-to-show-contents-of-a-gadget-inside-a-dashboard-using-jira/qaq-p/507745

But i can't find the API as described there.

Cheers,
Alex

1 answer

1 accepted

0 votes
Answer accepted
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2020

Hello Alexander

From the REST API's perspective, a gadget is an item on a dashboard.

The rest/api/2/dashboard endpoint returns a list of all the dashboards and their IDs, but not what items are on those dashboards.

The rest/api/2/dashboard/{dashboardId}/items/{itemId}/properties endpoint returns information about an item on a dashboard, but you'd have to know the ID of that item first.

Unfortunately, it looks like there is no intermediate endpoint like rest/api/2/dashboard/{dashboardId}/items that returns all the items on a dashboard and their IDs, so I don't think there's currently a way to go randomly searching for dashboard items.

Alexander Richter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2020

Hi David,

thanks for your answer. I thought so.. 

Cheers,
Alex

Suggest an answer

Log in or Sign up to answer