Teamsettings - Update

Update a team's settings

PATCH https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings?api-version=5.0-preview.1

URI Parameters

Name In Required Type Description
organization
path True
  • string

The name of the Azure DevOps organization.

project
path True
  • string

Project ID or project name

team
path
  • string

Team ID or team name

api-version
query True
  • string

Version of the API to use. This should be set to '5.0-preview.1' to use this version of the api.

Request Body

Name Type Description
backlogIteration
  • string
backlogVisibilities
  • object
bugsBehavior
defaultIteration
  • string
defaultIterationMacro
  • string
workingDays
  • WorkingDays[]

Responses

Name Type Description
200 OK

successful operation

Examples

Update team settings. Example 1
Update team settings. Example 2

Update team settings. Example 1

Sample Request

PATCH https://dev.azure.com/fabrikam/fabrikam-fiber/_apis/work/teamsettings?api-version=5.0-preview.1
{
  "bugsBehavior": "AsTasks",
  "workingDays": [
    "monday",
    "tuesday",
    "wednesday",
    "thursday"
  ],
  "defaultIteration": "8C2457E8-8936-4CDC-B3AA-17B20F56C76C"
}

Sample Response

{
  "backlogIteration": {
    "id": "323b04b6-2fb8-4093-94f4-fbe3bd36a19f",
    "name": "Iteration",
    "path": "",
    "url": "https://dev.azure.com/fabrikam/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://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%203"
  },
  "defaultIterationMacro": null,
  "url": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings"
    },
    "project": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb"
    },
    "team": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/teams/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572"
    },
    "teamIterations": {
      "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/iterations"
    },
    "teamFieldValues": {
      "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/teamfieldvalues"
    },
    "classificationNode": [
      {
        "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations"
      },
      {
        "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%203"
      }
    ]
  }
}

Update team settings. Example 2

Sample Request

PATCH https://dev.azure.com/fabrikam/fabrikam-fiber/_apis/work/teamsettings?api-version=5.0-preview.1
{
  "bugsBehavior": "AsRequirements",
  "workingDays": [
    "monday",
    "tuesday",
    "wednesday",
    "thursday",
    "friday"
  ],
  "defaultIterationMacro": "@CurrentIteration"
}

Sample Response

{
  "backlogIteration": {
    "id": "323b04b6-2fb8-4093-94f4-fbe3bd36a19f",
    "name": "Iteration",
    "path": "",
    "url": "https://dev.azure.com/fabrikam/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://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%201"
  },
  "defaultIterationMacro": "@currentIteration",
  "url": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings"
    },
    "project": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb"
    },
    "team": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/teams/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572"
    },
    "teamIterations": {
      "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/iterations"
    },
    "teamFieldValues": {
      "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/3e9700ae-46cb-4ee3-ad77-3a1b1ae99572/_apis/work/teamsettings/teamfieldvalues"
    },
    "classificationNode": [
      {
        "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations"
      },
      {
        "href": "https://dev.azure.com/fabrikam/c1f04a4e-c4e5-4e0d-8096-e5f9fd214bfb/_apis/wit/classificationNodes/Iterations/Iteration%201"
      }
    ]
  }
}

Definitions

BugsBehavior

Bugs behavior

ReferenceLinks

The class to represent a collection of REST reference links.

TeamIterationAttributes
TeamSetting

Data contract for TeamSettings

TeamSettingsIteration

Represents a shallow ref for a single iteration

TeamSettingsPatch

Data contract for what we expect to receive when PATCH

TimeFrame

BugsBehavior

Bugs behavior

Name Type Description
asRequirements
  • string
asTasks
  • string
off
  • string

The class to represent a collection of REST reference links.

Name Type Description
links
  • object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

TeamIterationAttributes

Name Type Description
finishDate
  • string
startDate
  • string
timeFrame

TeamSetting

Data contract for TeamSettings

Name Type Description
_links

Collection of links relevant to resource

backlogIteration

Backlog Iteration

backlogVisibilities
  • object

Information about categories that are visible on the backlog.

bugsBehavior

BugsBehavior (Off, AsTasks, AsRequirements, ...)

defaultIteration

Default Iteration, the iteration used when creating a new work item on the queries page.

defaultIterationMacro
  • string

Default Iteration macro (if any)

url
  • string

Full http link to the resource

workingDays
  • WorkingDays[]

Days that the team is working

TeamSettingsIteration

Represents a shallow ref for a single iteration

Name Type Description
_links

Collection of links relevant to resource

attributes

Attributes such as start and end date

id
  • string

Id of the resource

name
  • string

Name of the resource

path
  • string

Relative path of the iteration

url
  • string

Full http link to the resource

TeamSettingsPatch

Data contract for what we expect to receive when PATCH

Name Type Description
backlogIteration
  • string
backlogVisibilities
  • object
bugsBehavior
defaultIteration
  • string
defaultIterationMacro
  • string
workingDays
  • WorkingDays[]

TimeFrame

Name Type Description
current
  • string
future
  • string
past
  • string