问题
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