Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Packages

view on GitHub

The Packages API provides several pgutil commands (available as pgutil packages) and HTTP endpoints to query, download, publish, delete, and perform other operations on packages in package-based feeds, regardless of the package type.

pgutil Commands

All HTTP endpoints of the Packages API are available as pgutil commands.

To find the list of commands available in pgutil, simply run pgutil packages --help. See Getting started with pgutil to learn more.

Available HTTP Endpoints

* Only available as a pgutil command.

The Packages API is available starting from ProGet 2023.0

Authenticating to Packages API

The following is a summary of access types and their corresponding requirements for various API keys types and endpoints within this API.

Access Type Requirements
System API Keys Use/Manage Feeds
Feed API Keys View/Download is required for all endpoints
Add/Repackage is required for Upload Package and Repackage Package
Overwrite/Delete is required for Delete Package
Promote is required for Promote Package
Personal API Key View & Download Packages is required for List Packages and List Package Versions
Publish Packages is required for Upload Package
Promote Packages is required for Promote Package
Administer or Manage Feed is required for Delete Package, Set Package Status, and Repackage Package. These will also grant permissions for all other endpoints.
No API Key anonymous or authenticated user must have at least View & Download Packages

To specify an API Key, use the request header (X-ApiKey), querystring (key), or api:«api-key» as the username. See API Key Usage to learn more.

Package Identifiers (Group/Name/Version vs Purl)

Endpoints that work with a single package version (e.g. downloading, deleting, etc.) require identifying a single version package using querystring parameters. This can be done by specifying multiple parameters (name and version, and sometimes group and qualifier) or a single parameter (purl).

Documentation Conventions

In the operations that require package version identifier, we will use «package-identifiers»to reference the one or multiple parameters that you can use.

Using Multiple Parameters to Identify a Package

Identifying a package version requires up to four different components, depending on the type of package.

Argument Details Endpoints Used
name the name/id of package to download all
version the version of package to download all
group used only by Universal and npm feeds; for npm, this is the "scope" with the the @ replaced by %40 query package version, query latest package, download package, delete package, set package status
qualifier used by some feeds (like Debian and rubygems) for attributes like architecture query package version, query latest package, download package, delete package, set package status

Using a Purl to Identify a Package

To simplify package identification, you can also specify a purl (i.e. Package Url) that is compatible across all package types. These work with any endpoint that works with a single package version (e.g. deleting, downloading, promoting, etc.)

This follows the purl-spec, and you can also find it on the PackageVersion Object