- 18 Oct 2021
- 1 Minute to read
- Print
- DarkLight
- PDF
Repackaging API
- Updated on 18 Oct 2021
- 1 Minute to read
- Print
- DarkLight
- PDF
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.
Property | Description |
---|---|
feed R | Name of the feed where the target package is located |
group | Group-portion of the package's name; this is only applicable for Universal Packages |
name R | Name of the target package |
version R | Version of the target package |
newVersion R | Version of the new package to create |
comments | Comments to append to repackaging audit history |
toFeed | When 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.
Examples
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:
feed=hdars-integration-feed&packageName=hdars-package&version=1000.0.0-RC.1&newVersion=1000.0.0&comments=This+package+was+repackaged+by+BuildMaster+HDARS+Application