ProGet Documentation

Package Promotion API

  • Last Modified: 2019-09-23

The Package Promotion API offer a simple mechanism for querying the status of promoted packages and promoting packages between feeds.

This API endpoint should be used instead of the Native API Methods when possible, as they are much easier to use and will likely not change.

For security and simplicity, these endpoints require that an API Key is created and passed into each request.

Data Specification

  • Package
  • Promotion
Property Format
packageName A string representing the name or ID of the package.
groupName A string representing the group of the package for Universal and Maven feeds and the scope of the package for npm feeds. This property is omitted for all other feed types.
packageType A string representing the feed type of the package, one of: upack, powershell, nuget, chocolatey, maven, npm, bower, or docker
version A string representing the version of the package. In ProGet 5.0.9 and later, you can specify latest or latest-stable for the version property. This will then promote the latest or latest non-prerelease version of the package.
promotions An array of Promotion objects representing a package promotion.
Property Format
fromFeed A string representing the name of the feed the promotion originated from.
toFeed A string representing the name of the feed the package was promoted to.
date A string representing the UTC date of the promotion in ISO 8601 format (yyyy-MM-ddThh:mm:ss).
user A string representing the user who promoted the package. Packages promoted via this API will by noted with SYSTEM as the user.
comments A string containing comments submitted when the promotion occurred.
id An integer representing a unique identifier of the promotion.

List Promotions Endpoint

GET /api/promotions/list?key=«api-key»&fromFeed=«feed-name»&toFeed=«feed-name»&groupName=«group-name»&packageName=«package-name»&version=«version»

Lists package promotions based on supplied parameters. This endpoint returns a status of 200 (on success), 400 (missing or incorrect parameters), 403 (invalid key).

On success, an array of Package objects will be returned, filtered by the specified parameters.

Promote Packages Endpoint

POST /api/promotions/promote

Promotes a package to a specified feed. Of the fields listed in the request body, all fields are required except for groupName and comments.

  • JSON Request
  • URL-Encoded Request

POST /api/promotions/promote Content-Type: application/json

Request Body:
  packageName: "hdars-package",
  groupName: "",
  version: "1000.0.0",
  fromFeed: "hdars-integration-feed",
  toFeed: "hdars-production-feed",
  comments: "This package was promoted by BuildMaster HDARS Application"

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

Request Body:

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit 71b88076 on master