Product releases
Versioned releases of a product and the builds hung off them.
Versioned releases and the builds hung off them. The CI flow is walked through on Product releases.
List product releases
/api/v1/kahunacart/products/{id}/releases
A product's versioned releases, newest first, each with its version, release date, Markdown changelog, published flag and the files attached to it, plus the evergreen files that belong to no release and are therefore offered to every buyer. Releases sort by date and never by parsing the version string.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | Product id |
Create a release
/api/v1/kahunacart/products/{id}/releases
Cut a new version of a product. A version is required and answers 409 when this product already has one; released_at defaults to now and published defaults to true. Publishing backfills download grants for the product's past buyers. Files are attached afterwards with attach_release_file.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | Product id |
| version required | string | Version string, for example 2.4.1 |
| released_at optional | string | Release date as YYYY-MM-DD, or a unix timestamp; defaults to now |
| changelog optional | string | Release notes as Markdown |
| published optional | boolean |
A draft release is invisible to buyers and hands out no grants
Default:
true |
Update a release
/api/v1/kahunacart/products/{id}/releases/{releaseId}
Edit a release's version, date, notes or published flag. Only the fields sent are written, so flipping published cannot blank a changelog you never loaded. Renaming onto a version this product already has answers 409. Publishing a release for the first time backfills grants for past buyers.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | Product id |
| releaseId required | integer | Release id |
| version optional | string | |
| released_at optional | string | YYYY-MM-DD, or a unix timestamp |
| changelog optional | string or null | |
| published optional | boolean |
Delete a release
/api/v1/kahunacart/products/{id}/releases/{releaseId}
Delete a release and the rows of the files on it. The bytes stay on disk on purpose, because a cascade must never be what shreds a merchant's build artifacts, and detaching the files into the evergreen pile would hand every buyer a build that was meant for one version.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | Product id |
| releaseId required | integer | Release id |
Attach a file to a release
/api/v1/kahunacart/products/{id}/releases/{releaseId}/files/{fileId}
Move a file already attached to the product into this release, which is how a build uploaded before the version was cut gets joined to it. Both the file and the release must belong to the product in the path.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | Product id |
| releaseId required | integer | Release id |
| fileId required | integer | Product file id |
Detach a file from a release
/api/v1/kahunacart/products/{id}/releases/{releaseId}/files/{fileId}
Take a file back out of its release, making it evergreen. An evergreen file is offered to every buyer of the product with no entitlement question asked, so this widens access rather than narrowing it.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | Product id |
| releaseId required | integer | Release id |
| fileId required | integer | Product file id |
Publish a release from CI
/api/v1/kahunacart/products/{id}/releases/publish
Create a release and attach its build in one multipart/form-data call, which is what a CI job posts. See Product releases.
Repeating a version on publish is not an error: the release is found rather than created and the file is added to it, so a matrix build posting three platform builds at one version produces one release with three files. published defaults to true on publish, and a repeat call never unpublishes a version that is already live.