如何通过Azure API获取项目迭代

问题描述 投票:0回答:1

我正在将 Azure CLI 应用程序转换为在 Python 中使用 REST API

在 CLI 中我可以获得更新项目迭代:

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

但是,我只能在 API 中找到团队迭代。

是否有用于项目迭代的等效 REST API?

我尝试了下面的变体,但这只会给团队迭代

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

python azure-devops azure-cli azure-rest-api
1个回答
0
投票

您可以尝试其余的 api:[分类节点 - 获取分类节点]。

比如这是项目迭代和团队迭代 enter image description here

然后你可以使用过滤器“$深度”运行api,在我的示例中它应该是2:获取项目迭代和团队迭代的草稿信息(包括他们的id)。 获取 https://dev.azure.com/{org name}/{项目名称}/_apis/wit/classificationnodes?$depth=2&api-version=5.0

enter image description here

如果您想获得有关项目迭代的更多具体信息,您可以尝试使用过滤器“id”运行: 获取 https://dev.azure.com/{org name}/{项目名称}/_apis/wit/classificationnodes?ids=**&api-version=5.0

enter image description here

供您参考,我使用postman来运行rest api,似乎您可以在这里选择语言: enter image description here

希望可以帮到大家。谢谢。

© www.soinside.com 2019 - 2024. All rights reserved.