In November 2020, we released a new feature that allows Users to restore the accidentally deleted API Management service using the corresponding REST APIs. Users shall use these new APIs to restore an accidentally deleted service only if the API Management service has been deleted with REST API version 2020-06-01-preview or higher. Reference document: Azure API Management soft-delete (preview) | Microsoft Docs
Currently if user deletes their API Management service from Azure Portal under "All Resources" page or if they delete the Resource Group where API Management service exists, Azure Resource Manager will send a DELETE request to API Management service with API version 2020-06-01-preview. In this case, the service will be placed in a "soft deleted" state. We are planning to make all the “delete API Management” operation consistent with API version 2020-06-01-preview throughout Azure portal soon.
Purge API Management Service at “soft deleted” state
If you accidentally delete the API Management Service with the API version before 2020-06-01-preview, the deleted API Management service name will be immediately release and you will be able to re-create a new service with same name. if you want to restore the services, please contact support.
If the API Management service was deleted with API version 2020-06-01-preview or higher, then the API Management service will be left in a “soft deleted” state and you will be able to restore the service yourself. However, you cannot create an APIM with the same name immediately, if you want to create a new APIM service with same name, you can purge the “soft deleted” state APIM, please note that we cannot undelete a purged API Management service.
Please see examples below and I will use my APIM “jiaapim-testdelete” as an example.
Purge the APIM by using API: Deleted Services - Purge (Azure API Management) | Microsoft Docs
The response will return the deleted service name and the date that the APIM service was purged.
Prerequisites of restore APIM
Please see examples below and I will use my APIM “jiaapim-external” as an example.
A deleted API Management service can be restored by yourself ONLY if the following conditions are TRUE:
Please note that we CANNOT:
Restore APIM services
After going the prerequisites of restoring APIM above, then let’s see how to restore an API Management service at “soft deleted” state. You can simply use this API Api Management Service - Create Or Update - REST API (Azure API Management) | Microsoft Docs The request URL should contain the original APIM service name, resource group name. The request body should contain the retore property and set it to true
Example of request body shown below:
Response payload returned means the API Management service is being restored. Please see example below:
Additional Considerations
The Public VIP (I.P. Address) of the service will change after the restore. If your backend service was configured to only allow traffic from certain I.P. addresses, you may have to change the configuration to allow the new I.P. address (I.P. address can be obtained from the "Overview" blade of the Azure Portal).
If the service was in an external/internal VNET and the VNET/subnet has also been deleted, the service will be restored as if it is not in a VNET (this operation may fail, retry will help). If you need to add this restored API Management service to a VNET, then you will need to create a new VNET and add the restored APIM service to the VNET.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.