cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dashboard update through API

pawelzak
New Contributor III

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

2 REPLIES 2

Gamlet
New Contributor II

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

pawelzak
New Contributor III

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group