简体   繁体   English

Azure DevOps REST API 调用列表版本不起作用。 有什么建议么?

[英]Azure DevOps REST API call to list releases is not working. Any suggestions?

I am attempting a list all releases for a pipeline in Azure DevOps by using the Azure DevOps REST API. The documentation states that the call to get a release is:我正在尝试使用 Azure DevOps Azure DevOps REST API 列出管道的所有版本。文档指出获取版本的调用是:

https://dev.azure.com/(organization)/(project)/_apis/release/releases/(releaseId)?api-version=(version)

and the call to list all releases is:列出所有版本的调用是:

(organization)/(project)/_apis/release/releases?api-version=(version)

But the call always fails.但是调用总是失败。 In ADO, I have the release ID, but the path to the releases is pipelines/releases.在 ADO 中,我有发布 ID,但发布的路径是管道/发布。 By this I mean that to get to the list of releases, you must go to the pipeline dropdown, hit releases, select the pipeline, and then it shows the list of releases for that pipeline.我的意思是,要获得发布列表,您必须 go 到管道下拉菜单,点击发布,select 管道,然后它会显示该管道的发布列表。 I am not too familiar with API's and I am using postman to test these URL calls before using these calls in PowerBI to make a table.我不太熟悉 API,我使用 postman 来测试这些 URL 调用,然后在 PowerBI 中使用这些调用来制作表格。

Is there a call to get to the list of these releases?是否需要获取这些版本的列表? I can get a list of runs by pipeline but not a list of releases.我可以获得按管道运行的列表,但不是发布列表。

The correct subdomain is https://vsrm.dev.azure.com so just change your call to this: https://vsrm.dev.azure.com/(organization)/(project)/_apis/release/releases/(releaseId)?api-version=(version)正确的子域是https://vsrm.dev.azure.com所以只需将您的调用更改为: https://vsrm.dev.azure.com/(organization)/(project)/_apis/release/releases/(releaseId)?api-version=(version)

Reference 参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 开发运营 REST API 发送邮件 - Azure Devops REST API SendMail 使用 rest api 将笔记本部署到 azure devops - deploy notebooks to azure devops using rest api 如何使用 Azure Devops 服务更新 Azure Devops 中测试用例的“区域路径” Rest API - How to update "Area Path" of a test case in Azure Devops using Azure Devops Services Rest API 设置 Azure devops 使用 REST API 发布管道变量 - Set Azure devops Release pipeline variable using REST API 令牌认证(而不是 PAT 令牌)到 Azure DevOps REST API 通过 Azure DevOps 管道 - Token authentication (instead of PAT token) to Azure DevOps REST API via Azure DevOps Pipeline Azure DevOps 服务 REST API 5.1 - 获取单元测试 (VSTest) 和 sonarqued - Azure DevOps Services REST API 5.1 - get unit testing (VSTest) and sonarqued Azure DevOps PS REST API:没有为“PUT”请求提供 api 版本。 该版本必须作为接受的一部分提供 header - Azure DevOps PS REST API : No api-version was supplied for the \"PUT\" request. The version must be supplied either as part of the Accept header 如何使用 REST API 列出 azure 回购中内容的文件 - How to list the files with content that are in azure repo using REST API 如何从yaml管道访问Azure Devops API? - How to access Azure Devops API from yaml pipeline? Azure 逻辑应用触发 REST API Azure API 管理 - Azure Logic App trigger a REST API in Azure API Manegement
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM