Forum Discussion
jerkohren
May 17, 2023Copper Contributor
How to set/update tags via REST API in pipelines releases deployment deployment targets required tag
Hi, i am using REST API to create release for deployment group. Because i have multiple targets in deployment groups, i want to create release just for specific target (azagent). I was duing it manually adding required tags in devops but now i am trying to figure it out how to do it with REST API to automate the process. Is there any other was than using tags to create release for specific target in deployment groups?
Create release works fine:
POST https://vsrm.dev.azure.com/{org}/{project}/_apis/release/releases?api-version=7.0
Body: { "definitionId": 1}
I have tried without success:
PUT https://vsrm.dev.azure.com/{org}/{project}/_apis/release/definitions?api-version=7.0
Body: { "definitionId": 1, "name": "my release", "tags": ["myTag"] }
PATCH https://vsrm.dev.azure.com/{org}/{project}/_apis/release/definitions/{definitionId}?api-version=7.0
Body: { "tags": ["myTag"] }
Thanks for any help and tips!
- jerkohrenCopper Contributor
Hi, maybe some will answer here: https://developercommunity.visualstudio.com/t/How-to-set-required-tags-for-devops-pipe/10378787