SQL Databases

The /databases resource collection represents SQL databases that reside in Azure regions selected in backup policy settings and can be protected by Veeam Backup for Microsoft Azure.

Get Collection of SQL Databases

The HTTP GET request to the /databases endpoint retrieves all SQL databases that can be protected by Veeam Backup for Microsoft Azure.

SecurityBearer
Request
query Parameters
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
SubscriptionId
string or null <uuid>

Returns only SQL databases available in a subscription with the specified ID.

x-veeam-parameter-group: DatabaseOptions
TenantId
string or null <uuid>

Returns only SQL databases available for a tenant with the specified ID.

x-veeam-parameter-group: DatabaseOptions
ServiceAccountId
string

Returns only SQL databases to which a service account with the specified ID has access.

x-veeam-parameter-group: DatabaseOptions
SearchPattern
string or null

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

x-veeam-parameter-group: DatabaseOptions
CredentialsState
string or null (CredentialsStateFilterOptions)

Returns only SQL databases that have the specified credentials state.

Enum: "OnlyWithCredentials" "OnlyWithoutCredentials" "All"
x-veeam-parameter-group: DatabaseOptions
AssignableBySqlAccountId
integer or null <int64>

Returns only SQL databases that are associated with an Azure SQL account with the specified ID.

x-veeam-parameter-group: DatabaseOptions
RegionIds
Array of strings or null

Returns only SQL databases that reside in Azure regions with the specified IDs.

x-veeam-parameter-group: DatabaseOptions
ProtectionStatus
Array of strings or null (ProtectionStatus)

Returns only SQL databases with the specified protection status.

Enum: "Unprotected" "Protected" "Unknown"
x-veeam-parameter-group: DatabaseOptions
BackupDestination
Array of strings or null (SqlBackupDestinationFilterOptions)

Returns only SQL databases with the specified backup type.

Enum: "AzureBlob" "ManualBackup" "Archive"
x-veeam-parameter-group: DatabaseOptions
DbFromProtectedRegions
boolean

Defines whether Veeam Backup for Microsoft Azure must return only SQL databases that reside in regions protected by backup policies.

x-veeam-parameter-group: DatabaseOptions
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

get/api/v8/databases
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/databases?Offset=0&Limit=-1&SubscriptionId=497f6eca-6276-4993-bfeb-53cbbbba6f08&TenantId=497f6eca-6276-4993-bfeb-53cbbbba6f08&ServiceAccountId=string&SearchPattern=string&CredentialsState=OnlyWithCredentials&AssignableBySqlAccountId=0&RegionIds=string&ProtectionStatus=Unprotected&BackupDestination=AzureBlob&DbFromProtectedRegions=true' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Get SQL Database Data

The HTTP GET request to the /databases/{databaseId} endpoint retrieves information on a SQL database with the specified ID.

SecurityBearer
Request
path Parameters
databaseId
required
string

Specifies a system ID assigned in the Veeam Backup for Microsoft Azure REST API to the SQL database.

query Parameters
sync
boolean or null

Defines whether to force rescanning of the Microsoft Azure infrastructure before the response.

Responses
200

OK

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/databases/{databaseId}
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/databases/{databaseId}?sync=true' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "string",
  • "resourceId": "string",
  • "name": "string",
  • "serverName": "string",
  • "serverId": "string",
  • "resourceGroupName": "string",
  • "sizeInMb": 0,
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "regionId": "string",
  • "regionName": "string",
  • "hasElasticPool": true,
  • "status": "Other",
  • "databaseType": "Managed",
  • "_links": {}
}

SQL Databases Rescan

The HTTP POST requests to the /databases/rescan endpoint launches a rescan operation for SQL databases in Microsoft Azure environment.

SecurityBearer
Request
query Parameters
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
Request Body schema: application/json
required
subscriptionId
string or null <uuid>

Returns only SQL databases available in a subscription with the specified ID.

tenantId
string or null <uuid>

Returns only SQL databases available for a tenant with the specified ID.

serviceAccountId
string

Returns only SQL databases to which a service account with the specified ID has access.

searchPattern
string or null

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

credentialsState
string or null (CredentialsStateFilterOptions)
Enum: "OnlyWithCredentials" "OnlyWithoutCredentials" "All"
assignableBySqlAccountId
integer or null <int64>

Returns only SQL databases that are associated with an Azure SQL account with the specified ID.

regionIds
Array of strings or null

Returns only SQL databases that reside in Azure regions with the specified IDs.

protectionStatus
Array of strings or null (ProtectionStatus)

Returns only SQL databases with the specified protection status.

Enum: "Unprotected" "Protected" "Unknown"
backupDestination
Array of strings or null (SqlBackupDestinationFilterOptions)

Returns only SQL databases with the specified backup type.

Enum: "AzureBlob" "ManualBackup" "Archive"
dbFromProtectedRegions
boolean

Defines whether Veeam Backup for Microsoft Azure must return only SQL databases that reside in regions protected by backup policies.

Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

post/api/v8/databases/rescan
Request samples
application/json
{
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "serviceAccountId": "string",
  • "searchPattern": "string",
  • "credentialsState": "OnlyWithCredentials",
  • "assignableBySqlAccountId": 0,
  • "regionIds": [
    ],
  • "protectionStatus": [
    ],
  • "backupDestination": [
    ],
  • "dbFromProtectedRegions": true
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "startTime": "2019-08-24T14:15:22Z",
  • "status": "Canceled",
  • "error": {
    },
  • "_links": {},
  • "result": {
    }
}

Export Collection of SQL Databases

The HTTP POST request to the /databases/export endpoint exports a list of Azure SQL databases to a .CSV or an .XML file.

x-veeam-custom-response: true
SecurityBearer
Request
header Parameters
Accept
string or null

Specifies a media type of representation of the exported data. The default value is text/csv media type.

Request Body schema: application/json
required
databaseIds
Array of strings or null

Specifies the system IDs assigned in the Veeam Backup for Microsoft Azure REST API to the Azure SQL databases whose data will be exported.

subscriptionId
string or null <uuid>

Returns only SQL databases available in a subscription with the specified ID.

tenantId
string or null <uuid>

Returns only SQL databases available for a tenant with the specified ID.

serviceAccountId
string or null

Returns only SQL databases to which a service account with the specified ID has access.

searchPattern
string or null

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

credentialsState
string or null (CredentialsStateFilterOptions)
Enum: "OnlyWithCredentials" "OnlyWithoutCredentials" "All"
assignableBySqlAccountId
integer or null <int64>

Returns only SQL databases that are associated with an Azure SQL account with the specified ID.

regionIds
Array of strings or null

Returns only SQL databases that reside in Azure regions with the specified IDs.

protectionStatus
Array of strings or null (ProtectionStatus)

Returns only SQL databases with the specified protection status.

Enum: "Unprotected" "Protected" "Unknown"
backupDestination
Array of strings or null (SqlBackupDestinationFilterOptions)

Returns only SQL databases with the specified backup type.

Enum: "AzureBlob" "ManualBackup" "Archive"
dbFromProtectedRegions
boolean

Defines whether Veeam Backup for Microsoft Azure must return only SQL databases that reside in regions protected by backup policies.

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict

post/api/v8/databases/export
Request samples
application/json
{
  • "databaseIds": [
    ],
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "serviceAccountId": "string",
  • "searchPattern": "string",
  • "credentialsState": "OnlyWithCredentials",
  • "assignableBySqlAccountId": 0,
  • "regionIds": [
    ],
  • "protectionStatus": [
    ],
  • "backupDestination": [
    ],
  • "dbFromProtectedRegions": true
}
Response samples
application/problem+json
{
  • "extensions": { },
  • "status": 0,
  • "title": "string",
  • "detail": "string",
  • "type": "string"
}

Create Backups of SQL Databases

The HTTP POST request to the /databases/startManualBackup endpoint launches a backup operation for the specified databases.

SecurityBearer
Request
Request Body schema: application/json
required
databaseIds
required
Array of strings non-empty

Specifies the system IDs assigned to the Azure SQL databases in the Veeam Backup for Microsoft Azure REST API.

repositoryId
required
string non-empty

Specifies the system ID assigned to the target repository in the Veeam Backup for Microsoft Azure REST API.

tenantId
required
string or null <uuid>

Specifies the Microsoft Azure ID assigned to the tenant associated with a service account whose permissions will be used to manage Azure SQL databases.

serviceAccountId
required
string <uuid>

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a service account whose permissions will be used to manage Azure SQL databases.

managedStagingServerId
string or null

Specifies the Microsoft Azure ID assigned to a staging server configured for the unmanaged instances.

stagingServerId
string or null

Specifies the Microsoft Azure ID assigned to a staging server configured for the managed instances.

Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

415

Client Error

post/api/v8/databases/startManualBackup
Request samples
application/json
{
  • "databaseIds": [
    ],
  • "repositoryId": "string",
  • "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
  • "serviceAccountId": "a814cf67-aaac-43ae-acb4-8d34e82a4b4c",
  • "managedStagingServerId": "string",
  • "stagingServerId": "string"
}
Response samples
application/json
{
  • "id": "string",
  • "type": "BackupRetention",
  • "localizedType": "string",
  • "executionStartTime": "2019-08-24T14:15:22Z",
  • "executionStopTime": "2019-08-24T14:15:22Z",
  • "executionDuration": "string",
  • "status": "Canceled",
  • "backupJobInfo": {
    },
  • "healthCheckJobInfo": {
    },
  • "restoreJobInfo": {
    },
  • "fileLevelRestoreJobInfo": {
    },
  • "fileShareFileLevelRestoreJobInfo": {
    },
  • "repositoryJobInfo": {
    },
  • "restorePointDataRetrievalJobInfo": {
    },
  • "retentionJobInfo": {
    },
  • "_links": {}
}