I think there is a problem with the new TFS REST API. Let me explain :
Here is an example of a classification node, which is basically an "inactive" iteration (not shown with the other sprint in TFS) :
{
"id": 126391,
"name": "Web",
"structureType": "area",
"hasChildren": false,
"_links": {
"self": {
"href": "https://fabrikam.visualstudio.com/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Web"
},
"parent": {
"href": "https://fabrikam.visualstudio.com/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas"
}
},
"url": "https://fabrikam.visualstudio.com/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Web"
}
Pay attention to the "id" field. It's not a TFS GUID, it's a basic id.
Now, here is what you need to send to the API to append your classification node to a team, which is the way to active your classification node as an iteration :
POST https://{instance}/DefaultCollection/{project}/{team}/_apis/work/TeamSettings/Iterations?api-version={version}
"{\"id\":\"a589a806-bf11-4d4f-a031-c19813331553\"}"
This is the problem ! You need the GUID of your classification node to append it to a team but there is no way to retrieve it...
Can someone explain me how is it possible ? Thanks in advance.
EDIT 6/24/2016 Here's what I retrieve when I'm asking for all the classification nodes :
https://{...}/_apis/wit/classificationNodes/iterations?$depth=2
