Restorable Tables - List
Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario where table was accidentally deleted. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables?api-version=2024-11-15
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables?api-version=2024-11-15&startTime={startTime}&endTime={endTime}
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 |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
end
|
query |
string |
Restorable Tables event feed end time. |
|
start
|
query |
string |
Restorable Tables event feed start time. |
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
CosmosDBRestorableTableList
Sample request
Sample response
{
"value": [
{
"id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableTables/79609a98-3394-41f8-911f-cfab0c075c86",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables",
"name": "79609a98-3394-41f8-911f-cfab0c075c86",
"properties": {
"resource": {
"_rid": "zAyAPQAAAA==",
"eventTimestamp": "2020-10-13T04:56:42Z",
"ownerId": "Table1",
"ownerResourceId": "V18LoLrv-qA=",
"operationType": "Create",
"canUndelete": "invalid"
}
}
},
{
"id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableTables/79609a98-3394-41f8-911f-cfab0c075c86",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableTables",
"name": "79609a98-3394-41f8-911f-cfab0c075c86",
"properties": {
"resource": {
"_rid": "zAyAPQAAAA==",
"eventTimestamp": "2020-10-13T04:56:42Z",
"ownerId": "Table1",
"ownerResourceId": "V18LoLrv-qA=",
"operationType": "Delete",
"canUndelete": "notRestorable",
"canUndeleteReason": "Collection with same name already exist as live collection."
}
}
}
]
}
Definitions
Name | Description |
---|---|
Cloud |
An error response from the service. |
Error |
Error Response. |
Operation |
Enum to indicate the operation type of the event. |
Resource |
The resource of an Azure Cosmos DB Table event |
Restorable |
An Azure Cosmos DB Table event |
Restorable |
The List operation response, that contains the Table events and their properties. |
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. |
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 Table event
Name | Type | Description |
---|---|---|
_rid |
string |
A system generated property. A unique identifier. |
canUndelete |
string |
A state of this table to identify if this table is restorable in same account. |
canUndeleteReason |
string |
The reason why this table can not be restored in same account. |
eventTimestamp |
string |
The time when this table event happened. |
operationType |
The operation type of this table event. |
|
ownerId |
string |
The name of this Table. |
ownerResourceId |
string |
The resource ID of this Table. |
RestorableTableGetResult
An Azure Cosmos DB Table event
Name | Type | Description |
---|---|---|
id |
string |
The unique resource Identifier of the ARM resource. |
name |
string |
The name of the ARM resource. |
properties.resource |
The resource of an Azure Cosmos DB Table event |
|
type |
string |
The type of Azure resource. |
RestorableTablesListResult
The List operation response, that contains the Table events and their properties.
Name | Type | Description |
---|---|---|
value |
List of Table events and their properties. |