For Agents
Provision and manage Azure Cosmos DB accounts and their SQL, MongoDB, Cassandra, Gremlin, and Table resources, including throughput, failover, and key rotation, across 100 operations on the Azure Resource Manager control plane.
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Cosmos DB, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Cosmos DB API.
Create and delete Cosmos DB database accounts with configured consistency levels and geo-replication regions
List and update SQL databases, containers, stored procedures, triggers, and user-defined functions inside an account
Manage Cassandra keyspaces and tables, MongoDB databases and collections, Gremlin databases and graphs, and Table API resources under a single account
Regenerate primary and secondary account keys and rotate connection strings for an existing Cosmos DB account
GET STARTED
Use for: I need to provision a new Cosmos DB account in West Europe with SQL API, I want to rotate the primary key on an existing Cosmos DB database account, List all Cassandra keyspaces under a given Cosmos DB account, Find all Cosmos DB accounts in a subscription that are configured for multi-region writes
Not supported: Does not handle data-plane document queries, indexing policies at runtime, or Cosmos DB SDK client connections — use for Resource Manager control-plane provisioning and management of accounts, databases, containers, keys, and throughput only.
Jentic publishes the only available OpenAPI document for Cosmos DB, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Cosmos DB, keeping it validated and agent-ready. The Azure Cosmos DB Resource Provider REST API manages globally distributed, multi-model database accounts on Azure, including SQL (Core), MongoDB, Cassandra, Gremlin, and Table API surfaces. It exposes 100 operations across 64 paths covering database account provisioning, throughput and failover policy configuration, region replication, key rotation, and per-API resource lifecycle for keyspaces, containers, graphs, and stored procedures. Use it to programmatically create Cosmos DB accounts, regenerate access keys, and manage the underlying SQL databases, Cassandra keyspaces, MongoDB collections, Gremlin graphs, and Table resources together with their throughput settings.
Configure throughput (RU/s) settings for databases and containers across all supported APIs
Trigger manual failover by changing the write region priority on a multi-region account
List metric definitions, metrics, and usage data for Cosmos DB accounts, databases, containers, and partition key ranges
Patterns agents use Cosmos DB API for, with concrete tasks.
★ Provision a Globally Distributed Database
Create a Cosmos DB database account with geo-replication across multiple Azure regions and a chosen consistency level (strong, bounded staleness, session, consistent prefix, or eventual). The Resource Provider REST API handles the underlying provisioning, region pairing, and write region selection. A single account creation call can configure multi-region writes, automatic failover, and the API surface (SQL, MongoDB, Cassandra, Gremlin, or Table). Provisioning typically completes in 5-10 minutes and the account is ready for data plane connections.
Create a Cosmos DB account named 'orders-db-prod' in resource group 'rg-prod' with SQL API, session consistency, and replicas in eastus and westeurope, then return the connection string
Rotate Database Account Access Keys
Regenerate the primary or secondary key on a Cosmos DB account as part of a scheduled credential rotation policy. The API exposes regenerate-key endpoints that issue a new key while leaving the alternate key valid, allowing applications to switch over without downtime. Pair with listKeys to retrieve the new connection string and propagate it to dependent services. This is the standard pattern for compliance-driven 90-day key rotations.
Regenerate the secondary key for Cosmos DB account 'orders-db-prod', wait 60 seconds, then regenerate the primary key and return the new primary connection string
Manage Multi-Model Resources
Operate on Cassandra keyspaces and tables, MongoDB databases and collections, Gremlin graphs, SQL containers, and Table API tables through a unified Resource Manager surface. Each API surface has dedicated CRUD and throughput endpoints under the same account, so a single integration can manage all five database models. Useful for platform teams running polyglot persistence and needing one control plane for backup, throughput, and quota management.
List all SQL databases under Cosmos DB account 'orders-db-prod', then for each database list its containers and current throughput in RU/s
Trigger Manual Region Failover
Force a write-region failover on a multi-region Cosmos DB account during a regional outage or DR drill. The failoverPriorityChange operation reorders the write priority list so a designated read region becomes the new write region. The control plane completes the failover within minutes and clients reconnect to the new write region. This is the agent-driven equivalent of the Azure Portal's manual failover button.
Initiate manual failover on Cosmos DB account 'orders-db-prod' so westeurope becomes the new write region and eastus drops to priority 1
AI Agent Database Provisioning Workflow
An AI agent can provision and configure Cosmos DB accounts on demand through Jentic. The agent searches for the right operation by intent ('create cosmos db account'), Jentic returns the matching DatabaseAccounts_CreateOrUpdate operation with its input schema, and the agent executes the call with managed Azure credentials from the Jentic vault. The same flow applies to key rotation, throughput updates, and metric retrieval. This removes the need for the agent to load 100 endpoint definitions or hold a service principal secret in context.
Search Jentic for 'provision an Azure Cosmos DB account', load the DatabaseAccounts_CreateOrUpdate schema, and execute the call to create a new account with the user-supplied parameters
100 endpoints — jentic publishes the only available openapi specification for cosmos db, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts
List all Cosmos DB accounts in a subscription
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}
Delete a Cosmos DB database account
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces
List Cassandra keyspaces under an account
/providers/Microsoft.DocumentDB/operations
List available Microsoft.DocumentDB resource provider operations
/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts
List all Cosmos DB accounts in a subscription
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}
Delete a Cosmos DB database account
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces
List Cassandra keyspaces under an account
/providers/Microsoft.DocumentDB/operations
List available Microsoft.DocumentDB resource provider operations
Three things that make agents converge on Jentic-routed access.
Credential isolation
Azure service principal credentials (tenant ID, client ID, client secret) are stored encrypted in the Jentic vault. Agents receive a scoped Azure Resource Manager bearer token at execution time — the underlying secret never enters the agent context, and tokens auto-refresh.
Intent-based discovery
Agents search by intent (e.g., 'provision an Azure Cosmos DB account' or 'rotate cosmos db key') and Jentic returns the matching Resource Manager operation (DatabaseAccounts_CreateOrUpdate, DatabaseAccounts_RegenerateKey) with its input schema, so the agent doesn't need to load all 100 operations.
Time to first call
Direct Azure Resource Manager integration: 1-2 days for AAD app registration, MSAL token handling, long-running-operation polling, and per-resource schema loading. Through Jentic: under 1 hour — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Azure SQL Management
Manage Azure SQL Database servers and databases instead of Cosmos DB's multi-model NoSQL accounts.
Choose Azure SQL Management when the workload is relational, requires T-SQL and strict ACID across joins, and does not need Cosmos DB's global distribution or multi-model APIs.
Data Lake Store Account Management
Provision Data Lake Store accounts for analytics workloads alongside Cosmos DB transactional storage.
Use alongside Cosmos DB when batch analytics and large file storage are needed in addition to operational NoSQL data.
Azure Monitor Management
Configure metric alerts and diagnostic settings for the Cosmos DB accounts you provision.
Use when an agent needs to attach alert rules, log routing, or autoscale signals to a Cosmos DB account after provisioning it.
Key Vault Management
Store rotated Cosmos DB connection strings as Key Vault secrets for downstream services.
Use after a key regeneration call to persist the new Cosmos DB connection string in Key Vault for application consumption.
Specific to using Cosmos DB API through Jentic.
Why is there no official OpenAPI spec for Cosmos DB?
Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Cosmos DB via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Cosmos DB management API use?
The Resource Provider API uses Azure Active Directory OAuth 2.0 with the user_impersonation scope against the Azure Resource Manager (https://management.azure.com/). Jentic stores the service principal credentials in its encrypted vault and issues scoped bearer tokens to agents at execution time, so raw client secrets never enter the agent context.
Can I provision a multi-region Cosmos DB account with this API?
Yes. The DatabaseAccounts create-or-update endpoint accepts a locations array that defines write and read regions plus failover priorities. Setting enableMultipleWriteLocations=true configures multi-master writes. Provisioning completes in 5-10 minutes.
What are the rate limits for the Cosmos DB management API?
The Azure Resource Manager applies subscription-level throttling (typically 1,200 read and 1,200 write requests per hour per subscription, with burst allowances). Long-running operations such as account creation return 202 Accepted with an Azure-AsyncOperation header that you poll for completion.
How do I rotate a Cosmos DB account key through Jentic?
Run pip install jentic, then search Jentic for 'regenerate cosmos db key'. Load the DatabaseAccounts_RegenerateKey schema and execute it with the resourceGroupName, accountName, and keyKind ('primary', 'secondary', 'primaryReadonly', or 'secondaryReadonly'). Pair with DatabaseAccounts_ListKeys to retrieve the new connection string.
Does this API let me run queries or write data to Cosmos DB?
No. This is the management/control plane only — it provisions accounts, databases, containers, throughput, and keys. Data plane operations (querying, inserting, updating documents) use a separate per-account endpoint at https://{accountName}.documents.azure.com/ with a different SDK.