是否有API调用(可能是PUT)可用于更新变量组中的变量?
我尝试了PUT
select
使用JSON,如
https://<my>.visualstudio.com/<project>/_apis/distributedtask/variablegroups
但是我收到了错误
{"variables": {"somevariable":{"value":"12"}}}
由于
答案 0 :(得分:2)
变量组可以由REST API更新。详情如下:
PUT https://account.visualstudio.com/DefaultCollection/{project}/_apis/distributedtask/variablegroups/{variableGroupId}?api-version=4.1-preview
应用/ JSON
{
"variables": {
"var1": {
"value": "new value"
},
"var2": {
"value": "new value"
}
},
"type": "Vsts",
"name": "variable group name",
"description": "Updated variable group"
}