Create/Update Release
  • 21 Feb 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Create/Update Release

  • Dark
    Light
  • PDF

Article Summary

The Create/Update Release is an endpoint in ProGet's SCA Directory API that will create a new release or update properties on an existing release, and return a ReleaseInfo Object object describing the new or updated release.

Note: this API endpoint functions by creating a new release when the version specified in the API request does not exist, else it updates an existing release.

🚀 Quick Example 1: Setting a Release to Inactive with Curl

This example updates version 1.2.3 of a release for a project named myProject by setting it's status to "inactive", authenticating with the API key abc12345:

curl -X POST -H "X-ApiKey: abc12345" -H "Content-Type: application/json" -d "{\"project\": \"myProject\", \"version\": \"1.2.3\", \"active\": false}" "https://proget.corp.local/api/sca/releases"

Request Specification

To create or update a release, simply POST to the URL with an appropriate API Key and a ReleaseInfo Object object as the request body.

POST /api/sca/releases

Creating a release with a ReleaseInfo body requires the project name (e.g. myProject) and the version (e.g. 1.2.3):

POST /api/sca/releases

{
  "project":"myProject",
  "version":"1.2.3",
}

Updating a release with a ReleaseInfo body requires the project name (e.g. myProject), the version (e.g. 1.0.0) and the property to update (e.g. active as false):

POST /api/sca/releases

{
  "project":"myProject",
  "version":"1.0.0",
  "active":false,
}

Response Specification

A successful (200) response body will contain a ReleaseInfo Object object. For example, to creating a new release version 1.2.3 of a project named myProject, the request would return this:

POST /api/sca/releases

{
  "version":"1.2.3",
  "active":true,
  "viewReleaseUrl":"https://proget.corp.local/projects/release?projectReleaseId=2",
  "viewIssuesUrl":"https://proget.corp.local/projects/release/issues?projectReleaseId=2"
}
ResponseDetails
200 (Success)body will contain a ReleaseInfo object
400 (Invalid Input)indicates invalid or missing properties on the ReleaseInfo object; the body will provide some details as text
403 (Unauthorized API Key)indicates a missing, unknown, or unauthorized API Key; the body will be empty
500 (Server Error)indicates an unexpected error; the body will contain the message and stack trace, and this will also be logged

Was this article helpful?

What's Next