Cosmos DB Account Point-in-Time Restore Information

The /cloudInfrastructure/cosmosDbAccounts resource collection represents information required to perform point-in-time restore for Cosmos DB accounts.

Get Cosmos DB Account Restore Regions

The HTTP GET request to the /cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreRegions endpoint retrieves list of regions to which a Cosmos DB account with the specified ID can be restored.

SecurityBearer
Request
path Parameters
cosmosDbAccountId
required
string

Specifies the Cosmos DB account ID in Microsoft Azure.

query Parameters
ServiceAccountId
required
string <uuid>

Returns only Azure regions to which a service account with the specified system ID has permissions.

x-veeam-parameter-group: CosmosDbAccountRegionOptions
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreRegions
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreRegions?ServiceAccountId=497f6eca-6276-4993-bfeb-53cbbbba6f08&Offset=0&Limit=-1' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Get Cosmos DB Account Restorable Items

The HTTP GET request to the /cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreResource endpoint retrieves list of Cosmos DB account items available for restore.

NOTE
This operation can only be performed to Cosmos DB accounts of the following kinds: NoSQL, MongoDB, Apache Gremlin and Table.

SecurityBearer
Request
path Parameters
cosmosDbAccountId
required
string

Specifies the Cosmos DB account ID in Microsoft Azure.

query Parameters
ServiceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account that will be used to perform the operation.

x-veeam-parameter-group: CosmosDbAccountResourceOptions
TargetRegionId
required
string

Returns only items that can be restored to the specified Azure region.

x-veeam-parameter-group: CosmosDbAccountResourceOptions
PointInTime
required
string <date-time>

Returns only items that can be restored to the specified date and time.

x-veeam-parameter-group: CosmosDbAccountResourceOptions
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreResource
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreResource?ServiceAccountId=497f6eca-6276-4993-bfeb-53cbbbba6f08&TargetRegionId=string&PointInTime=2019-08-24T14%3A15%3A22Z&Offset=0&Limit=-1' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Get Cosmos DB Account Point-in-time Restore Period

The HTTP GET request to the /cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreTimeRange endpoint retrieves a time period within which a restore point for the specified Cosmos DB account can be selected.

SecurityBearer
Request
path Parameters
cosmosDbAccountId
required
string

Specifies the Cosmos DB account ID in Microsoft Azure.

query Parameters
ServiceAccountId
string or null <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account that will be used to perform the operation.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreTimeRange
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/availableRestoreTimeRange?ServiceAccountId=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "latestRestorableTimestamp": "2019-08-24T14:15:22Z",
  • "earliestRestorableTimestamp": "2019-08-24T14:15:22Z"
}

Get Cosmos DB Account Databases

The HTTP GET request to the /cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/databases endpoint retrieves a list of databases of a Cosmos DB account with the specified ID.

NOTE
This operation can only be performed to Cosmos DB accounts of the following kinds: NoSQL, MongoDB and Apache Gremlin.

SecurityBearer
Request
path Parameters
cosmosDbAccountId
required
string

Specifies the Cosmos DB account ID in Microsoft Azure.

query Parameters
ServiceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account that will be used to perform the operation.

Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/databases
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/databases?ServiceAccountId=497f6eca-6276-4993-bfeb-53cbbbba6f08&Offset=0&Limit=-1' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Calculate Cost of Cosmos DB Account Throughput

The HTTP POST request to the /cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/estimateThroughputCost endpoint calculates the estimated hourly/daily/monthly cost of specific throughput settings configured for a Cosmos DB for MongoDB account with the specified ID.

SecurityBearer
Request
path Parameters
cosmosDbAccountId
required
string

Specifies the Azure ID assigned to the Cosmos DB for MongoDB account.

query Parameters
serviceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account that will be used to perform the operation. Note that the service account must have access to the subscription specified in the subscriptionId property.

Request Body schema: application/json
required
object (MongoDbEstimateThroughputCostSettings)

Specifies throughput settings configured for an item managed by the Cosmos DB for MongoDB account.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

post/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/estimateThroughputCost
Request samples
application/json
{
  • "mongoDbSettings": {
    }
}
Response samples
application/json
{
  • "minHourlyPrice": 0,
  • "maxHourlyPrice": 0,
  • "minDailyPrice": 0,
  • "maxDailyPrice": 0,
  • "minMonthlyPrice": 0,
  • "maxMonthlyPrice": 0,
  • "minThroughput": 0,
  • "maxThroughput": 0,
  • "requestUnitPrice": 0,
  • "regionCount": 0,
  • "exceedsTotalThroughput": true
}

Get Cosmos DB Account Events

The HTTP GET request to the /cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/databases/{databaseRid}/resourceEvents endpoint retrieves a list of create, replace and delete events for a specific database of a Cosmos DB account with the specified ID.

NOTE
This operation can only be performed to Cosmos DB accounts of the following kinds: NoSQL, MongoDB, Apache Gremlin and Table.

SecurityBearer
Request
path Parameters
cosmosDbAccountId
required
string

Specifies the Cosmos DB account ID in Microsoft Azure.

query Parameters
ServiceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account that will be used to perform the operation.

x-veeam-parameter-group: CosmosDbAccountResourceEventsOptions
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
EventType
Array of strings or null (CosmosDbResourceEventType)
Enum: "Create" "Recreate" "Delete" "Replace" "SystemOperation"
x-veeam-parameter-group: CosmosDbAccountResourceEventsOptions
databaseRid
string

[Applies to Cosmos DB accounts of the following kinds only: NoSQL, MongoDB and Apache Gremlin] Specifies the resource ID assigned in Microsoft Azure to a database of the specified Cosmos DB account.

x-veeam-parameter-group: CosmosDbAccountResourceEventsOptions
FromTime
string <date-time>

Returns only events occurred after the specified date and time.

x-veeam-parameter-group: CosmosDbAccountResourceEventsOptions
ToTime
string <date-time>

Returns only events occurred before the specified date and time.

x-veeam-parameter-group: CosmosDbAccountResourceEventsOptions
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/resourceEvents
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/cloudInfrastructure/cosmosDb/{cosmosDbAccountId}/resourceEvents?ServiceAccountId=497f6eca-6276-4993-bfeb-53cbbbba6f08&Offset=0&Limit=-1&EventType=Create&databaseRid=string&FromTime=2019-08-24T14%3A15%3A22Z&ToTime=2019-08-24T14%3A15%3A22Z' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Validate Cosmos DB Account Name

The HTTP POST request to the /cloudInfrastructure/cosmosDb/isNameTaken endpoint checks whether a Cosmos DB account with the specified name already exists in the specified subscription.

SecurityBearer
Request
query Parameters
accountName
required
string

Specifies a name that will be verified.

subscriptionId
required
string <uuid>

Specifies the Microsoft Azure ID assigned to a subscription that will be checked for a Cosmos DB account with the specified name.

serviceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account that will be used to perform the operation. Note that the service account must have access to the subscription specified in the subscriptionId property.

Responses
200

OK

400

Bad Request

401

Unauthorized

415

Client Error

post/api/v8/cloudInfrastructure/cosmosDb/isNameTaken
Request samples
curl -i -X POST \
  'https://123.123.123.123/api/v8/cloudInfrastructure/cosmosDb/isNameTaken?accountName=string&subscriptionId=497f6eca-6276-4993-bfeb-53cbbbba6f08&serviceAccountId=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
true