用于将属性添加到Azure Webapp应用程序设置的API [英] API to add properties to Azure Webapp Application settings
问题描述
我有一个在Azure应用程序服务计划上运行的Web应用程序. Web应用程序具有许多在Web App的应用程序设置"中定义的设置.现在,我想复制该Web应用程序及其所有应用程序"设置.我得到REST API来列出可用于任何Web应用程序的所有设置(/api/settings).尽管有一个POST调用来添加/更新设置,但它不是在更新应用程序设置.
I have one web app running on a Azure appservice plan. The web app has a lot of settings defined in Application settings of the Web App. Now I want to replicate that web app with all its Application settings. I got the REST API to list down all the settings available for any web app (/api/settings). Although there is a POST call to add/update the settings , But it is not updating Application settings.
是否有任何REST API可以添加/更新Azure Web应用程序的应用程序设置?
Is there any REST API to add/update the Application settings of Azure web app ?
谢谢, 阿比拉姆
推荐答案
是否有任何REST API可以添加/更新Azure Web应用程序的应用程序设置?
Is there any REST API to add/update the Application settings of Azure web app ?
是的,我们可以使用以下更新应用程序设置更新应用程序设置REST API
Yes, we could update the application setting with the following Update Application Settings REST API
Put https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resource group}/providers/Microsoft.Web/sites/{WebAppName}/config/appsettings?api-version=2016-08-01
身体
{
"id": "subscriptions/{subscriptionId}/resourceGroups/{resource group}/providers/Microsoft.Web/sites/{WebAppName}/config/appsettings",
"name": "appsettings",
"type": "Microsoft.Web/sites/config",
"location": "South Central US",
"tags": {
"hidden-related:/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/tomfreePlan": "empty"
},
"properties": {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"Test1": "testValue1" //Added value
}
}
Note: we could use the following List Application Settings REST API post way to list the appsetting body.
Post https://management.azure.com/subscriptions/{subscription}/resourceGroups/CXP-{resourceGroup}/providers/Microsoft.Web/sites/{WebAppName}/config/appsettings/list?api-version=2016-08-01
这篇关于用于将属性添加到Azure Webapp应用程序设置的API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!