Can we use Kibana REST API's to create the dashboards Programmatically in OpenSearchDashboard

Is this what you are after?

We use a CURL command to programmatically create visualisations and dashboards

curl -X POST \\
     -H "osd-xsrf: true" \\
     -H "securitytenant: $tenant" \\
     "http://$USERNAME:$PASSWORD@host:5601/api/saved_objects/_import?overwrite=true" \\
     --form file=@data.ndjson