Distributing Releases
Release files hosted on Cryptlex are gated behind the customer's license. To download a file, the request must include either the customer's license key or an access token of a user associated with the license.
Downloading a release
To download a release, the request must contain the license key as the key query parameter or an access token in the Authorization header.
Download file using license key
curl -L "https://releases.cryptlex.com/v3/{ACCOUNT_ID}/{RELEASE_ID}/myapp.zip?key={LICENSE_KEY}" -o "myapp.zip"Download file using access token
curl -L https://releases.cryptlex.com/v3/{ACCOUNT_ID}/{RELEASE_ID}/myapp.zip -H "Authorization: Bearer {ACCESS_TOKEN}" -o "myapp.zip"The license key must belong to the product for which the release was created and the access token must belong to any user who is associated with the license of the product.
Downloading the latest release
To get the download URLs for the latest release of your product, invoke the /v3/releases/latest endpoint.
GET https://api.cryptlex.com/v3/releases/latestQuery parameters
| Name | Type | Description |
|---|---|---|
| productId* | string | Unique identifier for the product |
| platform* | string | Release platform |
| channel | string | Release channel (defaults to "stable") |
| key* | string | License key |
| accountId* | string | Unique identifier for the account |
It returns a 200 success response containing the download URLs of the latest release:
{
"name": "MyApp v2.3",
"channel": "stable",
"version": "2.3",
"platform": "windows",
"published": true,
"productId": "3e7aa7eb-d175-446d-bc40-282209fd8360",
"notes": "Added feature X",
"files": [
{
"name": "myapp.exe",
"url": "https://releases.cryptlex.com/v3/f7e0e912-3c41-4a92-b7a1-2d63c8f10e25/155f79fc-2f28-40b2-afc5-3fcc6c63225a/myapp.exe",
"size": 37580,
"checksum": "1239d72ef6ff110ef63a803120728907",
"releaseId": "155f79fc-2f28-40b2-afc5-3fcc6c63225a",
"id": "7ca34eed-05be-4799-8b3d-f00d5440c5da",
"createdAt": "2018-06-29T13:11:33.852642",
"updatedAt": "2018-06-29T13:11:33.852643"
},
{
"name": "myapp.zip",
"url": "https://releases.cryptlex.com/v3/f7e0e912-3c41-4a92-b7a1-2d63c8f10e25/155f79fc-2f28-40b2-afc5-3fcc6c63225a/myapp.zip",
"size": 5510,
"checksum": "8892af7769c1147f9801c1a5aab52cce",
"releaseId": "155f79fc-2f28-40b2-afc5-3fcc6c63225a",
"id": "685eaa15-33bc-4443-89e4-baf733a6c34d",
"createdAt": "2018-06-29T13:08:59.175004",
"updatedAt": "2018-06-29T13:11:33.563872"
}
],
"id": "155f79fc-2f28-40b2-afc5-3fcc6c63225a",
"createdAt": "2018-06-29T08:55:03.515291",
"updatedAt": "2018-06-29T08:55:03.515414"
}Tracking release downloads
Every download of a Cryptlex-hosted release file is recorded as a release download event, capturing the release version and channel, the file, the user and license that downloaded it, the download status, and the location it was downloaded from. Use these events to track the rollout and adoption of new versions.
You can view release download events on the Release Management -> Release Download Events page in the admin portal, query them with the GET /v3/release-download-events endpoint, or export them as a CSV file with the GET /v3/release-download-events/export endpoint.
Delivering updates
To detect from inside your app whether a newer release is available and deliver it automatically, see Auto-Updates.