I am querying the AzureDevOps API in my Workitems I have a field "System.IterationId" which is an int. If I query for Iterations there is classificationNodes API and there is a field "id" which is an int and a field identifier which is alphanumeric see:
{
"id": 922,
"identifier": "ca77daf9-3391-43b7-9da1-3c912cda6155",
"name": "Dev 07",
"structureType": "iteration",
"hasChildren": false,
"attributes": {
"startDate": "2022-12-05T00:00:00Z",
"finishDate": "2022-12-16T00:00:00Z"
},
"path": "\\GisAtWeb\\Iteration\\Sprints\\Dev 07",
"_links": {
"self": {
"href": "https://dev.azure.com/vwfs/55bf3504-405f-46ad-a342-fb8edcf4913f/_apis/wit/classificationNodes/Iterations/Sprints/Dev 07"
},
"parent": {
"href": "https://dev.azure.com/vwfs/55bf3504-405f-46ad-a342-fb8edcf4913f/_apis/wit/classificationNodes/Iterations/Sprints"
}
},
"url": "https://dev.azure.com/vwfs/55bf3504-405f-46ad-a342-fb8edcf4913f/_apis/wit/classificationNodes/Iterations/Sprints/Dev 07"
}
What is the difference between the identifier and the id and which value I should use to exactly identify a iteration/sprint?
CodePudding user response:
The difference between the "id" and "identifier" fields in the AzureDevOps API is that "id" is a numerical identifier for the iteration, while "identifier" is an alphanumeric identifier. The "id" is a unique identifier within the API, but can change if the iteration is deleted and recreated. The "identifier" is a permanent identifier that does not change, even if the iteration is deleted and recreated.
For exactly identifying an iteration or sprint, it's best to use the "identifier" field as it provides a permanent identifier that does not change, even if the iteration is deleted and recreated.