This post is a part of the DP-900: Microsoft Azure Data Fundamentals Exam Prep Hub.
This topic falls under these sections:
Describe considerations for working with non-relational data on Azure (15–20%)
--> Describe Capabilities and Features of Azure Cosmos DB
--> Describe Azure Cosmos DB APIs
Note that there are 10 practice questions (with answers and explanations) for each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available on the hub below the exam topics section.
Azure Cosmos DB supports multiple APIs that allow developers to interact with the database using different data models and familiar query languages.
For the DP-900 exam, you should understand what these APIs are, how they differ, and when to use each one.
What Are Azure Cosmos DB APIs?
APIs in Azure Cosmos DB define:
- How data is structured
- How it is queried
- Which tools and SDKs are used
✔ Each API provides a different way to interact with the same underlying Cosmos DB service.
Why Multiple APIs?
Azure Cosmos DB supports multiple APIs to:
- Allow developers to use familiar tools
- Enable easy migration from existing systems
- Support different types of applications and data models
💡 Key idea:
👉 Choose the API based on your application’s existing technology or data model
Core Azure Cosmos DB APIs
1. Core (SQL) API
Also known as the SQL API.
Key Features
- Uses a SQL-like query language
- Stores data as JSON documents
- Most commonly used API
Use Cases
- New application development
- General-purpose NoSQL workloads
✔ Best for: Developers familiar with SQL who want flexibility
2. MongoDB API
Key Features
- Compatible with MongoDB drivers and tools
- Uses MongoDB query syntax
Use Cases
- Migrating existing MongoDB applications
- Applications already using MongoDB
✔ Best for: MongoDB workloads moving to Azure
3. Cassandra API
Key Features
- Compatible with Apache Cassandra
- Supports Cassandra Query Language (CQL)
Use Cases
- Large-scale distributed workloads
- Applications using Cassandra
✔ Best for: Cassandra-based systems needing cloud scalability
4. Table API
Key Features
- Similar to Azure Table Storage
- Key-value data model
- Uses OData-based queries
Use Cases
- Simple key-value workloads
- Applications already using Table Storage
✔ Best for: Lightweight, scalable key-value scenarios
5. Gremlin API
Key Features
- Supports graph data models
- Uses Gremlin query language
Use Cases
- Graph-based applications
- Relationship-heavy data
✔ Best for: Social networks, recommendation engines, network analysis
Key Differences Between APIs
| API | Data Model | Query Language | Best For |
|---|---|---|---|
| Core (SQL) | Document (JSON) | SQL-like | General-purpose apps |
| MongoDB | Document | MongoDB query | MongoDB migration |
| Cassandra | Wide-column | CQL | Distributed systems |
| Table | Key-value | OData | Simple scalable storage |
| Gremlin | Graph | Gremlin | Relationship-based data |
Important Concepts for DP-900
1. Same Service, Different Interfaces
All APIs run on Azure Cosmos DB, but:
- Each API has its own endpoint
- Each uses different query syntax
- Each supports different SDKs
2. API Choice Is Permanent
- You choose the API when creating a Cosmos DB account
- You cannot switch APIs later
3. Performance and Features Are Shared
- Global distribution
- Low latency
- High availability
- Scalability
✔ These benefits apply regardless of API choice.
When to Choose Each API
- Core (SQL) API → Default choice for most applications
- MongoDB API → Existing MongoDB apps
- Cassandra API → Distributed, large-scale systems
- Table API → Simple key-value workloads
- Gremlin API → Graph relationships
Why This Matters for DP-900
On the exam, you may be asked to:
- Identify the correct API for a scenario
- Match APIs to data models
- Understand why multiple APIs exist
- Recognize migration scenarios
Summary — Exam-Relevant Takeaways
✔ Azure Cosmos DB supports multiple APIs:
- Core (SQL) API
- MongoDB API
- Cassandra API
- Table API
- Gremlin API
✔ Each API:
- Uses a different data model
- Has its own query language
✔ Key concept:
👉 Choose the API based on your application’s needs or existing system
✔ Important:
- API choice is fixed at creation
- All APIs benefit from Cosmos DB features (scalability, global distribution)
Go to the Practice Exam Questions for this topic.
Go to the DP-900 Exam Prep Hub main page.
