Can we restart Microsoft Azure app service from c#?

1k Views Asked by At

I'm looking for a solution to restart the azure app server/app service from C#

Is there a solution for this ?

1

There are 1 best solutions below

2
On

Not only in c# but almost in every language. Just call the REST API:

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

https://learn.microsoft.com/en-us/rest/api/appservice/webapps/restart