Teamfieldvalues - Update

Update team field values

PATCH https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/teamfieldvalues?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
defaultValue
  • string
values

Represents a single TeamFieldValue

Responses

Name Type Description
200 OK

successful operation

Examples

Update team field values. Example 1
Update team field values. Example 2

Update team field values. Example 1

Sample Request

PATCH https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/teamfieldvalues?api-version=5.0-preview.1
{
  "defaultValue": "Fabrikam-Fiber\\Auto",
  "values": [
    {
      "value": "Fabrikam-Fiber\\Auto",
      "includeChildren": true
    },
    {
      "value": "Fabrikam-Fiber\\Fiber",
      "includeChildren": false
    },
    {
      "value": "Fabrikam-Fiber\\Optics",
      "includeChildren": false
    }
  ]
}

Sample Response

{
  "field": {
    "referenceName": "System.AreaPath",
    "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/System.AreaPath"
  },
  "defaultValue": "Fabrikam-Fiber\\Auto",
  "values": [
    {
      "value": "Fabrikam-Fiber\\Auto",
      "includeChildren": true
    },
    {
      "value": "Fabrikam-Fiber\\Fiber",
      "includeChildren": false
    },
    {
      "value": "Fabrikam-Fiber\\Optics",
      "includeChildren": false
    }
  ],
  "url": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/748b18b6-4b3c-425a-bcae-ff9b3e703012/_apis/work/teamsettings/teamfieldvalues",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/748b18b6-4b3c-425a-bcae-ff9b3e703012/_apis/work/teamsettings/teamfieldvalues"
    },
    "project": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/6d823a47-2d51-4f31-acff-74927f88ee1e"
    },
    "team": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/6d823a47-2d51-4f31-acff-74927f88ee1e/teams/748b18b6-4b3c-425a-bcae-ff9b3e703012"
    },
    "teamSettings": {
      "href": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/748b18b6-4b3c-425a-bcae-ff9b3e703012/_apis/work/teamsettings"
    },
    "areaPathClassificationNodes": {
      "href": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/_apis/wit/classificationNodes/Areas"
    }
  }
}

Update team field values. Example 2

Sample Request

PATCH https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/teamfieldvalues?api-version=5.0-preview.1
{
  "defaultValue": "Fabrikam-Fiber\\Auto",
  "values": [
    {
      "value": "Fabrikam-Fiber\\Auto",
      "includeChildren": false
    },
    {
      "value": "Fabrikam-Fiber\\Fiber",
      "includeChildren": false
    },
    {
      "value": "Fabrikam-Fiber\\Optics",
      "includeChildren": false
    }
  ]
}

Sample Response

{
  "field": {
    "referenceName": "System.AreaPath",
    "url": "https://dev.azure.com/fabrikam/_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
    }
  ],
  "url": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/748b18b6-4b3c-425a-bcae-ff9b3e703012/_apis/work/teamsettings/teamfieldvalues",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/748b18b6-4b3c-425a-bcae-ff9b3e703012/_apis/work/teamsettings/teamfieldvalues"
    },
    "project": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/6d823a47-2d51-4f31-acff-74927f88ee1e"
    },
    "team": {
      "href": "https://dev.azure.com/fabrikam/_apis/projects/6d823a47-2d51-4f31-acff-74927f88ee1e/teams/748b18b6-4b3c-425a-bcae-ff9b3e703012"
    },
    "teamSettings": {
      "href": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/748b18b6-4b3c-425a-bcae-ff9b3e703012/_apis/work/teamsettings"
    },
    "areaPathClassificationNodes": {
      "href": "https://dev.azure.com/fabrikam/6d823a47-2d51-4f31-acff-74927f88ee1e/_apis/wit/classificationNodes/Areas"
    }
  }
}

Definitions

FieldReference

An abstracted reference to a field

ReferenceLinks

The class to represent a collection of REST reference links.

TeamFieldValue

Represents a single TeamFieldValue

TeamFieldValues

Essentially a collection of team field values

TeamFieldValuesPatch

Expected data from PATCH

FieldReference

An abstracted reference to a field

Name Type Description
referenceName
  • string

fieldRefName for the field

url
  • string

Full http link to more information about the field

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.

TeamFieldValue

Represents a single TeamFieldValue

Name Type Description
includeChildren
  • boolean
value
  • string

TeamFieldValues

Essentially a collection of team field values

Name Type Description
_links

Collection of links relevant to resource

defaultValue
  • string

The default team field value

field

Shallow ref to the field being used as a team field

url
  • string

Full http link to the resource

values

Collection of all valid team field values

TeamFieldValuesPatch

Expected data from PATCH

Name Type Description
defaultValue
  • string
values

Represents a single TeamFieldValue