0

I am able to access dashboards using the following api call-

url2 = server + "/api/dashboards/uid/" + uid  #uid of dashboard
r = requests.get(url=url2, headers=headers, verify=False)

From this I can retrieve panel details in a particular dashboard.

Is there any way I can delete a panel inside this dashboard with or without grafana api?

avm
  • 387
  • 3
  • 16

1 Answers1

0

You cannot directly delete a panel inside a dashboard using the API.

It is possible to retrieve the dashboard JSON via the API (as you explained in your question), then programmatically edit that JSON in your python code so that the panel is removed, and then overwrite the dashboard using the API again.

dnnshssm
  • 1,057
  • 6
  • 17