0

Is there any possibility to add variables group to Azure pipeline using Rest API?

1
  • Please elaborate on your question. Show in detail what you want to achieve, what you mean by variable group, show what you have tried so far and where you got stuck. PLease read How do I ask a good question. As it is now, you will probably get no answers at all or perhaps someone will answer simply "Maybe" Commented Mar 6, 2020 at 15:13

1 Answer 1

0

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"
}
Sign up to request clarification or add additional context in comments.

1 Comment

The question was how to Link the variable group not to create one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.