Skip to content

Site Operations APIs

David Ebbo edited this page May 8, 2015 · 4 revisions
  • Get site publishing credentials
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/config/publishingcredentials/list?api-version=2014-11-01
  • Renew publishing password
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/newPassword?api-version=2014-11-01
  • Get publishing xml
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/publishxml?api-version=2014-11-01

This is the xml that Visual Studio consumes as a publishing profile for web applications.

  • Restart
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/restart?api-version=2014-11-01

This does a soft restart with waiting till restart is done.

ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/restart?api-version=2014-11-01&softRestart=true&synchronous=true
  • Stop
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/stop?api-version=2014-11-01
  • Start
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/start?api-version=2014-11-01
  • Swap slots
ARMClient.exe post /{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{site}/slots/{slotName}/slotsswap?api-version=2014-11-01 @payload.json

Example payload.json below to swap slot {slotName} with production

{
    "targetSlot" : "Production"
}
Clone this wiki locally