Restorable Sql Containers - List
Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific database. This helps in scenario where container 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}/restorableSqlContainers?api-version=2025-10-15
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers?api-version=2025-10-15&restorableSqlDatabaseRid={restorableSqlDatabaseRid}&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 minLength: 1 |
The ID of the target subscription. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
end
|
query |
string |
Restorable Sql containers event feed end time. |
|
|
restorable
|
query |
string |
The resource ID of the SQL database. |
|
|
start
|
query |
string |
Restorable Sql containers 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
CosmosDBRestorableSqlContainerList
Sample request
GET https://management.azure.com/subscriptions/subid/providers/Microsoft.DocumentDB/locations/WestUS/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers?api-version=2025-10-15&restorableSqlDatabaseRid=3fu-hg==
Sample response
{
"value": [
{
"id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/79609a98-3394-41f8-911f-cfab0c075c86",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers",
"name": "79609a98-3394-41f8-911f-cfab0c075c86",
"properties": {
"resource": {
"_rid": "zAyAPQAAAA==",
"eventTimestamp": "2020-10-13T04:56:42Z",
"ownerId": "Container1",
"ownerResourceId": "V18LoLrv-qA=",
"operationType": "Create",
"canUndelete": "invalid",
"container": {
"id": "Container1",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
},
{
"path": "/\"_ts\"/?"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/_ts",
"conflictResolutionProcedure": ""
},
"_rid": "V18LoLrv-qA=",
"_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/",
"_etag": "\"00003e00-0000-0700-0000-5f85338a0000\""
}
}
}
},
{
"id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/e85298a1-c631-4726-825e-a7ca092e9098",
"type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers",
"name": "e85298a1-c631-4726-825e-a7ca092e9098",
"properties": {
"resource": {
"_rid": "PrArcgAAAA==",
"eventTimestamp": "2020-10-13T05:03:27Z",
"ownerId": "Container1",
"ownerResourceId": "V18LoLrv-qA=",
"operationType": "Replace",
"canUndelete": "invalid",
"container": {
"id": "Container1",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
},
{
"path": "/\"_ts\"/?"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
"defaultTtl": 12345,
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/_ts",
"conflictResolutionProcedure": ""
},
"_rid": "V18LoLrv-qA=",
"_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/",
"_etag": "\"00004400-0000-0700-0000-5f85351f0000\""
}
}
}
}
]
}
Definitions
| Name | Description |
|---|---|
|
Client |
. |
|
Client |
Cosmos DB client encryption policy. |
|
Cloud |
An error response from the service. |
|
Composite |
|
|
Composite |
Sort order for composite paths. |
|
Computed |
The definition of a computed property |
|
Conflict |
Indicates the conflict resolution mode. |
|
Conflict |
The conflict resolution policy for the container. |
| Container |
Cosmos DB SQL container resource object |
|
Container |
The configuration of the partition key to be used for partitioning data into multiple partitions |
|
Create |
Enum to indicate the mode of account creation. |
|
Data |
The datatype for which the indexing behavior is applied to. |
|
Distance |
The distance function to use for distance calculation in between vectors. |
|
Error |
Error Response. |
|
Excluded |
|
|
Full |
Represents the full text index path. |
|
Full |
Represents the full text path specification. |
|
Full |
Cosmos DB FullText Policy |
|
Included |
The paths that are included in indexing |
| Indexes |
The indexes for the path. |
|
Indexing |
Indicates the indexing mode. |
|
Indexing |
Cosmos DB indexing policy |
|
Index |
Indicates the type of index. |
|
Operation |
Enum to indicate the operation type of the event. |
|
Partition |
Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create |
| Resource |
The resource of an Azure Cosmos DB SQL container event |
|
Resource |
Parameters to indicate the information about the restore. |
|
Restorable |
An Azure Cosmos DB SQL container event |
|
Restorable |
The List operation response, that contains the SQL container events and their properties. |
|
Spatial |
|
|
Spatial |
Indicates the spatial type of index. |
|
Unique |
The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. |
|
Unique |
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. |
|
Vector |
Indicates the data type of vector. |
|
Vector |
Represents a vector embedding. A vector embedding is used to define a vector field in the documents. |
|
Vector |
Cosmos DB Vector Embedding Policy |
|
Vector |
|
|
Vector |
The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported. |
ClientEncryptionIncludedPath
.
| Name | Type | Description |
|---|---|---|
| clientEncryptionKeyId |
string |
The identifier of the Client Encryption Key to be used to encrypt the path. |
| encryptionAlgorithm |
string |
The encryption algorithm which will be used. Eg - AEAD_AES_256_CBC_HMAC_SHA256. |
| encryptionType |
string |
The type of encryption to be performed. Eg - Deterministic, Randomized. |
| path |
string |
Path that needs to be encrypted. |
ClientEncryptionPolicy
Cosmos DB client encryption policy.
| Name | Type | Description |
|---|---|---|
| includedPaths |
Paths of the item that need encryption along with path-specific settings. |
|
| policyFormatVersion |
integer (int32) minimum: 1maximum: 2 |
Version of the client encryption policy definition. Supported versions are 1 and 2. Version 2 supports id and partition key path encryption. |
CloudError
An error response from the service.
| Name | Type | Description |
|---|---|---|
| error |
Error Response. |
CompositePath
| Name | Type | Description |
|---|---|---|
| order |
Sort order for composite paths. |
|
| path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
CompositePathSortOrder
Sort order for composite paths.
| Value | Description |
|---|---|
| ascending | |
| descending |
ComputedProperty
The definition of a computed property
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of a computed property, for example - "cp_lowerName" |
| query |
string |
The query that evaluates the value for computed property, for example - "SELECT VALUE LOWER(c.name) FROM c" |
ConflictResolutionMode
Indicates the conflict resolution mode.
| Value | Description |
|---|---|
| LastWriterWins | |
| Custom |
ConflictResolutionPolicy
The conflict resolution policy for the container.
| Name | Type | Default value | Description |
|---|---|---|---|
| conflictResolutionPath |
string |
The conflict resolution path in the case of LastWriterWins mode. |
|
| conflictResolutionProcedure |
string |
The procedure to resolve conflicts in the case of custom mode. |
|
| mode | LastWriterWins |
Indicates the conflict resolution mode. |
Container
Cosmos DB SQL container resource object
| 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. |
|
| _self |
string |
A system generated property that specifies the addressable path of the container resource. |
|
| _ts |
number |
A system generated property that denotes the last updated timestamp of the resource. |
|
| analyticalStorageTtl |
integer (int64) |
Analytical TTL. |
|
| clientEncryptionPolicy |
The client encryption policy for the container. |
||
| computedProperties |
List of computed properties |
||
| conflictResolutionPolicy |
The conflict resolution policy for the container. |
||
| createMode | Default |
Enum to indicate the mode of resource creation. |
|
| defaultTtl |
integer |
Default time to live |
|
| fullTextPolicy |
The FullText policy for the container. |
||
| id |
string |
Name of the Cosmos DB SQL container |
|
| indexingPolicy |
The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container |
||
| partitionKey |
The configuration of the partition key to be used for partitioning data into multiple partitions |
||
| restoreParameters |
Parameters to indicate the information about the restore |
||
| uniqueKeyPolicy |
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. |
||
| vectorEmbeddingPolicy |
The vector embedding policy for the container. |
ContainerPartitionKey
The configuration of the partition key to be used for partitioning data into multiple partitions
| Name | Type | Default value | Description |
|---|---|---|---|
| kind | Hash |
Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create |
|
| paths |
string[] |
List of paths using which data within the container can be partitioned |
|
| systemKey |
boolean |
Indicates if the container is using a system generated partition key |
|
| version |
integer (int32) minimum: 1maximum: 2 |
Indicates the version of the partition key definition |
CreateMode
Enum to indicate the mode of account creation.
| Value | Description |
|---|---|
| Default | |
| Restore |
DataType
The datatype for which the indexing behavior is applied to.
| Value | Description |
|---|---|
| String | |
| Number | |
| Point | |
| Polygon | |
| LineString | |
| MultiPolygon |
DistanceFunction
The distance function to use for distance calculation in between vectors.
| Value | Description |
|---|---|
| euclidean | |
| cosine | |
| dotproduct |
ErrorResponse
Error Response.
| Name | Type | Description |
|---|---|---|
| code |
string |
Error code. |
| message |
string |
Error message indicating why the operation failed. |
ExcludedPath
| Name | Type | Description |
|---|---|---|
| path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
FullTextIndexPath
Represents the full text index path.
| Name | Type | Description |
|---|---|---|
| path |
string |
The path to the full text field in the document. |
FullTextPath
Represents the full text path specification.
| Name | Type | Description |
|---|---|---|
| language |
string |
The language of the full text field in the document. |
| path |
string |
The path to the full text field in the document. |
FullTextPolicy
Cosmos DB FullText Policy
| Name | Type | Description |
|---|---|---|
| defaultLanguage |
string |
The default language for a full text paths. |
| fullTextPaths |
List of FullText Paths |
IncludedPath
The paths that are included in indexing
| Name | Type | Description |
|---|---|---|
| indexes |
Indexes[] |
List of indexes for this path |
| path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
Indexes
The indexes for the path.
| Name | Type | Default value | Description |
|---|---|---|---|
| dataType | String |
The datatype for which the indexing behavior is applied to. |
|
| kind | Hash |
Indicates the type of index. |
|
| precision |
integer |
The precision of the index. -1 is maximum precision. |
IndexingMode
Indicates the indexing mode.
| Value | Description |
|---|---|
| consistent | |
| lazy | |
| none |
IndexingPolicy
Cosmos DB indexing policy
| Name | Type | Default value | Description |
|---|---|---|---|
| automatic |
boolean |
Indicates if the indexing policy is automatic |
|
| compositeIndexes |
List of composite path list |
||
| excludedPaths |
List of paths to exclude from indexing |
||
| fullTextIndexes |
List of paths to include in the full text indexing |
||
| includedPaths |
List of paths to include in the indexing |
||
| indexingMode | consistent |
Indicates the indexing mode. |
|
| spatialIndexes |
List of spatial specifics |
||
| vectorIndexes |
List of paths to include in the vector indexing |
IndexKind
Indicates the type of index.
| Value | Description |
|---|---|
| Hash | |
| Range | |
| Spatial |
OperationType
Enum to indicate the operation type of the event.
| Value | Description |
|---|---|
| Create | |
| Replace | |
| Delete | |
| Recreate | |
| SystemOperation |
PartitionKind
Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
| Value | Description |
|---|---|
| Hash | |
| Range | |
| MultiHash |
Resource
The resource of an Azure Cosmos DB SQL container event
| Name | Type | Description |
|---|---|---|
| _rid |
string |
A system generated property. A unique identifier. |
| canUndelete |
string |
A state of this container to identify if this container is restorable in same account. |
| canUndeleteReason |
string |
The reason why this container can not be restored in same account. |
| container |
Cosmos DB SQL container resource object |
|
| eventTimestamp |
string |
The when this container event happened. |
| operationType |
The operation type of this container event. |
|
| ownerId |
string |
The name of this SQL container. |
| ownerResourceId |
string |
The resource ID of this SQL container. |
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. |
RestorableSqlContainerGetResult
An Azure Cosmos DB SQL container 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 SQL container event |
|
| type |
string |
The type of Azure resource. |
RestorableSqlContainersListResult
The List operation response, that contains the SQL container events and their properties.
| Name | Type | Description |
|---|---|---|
| value |
List of SQL container events and their properties. |
SpatialSpec
| Name | Type | Description |
|---|---|---|
| path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
| types |
List of path's spatial type |
SpatialType
Indicates the spatial type of index.
| Value | Description |
|---|---|
| Point | |
| LineString | |
| Polygon | |
| MultiPolygon |
UniqueKey
The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
| Name | Type | Description |
|---|---|---|
| paths |
string[] |
List of paths must be unique for each document in the Azure Cosmos DB service |
UniqueKeyPolicy
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
| Name | Type | Description |
|---|---|---|
| uniqueKeys |
List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. |
VectorDataType
Indicates the data type of vector.
| Value | Description |
|---|---|
| float32 | |
| uint8 | |
| int8 | |
| float16 |
VectorEmbedding
Represents a vector embedding. A vector embedding is used to define a vector field in the documents.
| Name | Type | Description |
|---|---|---|
| dataType |
Indicates the data type of vector. |
|
| dimensions |
integer (int32) |
The number of dimensions in the vector. |
| distanceFunction |
The distance function to use for distance calculation in between vectors. |
|
| path |
string |
The path to the vector field in the document. |
VectorEmbeddingPolicy
Cosmos DB Vector Embedding Policy
| Name | Type | Description |
|---|---|---|
| vectorEmbeddings |
List of vector embeddings |
VectorIndex
| Name | Type | Default value | Description |
|---|---|---|---|
| indexingSearchListSize |
integer (int64) minimum: 25maximum: 500 |
100 |
This is the size of the candidate list of approximate neighbors stored while building the DiskANN index as part of the optimization processes. Large values may improve recall at the expense of latency. This is only applicable for the diskANN vector index type. |
| path |
string |
The path to the vector field in the document. |
|
| quantizationByteSize |
integer (int64) minimum: 4 |
The number of bytes used in product quantization of the vectors. A larger value may result in better recall for vector searches at the expense of latency. This is only applicable for the quantizedFlat and diskANN vector index types. |
|
| type |
The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported. |
||
| vectorIndexShardKey |
string[] |
Array of shard keys for the vector index. This is only applicable for the quantizedFlat and diskANN vector index types. |
VectorIndexType
The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported.
| Value | Description |
|---|---|
| flat | |
| diskANN | |
| quantizedFlat |