Team settings

Last Update: 7/14/2017

api-version = 2.0-preview.1

If you haven't already, look at the information on getting started with these APIs.

Get a team's settings

GET https://{instance}/DefaultCollection/{project}/{team}/_apis/Work/TeamSettings?api-version={version}
Parameter Type Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of the project.
team string Name or ID of the team.
Query
api-version string Version of the API to use.

Sample request

GET https://fabrikam.visualstudio.com/DefaultCollection/fabrikam-fiber/_apis/work/teamsettings?api-version=3.0-preview

Sample response

Status code: 200
{
  "backlogIteration": {
    "id": "323b04b6-2fb8-4093-94f4-fbe3bd36a19f",
    "name": "Iteration",
    "path": "",
    "url": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations"
  },
  "bugsBehavior": "asRequirements",
  "workingDays": [
    "monday",
    "tuesday",
    "wednesday",
    "thursday",
    "friday"
  ],
  "backlogVisibilities": {
    "Microsoft.EpicCategory": false,
    "Microsoft.FeatureCategory": true,
    "Microsoft.RequirementCategory": true
  },
  "defaultIteration": {
    "id": "a912d62f-3eba-44b9-ab54-aa82af94b1d7",
    "name": "Iteration 1",
    "path": "\\Iteration 1",
    "url": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%201"
  },
  "defaultIterationMacro": "@currentIteration",
  "url": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings",
  "_links": {
    "self": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings"
    },
    "project": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb"
    },
    "team": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/teams/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572"
    },
    "teamIterations": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/iterations"
    },
    "teamFieldValues": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/teamfieldvalues"
    },
    "classificationNode": [
      {
        "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations"
      },
      {
        "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%201"
      }
    ]
  }
}

Sample code

Update a team's settings

PATCH https://{instance}/DefaultCollection/{project}/{team}/_apis/Work/TeamSettings?api-version={version}
Parameter Type Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
project string Name or ID of the project.
team string Name or ID of the team.
Query
api-version string Version of the API to use.
Parameter Allowed Values
bugBehavior AsRequirements, AsTasks, Off
workingDays monday, tuesday, wednesday, thursday, friday, saturday, sunday
backlogVisibilities A dictionary of keys (Microsoft.EpicCategory, Microsoft.FeatureCategor, Microsoft.RequirementCategory) and boolean values.

Sample request

PATCH https://fabrikam.visualstudio.com/DefaultCollection/fabrikam-fiber/_apis/work/teamsettings?api-version=3.0-preview
Content-Type: application/json
{
  "bugsBehavior": "AsTasks",
  "workingDays": [
    "monday",
    "tuesday",
    "wednesday",
    "thursday"
  ],
  "defaultIteration": "8C2457E8-8936-4CDC-B3AA-17B20F56C76C"
}

Sample response

Status code: 200
{
  "backlogIteration": {
    "id": "323b04b6-2fb8-4093-94f4-fbe3bd36a19f",
    "name": "Iteration",
    "path": "",
    "url": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations"
  },
  "bugsBehavior": "asTasks",
  "workingDays": [
    "monday",
    "tuesday",
    "wednesday",
    "thursday"
  ],
  "backlogVisibilities": {
    "Microsoft.EpicCategory": false,
    "Microsoft.FeatureCategory": true,
    "Microsoft.RequirementCategory": true
  },
  "defaultIteration": {
    "id": "8c2457e8-8936-4cdc-b3aa-17b20f56c76c",
    "name": "Iteration 3",
    "path": "\\Iteration 3",
    "url": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%203"
  },
  "defaultIterationMacro": null,
  "url": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings",
  "_links": {
    "self": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings"
    },
    "project": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb"
    },
    "team": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/teams/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572"
    },
    "teamIterations": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/iterations"
    },
    "teamFieldValues": {
      "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/teamfieldvalues"
    },
    "classificationNode": [
      {
        "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations"
      },
      {
        "href": "https://fabrikam.visualstudio.com/DefaultCollection/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%203"
      }
    ]
  }
}

Sample code