0

I was working on implementing git version controlling for apim policies. I was working in the azure portal tools. I have installed Azure API Management extension for VS Code. I was able to sync it with Azure portal policies, but I accidentally deleted the APIs from the VS Code but all APIs in Azure portal got automatically deleted, is it possible to recover those APIs in the azure portal?

I am a beginner.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • https://learn.microsoft.com/en-us/azure/api-management/soft-delete#recover-a-soft-deleted-instance –  May 29 '23 at 13:17

1 Answers1

0

It is possible to recover the deleted API's using API soft-delete feature in Azure.

With API Management soft-delete, you can recover and restore a recently deleted API Management instance. This feature protects against accidental deletion of your API Management instance.

To recover it, you can use the REST API call as shown:

Method: PUT
https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.ApiManagement/service/<APIMService>?api-version=2021-08-01

When an API Management instance is soft-deleted, the service exists in a deleted state and is inaccessible to normal API Management actions.

You can use the API Management Get By Name operation to check whether a soft-deleted API Management instance is still available for restoration. If the APIM instance is available for undeleting, Azure will return a record with the deletion Date and scheduledPurgeDate.

You can also backup the API management instance while creating, with the help of Backup-AzApiManagemen PowerShell command as detailed in MSDoc.

enter image description here

Jahnavi
  • 3,076
  • 1
  • 3
  • 10