Closed StephenWeatherford closed 6 years ago
Node.js Documents SDK is used to target the Document (SQL) API only, and does not include details about other APIs support by CosmosDB such as Gremlin, Cassandra etc.
The recommendation is to use Azure tools to retrieve your Microsoft.DocumentDB/databaseAcccount
resources to automate gremlin endpoint discovery.
What do you mean by "Azure tools"?
If you have a newly-created (post-GA, Dec 20) CosmosDB account with a graph in it, it will have a "gremlinEndpoint property" and "EnableGremlin" in capabilities:
{ "id": "/subscriptions/XXXX/resourceGroups/saweathergraphtest/providers/Microsoft.DocumentDB/databaseAccounts/graphtest", "name": "graphtest", "type": "Microsoft.DocumentDB/databaseAccounts", "kind": "GlobalDocumentDB", "properties": { "provisioningState": "Succeeded", "documentEndpoint": "https://saweathergraphtest.documents.azure.com:443/", "gremlinEndpoint": "https://saweathergraphtest.gremlin.cosmosdb.azure.com:443/", ... "capabilities": [ { "name": "EnableGremlin" } ] } }
But "gremlinEndpoint" is missing from the models.DatabaseAccount returned from get().