REST API for web app (linux/windows container)

pragadeesh.raju 41 Reputation points
2020-05-28T05:50:04.293+00:00

im trying to create a webapp for Linux/windows containers.

using

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

body

8811-annotation-2020-05-27-225744.png

but im getting response as below

"type": "Microsoft.Web/sites",
"kind": "app",
"location": "West US",

"siteProperties": {
"metadata": null,
"properties": [
{
"name": "LinuxFxVersion",
"value": ""
},
{
"name": "WindowsFxVersion",
"value": null
}
],

the kind becomes just "app" and the image i have used was not taken.

is there any other way should i use the properties or any suggestion would be appreciated.

i have read the document already (https://learn.microsoft.com/en-us/rest/api/appservice/webapps/createorupdate) where i couldnt get a proper answer from it.

@jakaruna-MSFT any insights here?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,798 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,476 Reputation points Microsoft Employee
    2020-05-29T02:34:57.247+00:00

    Hi @pragadeeshraju,

    You body doesn't match body specified by the API. For instance, you have name under properties but name isn't one of them. Make sure properties json object only has the following (that you need) set. Some properties like serverFarmId are more than likely required.

    Let me know if this helps.