Web Apps - Restore Snapshot Slot
Description for Restores a web app from a snapshot.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot?api-version=2024-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
name
|
path | True |
string |
Name of web app. |
resource
|
path | True |
string |
Name of the resource group to which the resource belongs. Regex pattern: |
slot
|
path | True |
string |
Name of web app slot. If not specified then will default to production slot. |
subscription
|
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 |
If |
kind |
string |
Kind of resource. |
|
properties.ignoreConflictingHostNames |
boolean |
If true, custom hostname conflicts will be ignored when recovering to a target web app. This setting is only necessary when RecoverConfiguration is enabled. |
|
properties.recoverConfiguration |
boolean |
If true, site configuration, in addition to content, will be reverted. |
|
properties.recoverySource |
Optional. Specifies the web app that snapshot contents will be retrieved from. If empty, the targeted web app will be used as the source. |
||
properties.snapshotTime |
string |
Point in time in which the app restore should be done, formatted as a DateTime string. |
|
properties.useDRSecondary |
boolean |
If true, the snapshot is retrieved from DRSecondary endpoint. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Restore operation started. |
|
202 Accepted |
Restore operation started. |
|
Other Status Codes |
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 |
---|---|
Default |
App Service error response. |
Details | |
Error |
Error model. |
Snapshot |
Specifies the web app that snapshot contents will be retrieved from. |
Snapshot |
Details about app recovery operation. |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
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. |
SnapshotRecoverySource
Specifies the web app that snapshot contents will be retrieved from.
Name | Type | Description |
---|---|---|
id |
string |
ARM resource ID of the source app. /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots. |
location |
string |
Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS |
SnapshotRestoreRequest
Details about app recovery operation.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
kind |
string |
Kind of resource. |
name |
string |
Resource Name. |
properties.ignoreConflictingHostNames |
boolean |
If true, custom hostname conflicts will be ignored when recovering to a target web app. This setting is only necessary when RecoverConfiguration is enabled. |
properties.overwrite |
boolean |
If |
properties.recoverConfiguration |
boolean |
If true, site configuration, in addition to content, will be reverted. |
properties.recoverySource |
Optional. Specifies the web app that snapshot contents will be retrieved from. If empty, the targeted web app will be used as the source. |
|
properties.snapshotTime |
string |
Point in time in which the app restore should be done, formatted as a DateTime string. |
properties.useDRSecondary |
boolean |
If true, the snapshot is retrieved from DRSecondary endpoint. |
type |
string |
Resource type. |