0
votes

In my organization the TFS is setup with project and project is set with teams and teams have iterations

Team Project - Team 1 - Iteration - Team 2 - Iteration 1 - Iteration 2

How can I find Area Path and Iteration by Team Name programatically using TFS API?

1

1 Answers

0
votes

You could specify the team name in Team field values Rest API.

The team field is used to identify which work items belong to your team. By default, Area Path is the team field, but it can be any field. Use this API to get and set the the team field values.

Sample: Get a team field values

GET https://{instance}/DefaultCollection/{project}/{team}/_apis/Work/TeamSettings/TeamFieldValues?api-version={version}

Will return including three area paths:

Default is Fabrikam-Fiber\\Auto and "Fabrikam-Fiber\\Fiber" and "Fabrikam-Fiber\\Optics"

"field": {
    "referenceName": "System.AreaPath",
    "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/fields/System.AreaPath"
  },
  "defaultValue": "Fabrikam-Fiber\\Auto",
  "values": [
    {
      "value": "Fabrikam-Fiber\\Auto",
      "includeChildren": false
    },
    {
      "value": "Fabrikam-Fiber\\Fiber",
      "includeChildren": false
    },
    {
      "value": "Fabrikam-Fiber\\Optics",
      "includeChildren": false
    }