1

I am new to Azure Cosmos DB. I have created Azure Cosmos DB with SQL API and loaded the data and used SQL Queries. Now I want to access the Mongo API of the same DB. Is it possible?

Upon online search, I found confusing answers.

Connecting The Same Cosmos DB Database Using SQL API And Mongo API From A Blazor App

The extensible APIs that you can use include .NET, .NET Core, Node.js, Java, Python, and MongoDB. If you’re using .NET, you can use DocumentDB API, MongoDB API, Graph API, or Table API. Java and Node.js will only work with the Document DB APIs, MongoDB APIs, and Graph APIs. Python will only work with the DocumentDB API, and Gremlin, only the Graph API.

I understand that the same DB can be accessed with SQL API and Mongo API, as long as I use .NET

Am I right?

If yes, please let me know the procedure.

1 Answer 1

5

I understand that the same DB can be accessed with SQL API and Mongo API, as long as I use .NET

Am I right?

No. While it might be technically possible, it is not supported to use multiple APIs. You have to stick to the one that you chose when creating the database.

The only exception is Gremlin and SQL API. https://learn.microsoft.com/en-us/azure/cosmos-db/faq#can-i-use-multiple-apis-to-access-my-data

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.