Dashboard update through API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 03:17 AM
Hi,
I would like to create / update dashboard definition based on the json file. How can one do it? I tried the following:
databricks api post /api/2.0/preview/sql/dashboards/$dashboard_id --json @file.json
But it does not update the widgets...
How can this be solved, I need to be able to create / update the dashboards programatically
Regards,
Pawel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 05:39 AM
To programmatically create/update dashboards in Databricks using a JSON file, you can use the Databricks REST API's workspace/export and workspace/import endpoints. Generate a JSON representation of your dashboard using workspace/export, modify it as needed, and then use workspace/import to update or create the dashboard with the modified JSON definition.
Best wishes, Zpak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 02:36 AM
Hi Zpak,
Could you please elaborate? I can not export the dashboard, the following error is returned:
Request: databricks api get /api/2.0/workspace/export --json '{"path": "/Shared/t1"}'
Error: "Error: dbsqlDashboard is not user-facing."
Thanks,
Pawel