Share via


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
accountName
path True

string

minLength: 3
maxLength: 50
pattern: ^[a-z0-9]+(-[a-z0-9]+)*

Cosmos DB database account name.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
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

MongoDBDatabaseListResult

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
AutoscaleSettings
CreateMode

Enum to indicate the mode of account creation.

MongoDBDatabaseGetResults

List of MongoDB databases and their properties.

MongoDBDatabaseListResult

The List operation response, that contains the MongoDB databases and their properties.

Options
Resource
ResourceRestoreParameters

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

Options

properties.resource

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

MongoDBDatabaseGetResults[]

List of MongoDB databases and their properties.

Options

Name Type Description
autoscaleSettings

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

CreateMode

Default

Enum to indicate the mode of resource creation.

id

string

Name of the Cosmos DB MongoDB database

restoreParameters

ResourceRestoreParameters

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.