0

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

Shawn
  • 3
  • 1

1 Answers1

0

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

For example, this is the project iteration and team iteration [![enter image description here][2]][2]

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][3]][3]

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][4]][4]

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

I hope it could do some help. Thanks. [1]: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/classification-nodes/get-classification-nodes?view=azure-devops-rest-5.0&tabs=HTTP#get_the_iteration_tree_with_2_levels_of_children [2]: https://i.stack.imgur.com/GWtvU.png [3]: https://i.stack.imgur.com/xElRU.png [4]: https://i.stack.imgur.com/InUmH.png [5]: https://i.stack.imgur.com/eTalz.png

Antonia Wu-MSFT
  • 499
  • 2
  • 4