Repackaging API
  • 18 Oct 2021
  • 1 Minute to read
  • Dark
  • PDF

Repackaging API

  • Dark
  • PDF

Article Summary

The Repackaging API provides the programmatic ability to repackage prerelease packages by posting JSON- or Form-encoded data.

The Repackacing API is available in paid and trial ProGet editions, and will raise a 500 in free editions.

Security & API Keys

Before using this API, you will need to create an API Key with the appropriate permissions.

  • System API Keys: Use/Manage Feeds permissions
  • Feed API Keys: Add/Repackage
  • Personal API Keys: Associated user must have "Feeds: Add Package" privilege

This API Key can be included in the posted data as a JSON Property (API_Key) or Form-encoded Value (key). You can pass it as a header (X-ApiKey) or querystring (key). See API Key Usage to learn more.

Data Specification

The Repackaging endpoint accepts the following properties as JSON- or Form-encoded data. An "R" denotes a required property.

feedRName of the feed where the target package is located
groupGroup-portion of the package's name; this is only applicable for Universal Packages
nameRName of the target package
versionRVersion of the target package
newVersionRVersion of the new package to create
commentsComments to append to repackaging audit history
toFeedWhen specified, promotes the package to the specified feed instead of keeping it in feed.

Previous versions of ProGet used groupName and packageName instead of group and name; these may still be used, but aren't recommended.

Endpoint Specification

The Repackaging API has only one endpoint.

POST /api/repackaging/repackage

Posting valid data to this endpoint will creating a new package in the same feed, or toFeed when specified.


JSON Request

This will repackage imir/hdars-package-4.3.2-rc.1 to imir/hdars-package-4.3.2

POST /api/repackaging/repackage 
Content-Type: application/json
  "feed": "hdars-integration-feed",
  "package": "hdars-package",
  "group": "imir",
  "version": "4.3.2-rc.1",
  "newVersion": "4.3.2",
  "comments": "This package was repackaged by an automated process."

URL-Encoded Request

POST /api/repackaging/repackage 
Content-Type: application/x-www-form-urlencoded`

Request Body:


Was this article helpful?