Mongo DB Resources - List Mongo DB Databases
Lists the MongoDB databases under an existing Azure Cosmos DB database account.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases?api-version=2025-04-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string minLength: 3maxLength: 50 pattern: ^[a-z0-9]+(-[a-z0-9]+)* |
Cosmos DB database account name. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The MongoDB database properties were retrieved successfully. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | Impersonate your user account |
Examples
CosmosDBMongoDBDatabaseList
Sample request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases?api-version=2025-04-15
Sample response
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName",
"name": "databaseName",
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases",
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "databaseName"
}
}
}
]
}
Definitions
Name | Description |
---|---|
Autoscale |
|
Create |
Enum to indicate the mode of account creation. |
Mongo |
List of MongoDB databases and their properties. |
Mongo |
The List operation response, that contains the MongoDB databases and their properties. |
Options | |
Resource | |
Resource |
Parameters to indicate the information about the restore. |
AutoscaleSettings
Name | Type | Description |
---|---|---|
maxThroughput |
integer |
Represents maximum throughput, the resource can scale up to. |
CreateMode
Enum to indicate the mode of account creation.
Value | Description |
---|---|
Default | |
Restore |
MongoDBDatabaseGetResults
List of MongoDB databases and their properties.
Name | Type | Description |
---|---|---|
id |
string |
The unique resource identifier of the ARM resource. |
location |
string |
The location of the resource group to which the resource belongs. |
name |
string |
The name of the ARM resource. |
properties.options | ||
properties.resource | ||
tags |
object |
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". |
type |
string |
The type of Azure resource. |
MongoDBDatabaseListResult
The List operation response, that contains the MongoDB databases and their properties.
Name | Type | Description |
---|---|---|
value |
List of MongoDB databases and their properties. |
Options
Name | Type | Description |
---|---|---|
autoscaleSettings |
Specifies the Autoscale settings. |
|
throughput |
integer |
Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. |
Resource
Name | Type | Default value | Description |
---|---|---|---|
_etag |
string |
A system generated property representing the resource etag required for optimistic concurrency control. |
|
_rid |
string |
A system generated property. A unique identifier. |
|
_ts |
number |
A system generated property that denotes the last updated timestamp of the resource. |
|
createMode | Default |
Enum to indicate the mode of resource creation. |
|
id |
string |
Name of the Cosmos DB MongoDB database |
|
restoreParameters |
Parameters to indicate the information about the restore |
ResourceRestoreParameters
Parameters to indicate the information about the restore.
Name | Type | Description |
---|---|---|
restoreSource |
string |
The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} |
restoreTimestampInUtc |
string (date-time) |
Time to which the account has to be restored (ISO-8601 format). |
restoreWithTtlDisabled |
boolean |
Specifies whether the restored account will have Time-To-Live disabled upon the successful restore. |