Restorable Sql Resources - List
Return a list of database and container combo that exist on the account at the given timestamp and ___location. This helps in scenarios to validate what resources exist at given timestamp and ___location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{___location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources?api-version=2025-04-15
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{___location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources?api-version=2025-04-15&restoreLocation={restoreLocation}&restoreTimestampInUtc={restoreTimestampInUtc}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
instance
|
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. |
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. |
restore
|
query |
string |
The ___location where the restorable resources are located. |
|
restore
|
query |
string |
The timestamp when the restorable resources existed. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The operation completed successfully. |
|
Other Status Codes |
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
CosmosDBRestorableSqlResourceList
Sample request
GET https://management.azure.com/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableSqlResources?api-version=2025-04-15&restoreLocation=WestUS&restoreTimestampInUtc=06/01/2022 4:56
Sample response
{
"value": [
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database1",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources",
"name": "Database1",
"databaseName": "Database1",
"collectionNames": [
"Container1"
]
},
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database2",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources",
"name": "Database2",
"databaseName": "Database2",
"collectionNames": [
"Container1",
"Container2"
]
},
{
"id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDB/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorablesqlresources/Database3",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorablesqlresources",
"name": "Database3",
"databaseName": "Database3",
"collectionNames": []
}
]
}
Definitions
Name | Description |
---|---|
Cloud |
An error response from the service. |
Error |
Error Response. |
Restorable |
Specific Databases to restore. |
Restorable |
The List operation response, that contains the restorable SQL resources. |
CloudError
An error response from the service.
Name | Type | Description |
---|---|---|
error |
Error Response. |
ErrorResponse
Error Response.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
RestorableSqlResourcesGetResult
Specific Databases to restore.
Name | Type | Description |
---|---|---|
collectionNames |
string[] |
The names of the collections available for restore. |
databaseName |
string |
The name of the database available for restore. |
id |
string |
The unique resource identifier of the ARM resource. |
name |
string |
The name of the ARM resource. |
type |
string |
The type of Azure resource. |
RestorableSqlResourcesListResult
The List operation response, that contains the restorable SQL resources.
Name | Type | Description |
---|---|---|
value |
List of restorable SQL resources, including the database and collection names. |