How to delete a dashboard or panel via Curl?

I’ve tried using the following Curl command while entering my Bearer admin API key and the web dashboard URL I want deleted.

curl -X DELETE -H "Authorization: Bearer eyJrIXXXXXXX" http://localhost:3000/api/dashboards/db/your-dashboard-slug

You need to follow the URL format in the docs: Dashboard HTTP API | Grafana Labs.

Assuming that you’re using a reasonably recent version of Grafana, dashboard referencing via slugs is not supported - you need to use the dashboard UID.

1 Like

Thanks so much! That worked perfectly.

1 Like