Delete dashboard and all of its contents through kibana API

Hi,

Is there any way to delete a dashboard and all of its contents (index, visualizations etc) through kibana API?
Also is there any way to delete all saved objects through kibana (or Elasticsearch) API?
Thank you in advance!

BR
Paraskevi

Yes ,you can remove them is though the "Saved Objects" interface on the Kibana Management tab. You'd need to remove dashboards, searches, and visualization related to the data.
DELETE /api/saved_objects/<type>/<id>

https://www.elastic.co/guide/en/kibana/master/saved-objects-api-delete.html

Hope this helps,
Thanks
Rashmi