API to script export, import dashboards

OpenSearch/Dashboard v2 in an OVHcloud instance

I built a generic dashboard. And now I want to copy/paste it with a new created index.
Because I have to do this a bunch of times, I would like to script it.

So I would like to export a dashboard, then modify it (this part I known to do it by changing the index ref in the json) then to import the modified dashboard.

I tried unsuccessfully to find the curl commands to do this. I read some web-pages on the subject but it seems to be out of date.

Thanks in advance for your help

@seanneumann - do you know someone who could assist @hervemathieu on this one? thank you

I wish I had a better answer, such as a link to some nice user docs. But those don’t exist yet. In the meantime, there’s lots of community discussion and examples you might find helpful on Confusing opensearch dashboard import API · Issue #1723 · opensearch-project/OpenSearch-Dashboards · GitHub