question

pragadeeshraju-2799 avatar image
0 Votes"
pragadeeshraju-2799 asked ·

REST API for web app (linux/windows container)

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://docs.microsoft.com/en-us/rest/api/appservice/webapps/createorupdate) where i couldnt get a proper answer from it.

@jakaruna-MSFT any insights here?





azure-webapps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered ·

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.

· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @ryanchill,

If i do a GET for a webapp that I have already created manually it gives me a similar JSON. so I just replaced the few parameters and used the same as the body.

0 Votes 0 · ·