September 10th, 2024

Introducing the Data API Preview in vCore-based Azure Cosmos DB for MongoDB

Introducing the Data API Preview in vCore-based Azure Cosmos DB for MongoDB

We’re excited to announce the preview of the Data API for vCore-based Azure Cosmos DB for MongoDB. The Data API provides a flexible and powerful way to interact with your database through HTTP-based API calls.

What is the Data API

The Data API for vCore-based Azure Cosmos DB for MongoDB allows you work with your MongoDB data through simple HTTP requests, eliminating the need for traditional drivers or  complex queries. It offers an easy way to perform basic operations like creating, reading, updating, and deleting data directly from your applications. This simplifies connecting your MongoDB data to web apps, mobile apps, or tools like Power BI, all through a familiar and user-friendly API.

Example

To read active products from a products collection:

curl --user "username:password" https://c.dataapi-validation.mongocluster.cosmos.azure.com:10331/data/v1/action/aggregate -H "Content-Type: application/ejson" -H "Accept: application/ejson" -d "{\"database\": \"myDatabase\",\"collection\": \"products\",\"pipeline\": [{\"$match\":{ \"status\": \"active\" }}]}"

This retrieves all documents from the products collection where status is active, using a straightforward HTTP request.

Why the Data API Matters

The Data API simplifies interactions with Azure Cosmos DB for MongoDB by providing a direct HTTP-based method to access and manipulate data. This feature is crucial for developers who prefer RESTful APIs over traditional database drivers. vCore-based Azure Cosmos DB for MongoDB’s Data API can be authenticated with the same MongoDB users used to access the database through the MongoDB drivers.  The same roles and permissions are applicable to both the Data API HTTPS endpoint and the MongoDB TCP endpoint.

Supporting you no matter which version you choose

Azure Cosmos DB for MongoDB is committed to supporting a wide range of MongoDB versions to meet your needs. Our single codebase approach ensures seamless, near-instant upgrades across versions.

How to Get Started

Please fill out the form to request access to the preview.

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.

Author

Gahl Levy
Principal PM Manager

Gahl has spent the last decade of his career working on databases and cloud infrastructure. He’s responsible for Azure Cosmos DB for MongoDB. Gahl earned an MBA from UC Berkeley with highest honors and a B.S. in Computer Science from UCSC. Gahl grew up in the SF Bay Area and lives in NYC.

Sajeetharan Sinnathurai
Principal Program Manager

Principal Product Manager with 13 years of experience in the software industry, including 4 years in product management and 9 years as a developer specializing in cloud platforms. I’m passionate about creating tools that empower developers, with a strong focus on developer experience and database solutions. Outside of work, I'm deeply involved in the tech community. Over the past decade, I've been the top Stack Overflow contributor and ranked in the global top 10 for Azure, Angular, and ...

More about author

1 comment

  • Sven Glöckner

    Is this announcement purely coincidental a few days after Atlas announced that it would deprecate the Data API? 😉