@Priyanka Hurakadli
Thank you for the question and for using Microsoft Q&A platform.
As per my understanding you are facing an issue with connecting to your Azure Cosmos DB for MongoDB vCore cluster. Here are a few steps to troubleshoot:
- This issue might occur when the cluster doesn't have the correct firewall rules enabled. If you're trying to access the cluster from a non-Azure IP range, you need to add extra firewall rules. https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/troubleshoot-common-issues#unable-to-connect-to-azure-cosmos-db-for-mongodb-vcore---timeout-error
- Ensure that you are using a compatible version of the MongoDB driver for your Python code. Sometimes, version mismatches can lead to connection issues.
- If you are using environment variables to store your connection string, ensure they are correctly set and accessible in your Python environment.
MongoDB REST API:
The Data API for Azure Cosmos DB for MongoDB vCore is an https interface that allows developers to access and interact with their MongoDB vCore data without needing a database driver.
You can enable or disable this feature using the Azure CLI or an ARM template.
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/data-api
There are also some limitations:
- Data API works on newly created MongoDB vCore cluster.
- Data API doesn't support access using reusable access token.
- Only support aggregate and few other list control plane actions.
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.