{"id":8637,"date":"2024-09-10T09:00:41","date_gmt":"2024-09-10T16:00:41","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=8637"},"modified":"2024-09-10T13:36:09","modified_gmt":"2024-09-10T20:36:09","slug":"introducing-the-data-api-preview-in-vcore-based-azure-cosmos-db-for-mongodb","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/introducing-the-data-api-preview-in-vcore-based-azure-cosmos-db-for-mongodb\/","title":{"rendered":"Introducing the Data API Preview in vCore-based Azure Cosmos DB for MongoDB"},"content":{"rendered":"<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/09\/blogintro3.png\"><img decoding=\"async\" class=\"aligncenter wp-image-8658 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/09\/blogintro3.png\" alt=\"Introducing the Data API Preview in vCore-based Azure Cosmos DB for MongoDB\" width=\"748\" height=\"436\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/09\/blogintro3.png 748w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2024\/09\/blogintro3-300x175.png 300w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/a><\/p>\n<p>We&#8217;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.<\/p>\n<h2><strong>What is the Data API <\/strong><\/h2>\n<p>The Data API for <a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/mongodb\/vcore\/\" target=\"_blank\" rel=\"noopener\">vCore-based Azure Cosmos DB for MongoDB<\/a> allows you work with your MongoDB data through simple HTTP requests, eliminating the need for traditional drivers or \u00a0complex 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.<\/p>\n<h3><strong>Example<\/strong><\/h3>\n<p>To read active products from a products collection:<\/p>\n<p><code>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\\\" }}]}\"<\/code><\/p>\n<p>This retrieves all documents from the products collection where status is active, using a straightforward HTTP request.<\/p>\n<h2><strong>Why the Data API Matters<\/strong><\/h2>\n<p>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. <span data-teams=\"true\"><span class=\"ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak\" dir=\"ltr\">vCore-based Azure Cosmos DB for MongoDB&#8217;s Data API can be authenticated with the same MongoDB users used to access the database through the MongoDB drivers. \u00a0The same roles and permissions are applicable to both the Data API HTTPS endpoint and the MongoDB TCP endpoint.<\/span><\/span><\/p>\n<h2><strong>Supporting you no matter which version you choose<\/strong><\/h2>\n<p>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.<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/mongodb\/vcore\/introduction\" target=\"_blank\" rel=\"noopener\">vCore Architecture<\/a>:<\/strong> Supports MongoDB 5.0, 6.0, and 7,0.<\/li>\n<li><strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/cosmos-db\/mongodb\/ru\/introduction\" target=\"_blank\" rel=\"noopener\">RU Architecture<\/a>:<\/strong> Supports versions as far back as MongoDB 3.2 all the way to 7.0<\/li>\n<\/ul>\n<h2><strong>How to Get Started<\/strong><\/h2>\n<p>Please <a href=\"https:\/\/aka.ms\/AzureCosmosDB\/DataAPIPubPreview\" target=\"_blank\" rel=\"noopener\">fill out the form<\/a> to request access to the preview.<\/p>\n<h2><strong>About Azure Cosmos DB<\/strong><\/h2>\n<p>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 <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/cosmos-db\/\">here<\/a>. To stay in the loop on Azure Cosmos DB updates, follow us on <a href=\"https:\/\/twitter.com\/azurecosmosdb\">X<\/a>, <a href=\"https:\/\/www.youtube.com\/channel\/UCxZVmw8Rt_xmTpPIzLRMDkw\">YouTube<\/a>, and <a href=\"https:\/\/www.linkedin.com\/showcase\/azure-cosmos-db\">LinkedIn<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":53146,"featured_media":8658,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-8637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb-api"],"acf":[],"blog_post_summary":"<p>We&#8217;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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/8637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/53146"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=8637"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/8637\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/8658"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=8637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=8637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=8637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}