我找不到如何从API检索区域路径。我能够到达迭代路径而不是区域路径。
我在技术上使用c#包装器
我试过了
以下是您要查找的API调用:
GET https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes?$depth={$depth}&api-version=5.0
这将为您提供根节点及其子节点,之后您可以查询单个子节点,例如我正在获取的子节点:
id : 32
identifier : GUID
name : childname
structureType : area
hasChildren : False
path : \parent\Area\childname
url : https://dev.azure.com/xxx/yyy/_apis/wit/classificationNodes/Are
as/childname
C#API:
_destinationTfs = new VssConnection(new Uri(TfsUri), new VssBasicCredential(string.Empty, AccessToken));
_witClient = _destinationTfs.GetClient<WorkItemTrackingHttpClient>();
var areaPathNode = await _witClient.GetClassificationNodeAsync("PROJECT_NAME", TreeStructureGroup.Areas, depth: 1);
// areaPathNode.Children will contain all your area paths.
PS。它非常隐藏在API文档中