Create Azure Artifacts universal package feed via Azure API - Example

与世无争的帅哥 提交于 2021-01-29 06:46:23

问题


we want/need to create feeds in an automatic way depending on a configuration file. Looking at the official documentation neither the Azure CLI nor the Python API provides some convenience functionality to achieve my goal. There is only the REST API that is described briefly in the docs.

Is there anywhere a concrete example for a feed creation via REST API that I can reuse?

Thank you


回答1:


Check Feed Management - Create Feed, to create a feed with specific name:

POST https://feeds.dev.azure.com/{organization}/{project}/_apis/packaging/feeds?api-version=5.1-preview.1

With request body:

{
    "name": "MyFeedName",
    "hideDeletedPackageVersions": true,
    "upstreamEnabled": true
}

Then the feed with name MyFeedName will be created:

For more parameters about request body you can refer to this doc.



来源:https://stackoverflow.com/questions/62875730/create-azure-artifacts-universal-package-feed-via-azure-api-example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!