是否可以使用 Azure Devops API 访问组织范围的工件源?

Sty*_*tyn 3 azure azure-devops azure-devops-rest-api

我需要找到与 Azure DevOps API 的 Artifact 资源一起使用的 Feed 的 ID。我当前使用此 URL 查看我的组织中的所有 Artifact feed。

https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds?api-version=6.0-preview.1
Run Code Online (Sandbox Code Playgroud)

这将返回所有项目范围的 Feed,但不返回组织范围的 Feed。我尝试使用下面的链接访问该链接,但没有成功,它总是告诉我提供的 ID 不存在。

https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}?api-version=6.0-preview.1
Run Code Online (Sandbox Code Playgroud)

所以我的问题是:有没有办法使用 DevOps API 从组织范围的 Feed 访问信息/包?

Leo*_*SFT 5

有没有办法使用 DevOps API 从组织范围的 Feed 访问信息/包?

答案是肯定的。

您可以从REST API URL 中删除:{project}

https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds?api-version=6.0-preview.1
Run Code Online (Sandbox Code Playgroud)

或者

https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=6.0-preview.1
Run Code Online (Sandbox Code Playgroud)

我的测试结果:

在此输入图像描述