How to import a Lakeview Dashboard programmatically (API or CLI)?

Gutek
New Contributor II

I'm trying to import a Lakeview Dashboard that I've originally exported through the CLI (version 0.213.0). The exported file has extension .lvdash.json and is a single line json file.

I can't get it to work, I tried this command:

 

databricks workspace import /Users/my@user.com/my_first_lakeview_dashboard.lvdash.json --profile prd --file dashboard.json

 

but I get: "Error: The zip file may not be valid or may be an unsupported version. Hint: Objects imported using format=SOURCE are expected to be zip encoded databricks source notebook(s) by default. Please specify a language using the --language flag if you are trying to import a single uncompressed notebook"

There is a language flag but the only options available are: [PYTHON, R, SCALA, SQL].

There is json flag but it's only for providing the request in JSON format.

There is no mention of Lakeview dashboards in this API. Is this even supported? Or do I have the syntax wrong? The Lakeview API only supports publishing.