Freigeben über


Use feed views to share packages

TFS 2017

Feed views are a way to enable users to share some packages while keeping other packages private. Views filter the feed to a subset of packages that meet a set of criteria defined by that view.

By default, Azure Artifacts comes with three views: @Local, @Prerelease, and @Release. @local is the default view that contains all the published packages as well as all the packages saved from an upstream source. All views support NuGet, npm, Maven, Python, and Universal packages.

Promote packages

With Azure Artifacts, you can promote packages to a specific to only share a subset of packages with your customers. Note that you cannot publish a package directly to a view. Instead, you should publish the package to your feed then promote it to a view as follows.

  1. Select Artifacts.

  2. Select your feed from the dropdown menu.

  3. Select the package you wish to promote.

  4. Select Promote.

    A screenshot showing how to promote a package to a view.

  5. Select a view from the dropdown menu, and then select Promote.

    Screenshot showing the promote package dialog box.

Note

Package demotion is not supported. If you want this feature to be added to a future release, please feel free to Suggest a feature on Azure DevOps Developer Community.

Promote packages using the REST API

In addition to using the Azure Artifacts user interface, you can also promote packages using the REST API.

  • NuGet:

    PATCH https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}?api-version=5.1-preview.1
    

    Use JsonPatchOperation to construct the body of your request. See NuGet - update package version for more details.

  • npm:

    PATCH https://pkgs.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/npm/{packageName}/versions/{packageVersion}?api-version=5.1-preview.1
    

    Use JsonPatchOperation to construct the body of your request. See npm - update package version for more details.

  • Python:

    PATCH https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/pypi/packages/{packageName}/versions/{packageVersion}?api-version=5.1-preview.1
    

    Use JsonPatchOperation to construct the body of your request. See Python - update package version for more details.

  • Universal packages:

    PATCH https://pkgs.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/upack/packages/{packageName}/versions/{packageVersion}?api-version=5.1-preview.1
    

    Use JsonPatchOperation to construct the body of your request. See Universal packages - update package version for more details.

Tip

Check out the Get started with the REST API and the REST API samples to learn how to interact with Azure DevOps REST API.

Manage views

You can create your own views or rename and delete existing ones from your feed's settings.

  1. Select Artifacts.

  2. Select your feed from the dropdown menu.

  3. Select the gear icon to access your feed's settings.

    Screenshot showing how to access the feed's settings.

  4. Select Views.

    A screenshot showing how to navigate to views.

  5. Select a view, and then select Edit to edit your view or select Add view if you want to add a new view.

  6. Select Save when you are done.