Title: General Availability for Data API in vCore-based Azure Cosmos DB for MongoDB
We’re excited to announce the general availability of the Data API for vCore-based Azure Cosmos DB for MongoDB!
Overview
The Data API is a RESTful HTTPS interface that enables developers to interact with their MongoDB data hosted in vCore-based Azure Cosmos DB directly from their applications—no drivers or complex query logic required. It offers a simple, efficient way to connect your MongoDB data with web apps, mobile apps, and tools like Power BI.
At launch, the Data API supports the following read operations:
- aggregate
- listDatabases
- listCollections
- getSchema
Initial support focuses on read operations, with write capabilities planned for future updates. By simplifying how apps access data, the Data API reduces overhead and accelerates development across a wide range of use cases.
Usage Examples:
Aggregate
Request:
curl {cluster-name}.data.mongocluster.cosmos.azure.com:443/data/v1/action/aggregate -H "Content-Type: application/ejson" -H "Accept:application/ejson" -d '{"database" : "testDB", "collection" : "testCollection", "pipeline" : [{"$limit" : 500}]}' --user "{username}:{password}"
Output:
{
"documents": [
{
"_id": {
"$oid": "680957492551581200c73bf8"
},
"name": "Sample Document",
"createdAt": {
"$date": {
"$numberLong": "1745442633506"
}
},
"tags": [
"test",
"mongo",
"sample"
]
}
]
}
ListDatabases
Request:
curl {cluster-name}.data.global.mongocluster.cosmos.azure.com:443/data/v1/action/listDatabases -H "Content-Type: application/ejson" -H "Accept:application/ejson" -d '{}' --user "{username}:{password}"
Output:
{
"databases": [
{
"name": "testDB",
"sizeOnDisk": {
"$numberInt": "0"
},
"empty": false
},
{
"name": "test",
"sizeOnDisk": {
"$numberInt": "0"
},
"empty": false
}
],
"totalSize": {
"$numberInt": "0"
},
"ok": {
"$numberDouble": "1.0"
}
}
ListCollections
Request:
curl {cluster-name}.data.global.mongocluster.cosmos.azure.com:443/data/v1/action/listCollections -H "Content-Type: application/ejson" -H "Accept:application/ejson" -d '{"database": "newDB"}' --user "{username}:{password}"
Output:
{
"collections": [
{
"name": "testCollection",
"type": "collection",
"options": {},
"info": {
"readOnly": false,
"uuid": {
"$binary": {
"base64": "mNh96KepTm+NtLtALGxDiw==",
"subType": "04"
}
}
},
"idIndex": {
"v": {
"$numberInt": "2"
},
"name": "_id_",
"key": {
"_id": {
"$numberInt": "1"
}
}
}
}
]
}
GetSchema
Request:
curl {cluster-name}.data.mongocluster.cosmos.azure.com:443/data/v1/action/getSchema -H "Content-Type: application/ejson" -H "Accept:application/ejson" -d '{"database" : "testDB", "collection" : "testCollection"}' --user "{username}:{password}"
Output:
{
"_id": {
"bsonType": "objectId"
},
"name": {
"bsonType": "string"
},
"createdAt": {
"bsonType": "date"
},
"tags": {
"bsonType": "array"
}
}
HTTPs vs TCP
Previously, developers accessed vCore-based Azure Cosmos DB for MongoDB using only TCP endpoints. With the introduction of an HTTPS endpoint through the Data API, the experience has fundamentally improved. Developers can now build applications using familiar RESTful APIs, without needing to manage specialized drivers or complex protocols. The Data API delivers a secure, modern, and developer-friendly way to connect to MongoDB data.
PowerBI Connector
The Data API for vCore-based Azure Cosmos DB for MongoDB now supports direct integration with Power BI through a certified connector. This powerful capability allows teams to query live operational data directly within Power BI—no data movement, duplication, or ETL required.
By leveraging the HTTPS-based Data API, users can:
- Securely connect to MongoDB collections in real time
- Transform complex JSON documents into structured models using Power Query
- Build rich, interactive dashboards powered by live data
Whether you’re monitoring inventory, analyzing user behavior, or creating executive reports, this integration brings your analytics layer closer to your application data—seamlessly and securely.
Authentication
The Data API for vCore-based Azure Cosmos DB for MongoDB uses the same MongoDB user authentication as the TCP endpoint. Roles and permissions assigned to MongoDB users apply seamlessly across both connection methods—whether you’re accessing data through drivers or via the HTTPS-based Data API.
At launch, the Data API supports HMAC authentication. Support for Microsoft Entra ID is coming soon, enabling even more secure and flexible identity integration.
How to Get Started
If you’re ready to explore the Data API for vCore-based Azure Cosmos DB for MongoDB, you can get started today. If you already have a cluster, simply go to the Features blade in the Azure Portal and enable the Data API for your existing vCore-based MongoDB cluster. If you’re new to vCore-based Azure Cosmos DB for MongoDB, you can create a new cluster directly in the Azure Portal and start using the Data API right away.
Features Blade
Data API ‘On’ Status
For more information and step-by-step guidance, visit our public documentation.
Learn More
Stay tuned—we’ll be sharing tutorials, demos, and walkthroughs to help you set up Power BI dashboards with ease. In the meantime, if you’re using vCore-based Azure Cosmos DB for MongoDB, you’re just a few clicks away from unlocking powerful, real-time business intelligence. Visit the Azure Portal to get started today.
Leave a reviewÂ
Tell us about your Azure Cosmos DB experience! Leave a review on PeerSpot and we’ll gift you $50. Get started here.
 About Azure Cosmos DBÂ
Azure Cosmos DB is a fully managed and serverless distributed database for modern app development, with SLA-backed speed and availability, automatic and instant scalability, and support for open-source PostgreSQL, MongoDB, and Apache Cassandra. Try Azure Cosmos DB for free here. To stay in the loop on Azure Cosmos DB updates, follow us on X, YouTube, and LinkedIn.
0 comments
Be the first to start the discussion.