How do I save an analysis as a dashboard using API?

Is this possible? I know I can use an analysis template to create a dashboard, but if I do this, I’m not sure if I can ‘Overwrite existing dashboard’ from the UI if I need to make additional edits from there.

You should be able to with the update-dashboard command.

https://docs.aws.amazon.com/cli/latest/reference/quicksight/update-dashboard.html

However, something to note is that the JSON schema for Analysis and Dashboards are different.

If you generate skeletons for create-dashboard and create-analysis you can see it.

Here is the start of an analysis json.

Here is the start of a dashboard json

You would need to do some transformations but it should work the same once you get to the Definition.

Here is the dashboard definition

This is the analysis definition
image

Here is a screen grab from the new apis blog.

Thanks Max, but I think you misunderstood my question.

Here is my desired flow:

  1. Create Analysis with CLI
  2. Publish Analysis as a new Dashboard with CLI (so the dashboard uses the same structure and datasets as the analysis)
  3. Edit Analysis in Quicksight UI
  4. Publish the Analysis from step 1 as a dashboard in Quicksight UI and ‘Replace an existing dashboard’ of the dashboard created in step 2. (screenshot of this step attached.)
    image
    Let me know if this is doable.

Thanks!

Ahh, yes now I see.

No, I don’t think it will configure that “link” you are looking for if you do it with the API