I saw that CosmosDB can be accessed via any supported api regardless of whether it's set up as a GraphDB first. https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb-introduction I see the example where I can run a SQL query against the graph database - but how do I get the MongoDB api connection string for it?
Since it was set up as a graphdb api from the start, the mongo db connection strings don't appear in the settings like so: https://learn.microsoft.com/en-us/azure/cosmos-db/connect-mongodb-account#GetCustomConnection
Instead I only see the keys settings.
So it looks like all I have to do is use the primary key as the password and use the same uri with ssl as the endpoint.
e.g. mongodb://[myInstanceName]:[primaryAccountKey]@[myInstanceName].documents.azure.com:10255/?ssl=true
I left out &replicaSet=globaldb
because I was getting errors with that..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With