向团队添加迭代是通过/_apis/work/teamsettings/iterations
API 完成的。
要求:
POST https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/iterations?api-version=5.1
"{\"id\":\"a589a806-bf11-4d4f-a031-c19813331553\"}"
回复:
{
"id": "a589a806-bf11-4d4f-a031-c19813331553",
"name": "Sprint 2",
"path": "Fabrikam-Fiber\\Release 1\\Sprint 2",
"attributes": {
"startDate": null,
"finishDate": null
}
}
要设置区域路径,请使用/_apis/work/teamsettings/teamfieldvalues
:
要求:
PATCH https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/teamfieldvalues?api-version=5.1
{
"defaultValue": "Fabrikam-Fiber\\Auto",
"values": [
{
"value": "Fabrikam-Fiber\\Auto",
"includeChildren": true
},
{
"value": "Fabrikam-Fiber\\Fiber",
"includeChildren": false
},
{
"value": "Fabrikam-Fiber\\Optics",
"includeChildren": false
}
]
}
回复:
{
"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
}
]
}
也可以看看: