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.

Promote Package

view on GitHub

The Promote Package API is available as both a pgutil command and an HTTP Request, and will promote packages in package-based feeds, regardless of the package type:

This API requires ProGet 2023.0 or later.

Command Specification (CLI)

The packages promote command is used to promote a package from one feed to another.

The --package and --version options are always required. The --feed option is required if a default feed is not configured, and the --to-feed option is required to promote a feed other than the original feed.

Promoting an npm Package requires the feed to promote from (e.g. unapproved-npm), the feed to promote to (e.g. approved-npm), name (e.g. @myscope/my-npm-package) and version (e.g. 2.0.0):

pgutil packages promote --feed=unapproved-npm --to-feed=approved-npm --package=@my-scope/my-npm-package --version=2.0.0

Note source options must also be specified unless you have the "Default" source configured, and that a feed may be instead specified in the source. See Working with Sources to learn more.

HTTP Request Specification

To promote a package, simply POST to the URL with an appropriate API Key and a PromotePackageInput JSON object as the request body.

POST /api/promotions/promote

Alternatively you can promote a package as a URL encoded request using form-encoded values:

POST /api/promotions/promote Content-Type: application/x-www-form-urlencoded

name=«package-name»&group=«scope-name»&version=«version»&fromFeed=«from-feed-name»&toFeed=«to-feed-name»&comments=«comments»

«»

HTTP Response Specification

Response Details
200 (Success) the package was promoted
400 (Invalid Input) indicates invalid or missing properties on the package; the body will provide some details as text
403 (Unauthorized API Key) indicates a missing, unknown, or unauthorized API Key