Is there any possibility to add variables group to Azure pipeline using Rest API?
1 Answer
Yes, there is a Rest API to add a variable group, Variablegroups - Add:
POST https://dev.azure.com/{organization}/{project}/_apis/distributedtask/variablegroups?api-version=5.1-preview.1
For example:
POST https://dev.azure.com/fabrikam/DGDemo/_apis/distributedtask/variablegroups?api-version=5.1-preview.1
Body:
{
"variables": {
"key1": {
"value": "value1"
},
"key2": {
"value": "value2",
"isSecret": true
}
},
"type": "Vsts",
"name": "TestVariableGroup1",
"description": "A test variable group"
}
1 Comment
nan
The question was how to Link the variable group not to create one
"Maybe"