Restorable Mongodb Databases - List

Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the restorable account. This helps in scenario where database was accidentally deleted to get the deletion time. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases?api-version=2024-11-15

URI Parameters

Name In Required Type Description
instanceId
path True

string

The instanceId GUID of a restorable database account.

location
path True

string

Cosmos DB region, with spaces between words and each word capitalized.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

RestorableMongodbDatabasesListResult

The operation completed successfully.

Other Status Codes

CloudError

Error response describing why the operation failed.

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

CosmosDBRestorableMongodbDatabaseList

Sample request

GET https://management.azure.com/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases?api-version=2024-11-15

Sample response

{
  "value": [
    {
      "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc",
      "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases",
      "name": "59c21367-b98b-4a8e-abb7-b6f46600decc",
      "properties": {
        "resource": {
          "_rid": "DLB14gAAAA==",
          "eventTimestamp": "2020-09-02T19:45:03Z",
          "ownerId": "Database1",
          "ownerResourceId": "PD5DALigDgw=",
          "operationType": "Create",
          "canUndelete": "invalid"
        }
      }
    },
    {
      "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257",
      "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases",
      "name": "8456cb17-cdb0-4c6a-8db8-d0ff3f886257",
      "properties": {
        "resource": {
          "_rid": "ESXNLAAAAA==",
          "eventTimestamp": "2020-09-02T19:53:42Z",
          "ownerId": "Database1",
          "ownerResourceId": "PD5DALigDgw=",
          "operationType": "Delete",
          "canUndelete": "notRestorable",
          "canUndeleteReason": "Database already exists. Only deleted resources can be restored within same account."
        }
      }
    }
  ]
}

Definitions

Name Description
CloudError

An error response from the service.

ErrorResponse

Error Response.

OperationType

Enum to indicate the operation type of the event.

Resource

The resource of an Azure Cosmos DB MongoDB database event

RestorableMongodbDatabaseGetResult

An Azure Cosmos DB MongoDB database event

RestorableMongodbDatabasesListResult

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

CloudError

An error response from the service.

Name Type Description
error

ErrorResponse

Error Response.

ErrorResponse

Error Response.

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

OperationType

Enum to indicate the operation type of the event.

Name Type Description
Create

string

Delete

string

Recreate

string

Replace

string

SystemOperation

string

Resource

The resource of an Azure Cosmos DB MongoDB database event

Name Type Description
_rid

string

A system generated property. A unique identifier.

canUndelete

string

A state of this database to identify if this database is restorable in same account.

canUndeleteReason

string

The reason why this database can not be restored in same account.

eventTimestamp

string

The time when this database event happened.

operationType

OperationType

The operation type of this database event.

ownerId

string

The name of this MongoDB database.

ownerResourceId

string

The resource ID of this MongoDB database.

RestorableMongodbDatabaseGetResult

An Azure Cosmos DB MongoDB database event

Name Type Description
id

string

The unique resource Identifier of the ARM resource.

name

string

The name of the ARM resource.

properties.resource

Resource

The resource of an Azure Cosmos DB MongoDB database event

type

string

The type of Azure resource.

RestorableMongodbDatabasesListResult

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

Name Type Description
value

RestorableMongodbDatabaseGetResult[]

List of MongoDB database events and their properties.