在TFS(或ADO)中,是否有API调用将团队链接到区域路径? [英] In TFS (or ADO) is there an API call to link a Team to an Area Path?

查看:60
本文介绍了在TFS(或ADO)中,是否有API调用将团队链接到区域路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在自动执行TFS团队/委员会的创建,发现有一个用于创建团队的API和一个用于创建Area Path的API,但是没有一个将两者链接在一起的API.基本上,我们正在寻找可作为使用团队名称创建区域路径"复选框的附件.

We're automating our TFS Team/Board creation and found that there is an API to create a Team and an API to create an Area Path, but not one to link the two. Basically we're looking for something that acts as the ‘Create an area path with the name of the team.’ check box in the attached picture.Screenshot Here's the code for our Team post:

$azdoURI = https://prd-ourCompanyName/tfs/ourOrg/_apis/projects/ourProject/teams?api-version=5.0"
$requestBody = @{ name = "$boardName" }
$jsonRequestBody = $requestBody | ConvertTo-Json -Compress

$response = (Invoke-WebRequest -Method Post -Uri $azdoURI -Body $jsonRequestBody -Content 'application/json' -Credential $credential -UseBasicParsing)

推荐答案

所以这是我结束的地方:5个步骤:

So here's where I ended up: 5 Steps:

  1. 创建团队:POST https://dev-tfs.../{organization}/_apis/projects/{project}/teams?api-version=5.1正文:{名称":"BoardByPostmanTest_3"}
  2. 创建与团队比赛的区域路径:POST https://dev-tfs.../{organization}/{project}/_apis/wit/classificationnodes/Areas?api-version=5.1正文:{名称":"BoardByPostmanTest_3"}
  3. 使用区域路径更新团队:PATCH https://dev-tfs.z../{organization}/{project}/BoardByPostmanTest_3/_apis/work/teamsettings/teamfieldvalues?api-version=5.1身体:{"defaultValue":"Agile \ BoardByPostmanTest_3",值":[{值":"Agile \ BoardByPostmanTest_3","includeChildren":是}]}
  4. 找到项目的迭代:GET https://dev-tfs.../{organization}/{project}/_apis/wit/classificationnodes/Iterations?api-version=5.1
  5. 向团队添加该迭代:PATCH https://dev-tfs.../{organization}/{project}/BoardByPostmanTest_3/_apis/work/teamsettings?api-version=5.1身体:{"backlogIteration":无论迭代号来自步骤4中的GET".}

谢谢您杰西胡(Jessehouwing)我失踪的第3步.

Thank you to jessehouwing for step 3 that I was missing.

这篇关于在TFS(或ADO)中,是否有API调用将团队链接到区域路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆