Forums

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

Get dashboard by name and updating via web api

Deleted user
April 21, 2022

I'm trying to use the dashboard/search api to get a dashboard and then I want to update the dashboard after that once I have the ID for it. I am attempting to do this using the web api and assuming I need to utilize the jql in the get url. Can anyone help me to understand how to get that information. 

i.e. https://url/rest/api/3/dashboard/search?jql=name=dashboardname

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Catworkx_
Community Champion
April 21, 2022

Hi @[deleted] ,

you can use https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/#api-rest-api-3-dashboard-id-get to retrieve a dashboard by name. Please use dashboardName parameter.

After doing that, you can update it using the following Rest API https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/#api-rest-api-3-dashboard-id-put

Hope this helps,

Fabio

Deleted user
April 21, 2022

Thank you for the help. I'm having trouble understanding the formatting for this. I'm trying https://url/rest/api/3/dashboard with a json body of 
{
  "dashboardName":"name"
}

 

and variation on that theme as well. Can you help me with the actual formatting. I'm testing with postman at the moment.

Like Mounika Dontha likes this
Fabio Racobaldo _Catworkx_
Community Champion
April 21, 2022

@[deleted] , the correct api to search dashboard via name is :

https://YOUR_INSTANCE_URL/rest/api/3/dashboard/search 

the parameter is correct

Deleted user
April 21, 2022

@Fabio Racobaldo _Catworkx_  Everytime I run that it just returns all dashboards.

Deleted user
April 21, 2022

@Fabio Racobaldo _Catworkx_  I finally figured it out. I put this: 

...dashboard/search?jql=&dashboardName="dashboard name here" and it worked

 

Thanks

Fabio Racobaldo _Catworkx_
Community Champion
April 22, 2022

I'm happy for that! Please mark my answer as accepted

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events