Web Apps - Discover Backup

Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup?api-version=2023-12-01

URI Parameters

Name In Required Type Description
name
path True

string

Name of the app.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

subscriptionId
path True

string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

api-version
query True

string

API Version

Request Body

Name Required Type Description
properties.overwrite True

boolean

true if the restore operation can overwrite target app; otherwise, false. true is needed if trying to restore over an existing app.

properties.storageAccountUrl True

string

SAS URL to the container.

kind

string

Kind of resource.

properties.adjustConnectionStrings

boolean

true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false.

properties.appServicePlan

string

Specify app service plan that will own restored site.

properties.blobName

string

Name of a blob which contains the backup.

properties.databases

DatabaseBackupSetting[]

Collection of databases which should be restored. This list has to match the list of databases included in the backup.

properties.hostingEnvironment

string

App Service Environment name, if needed (only when restoring an app to an App Service Environment).

properties.ignoreConflictingHostNames

boolean

Changes a logic when restoring an app with custom domains. true to remove custom domains automatically. If false, custom domains are added to the app's object when it is being restored, but that might fail due to conflicts during the operation.

properties.ignoreDatabases

boolean

Ignore the databases and only restore the site content

properties.operationType

BackupRestoreOperationType

Operation type.

properties.siteName

string

Name of an app.

Responses

Name Type Description
200 OK

RestoreRequest

OK

Other Status Codes

DefaultErrorResponse

App Service error response.

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

Definitions

Name Description
BackupRestoreOperationType

Operation type.

DatabaseBackupSetting

Database backup settings.

DatabaseType

Database type (e.g. SqlAzure / MySql).

DefaultErrorResponse

App Service error response.

Details
Error

Error model.

RestoreRequest

Description of a restore request.

BackupRestoreOperationType

Operation type.

Name Type Description
Clone

string

CloudFS

string

Default

string

Relocation

string

Snapshot

string

DatabaseBackupSetting

Database backup settings.

Name Type Description
connectionString

string

Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one.

connectionStringName

string

Contains a connection string name that is linked to the SiteConfig.ConnectionStrings. This is used during restore with overwrite connection strings options.

databaseType

DatabaseType

Database type (e.g. SqlAzure / MySql).

name

string

DatabaseType

Database type (e.g. SqlAzure / MySql).

Name Type Description
LocalMySql

string

MySql

string

PostgreSql

string

SqlAzure

string

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Detailed errors.

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

RestoreRequest

Description of a restore request.

Name Type Default value Description
id

string

Resource Id.

kind

string

Kind of resource.

name

string

Resource Name.

properties.adjustConnectionStrings

boolean

true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false.

properties.appServicePlan

string

Specify app service plan that will own restored site.

properties.blobName

string

Name of a blob which contains the backup.

properties.databases

DatabaseBackupSetting[]

Collection of databases which should be restored. This list has to match the list of databases included in the backup.

properties.hostingEnvironment

string

App Service Environment name, if needed (only when restoring an app to an App Service Environment).

properties.ignoreConflictingHostNames

boolean

False

Changes a logic when restoring an app with custom domains. true to remove custom domains automatically. If false, custom domains are added to the app's object when it is being restored, but that might fail due to conflicts during the operation.

properties.ignoreDatabases

boolean

False

Ignore the databases and only restore the site content

properties.operationType

BackupRestoreOperationType

Default

Operation type.

properties.overwrite

boolean

true if the restore operation can overwrite target app; otherwise, false. true is needed if trying to restore over an existing app.

properties.siteName

string

Name of an app.

properties.storageAccountUrl

string

SAS URL to the container.

type

string

Resource type.