Reputation: 1017
I cannot find how to retrieve the Area Paths from the API. I was able to get to the Iteration Paths but not Area Paths.
I'm technically using the c# wrapper
I've tried going through
Upvotes: 7
Views: 8854
Reputation: 72171
Here are the API calls you are looking for:
GET https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes?$depth={$depth}&api-version=5.0
This will give you root nodes and their children, after that you can query individual children, example of the child I'm getting:
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. It's extremely well hidden in the API docs
Upvotes: 14