pythonazure-devopsazure-cliazure-rest-api

How to get project iterations through the Azure API


I am converting an Azure CLI app to use REST API in Python

In the CLI I can get, update project iterations:

https://learn.microsoft.com/en-us/cli/azure/boards/iteration/project?view=azure-cli-latest

However, I can only find team iterations in the API.

Is there an equivalent REST API for project iterations?

I tried variations of the below, but this only gives the team iterations

https://learn.microsoft.com/en-us/rest/api/azure/devops/work/iterations/list?view=azure-devops-rest-7.1&tabs=HTTP


Solution

  • You could try the rest api: [Classification Nodes - Get Classification Nodes].

    For example, this is the project iteration and team iteration enter image description here

    Then you could run the api with the filter '$depth', here in my sample it should be 2: To get the draft information of the project iteration and team iteration(inclue their id). Get https://dev.azure.com/{org name}/{project name}/_apis/wit/classificationnodes?$depth=2&api-version=5.0

    enter image description here

    And if you want to get more specific information about the project iteration, you could try to run with the filter 'id': Get https://dev.azure.com/{org name}/{project name}/_apis/wit/classificationnodes?ids=**&api-version=5.0

    enter image description here

    And for your reference, I use postman to run rest api, it seems you could choose language here: enter image description here

    I hope it could do some help. Thanks.