Skip to Content
New release 12 available 🎉

Downloads

All PUT endpoints update only the fields present in the body; see Updating Resources.

GET/v1/products/{productId}/releases/{releaseId}/downloadsGET /v1/products/{productId}/releases/{releaseId}/downloads

Code samples

# You can also use wget curl -X GET /v1/products/{productId}/releases/{releaseId}/downloads \ -H 'Accept: text/plain' \ -H 'x-api-key: API_KEY'

GET /v1/products/\{productId\}/releases/\{releaseId\}/downloads

Gets the downloadable artifacts registered for a product release.

Parameters

NameInTypeRequiredDescription
productIdpathinteger(int32)trueThe product ID.
releaseIdpathinteger(int32)trueThe release ID.
filterquerystringfalseThe filter to apply to the release downloads.
sortquerystringfalseThe sort order of the release downloads.
takequeryinteger(int32)falseThe number of release downloads to take.
skipqueryinteger(int32)falseThe number of release downloads to skip.

Example responses

200 Response

{"success":true,"releaseDownloads":[{"id":0,"platform":"string","kind":"string","fileName":"string","sourceKind":"string","url":"string","size":0,"sha256":"string","sha512":"string","signature":"string","signatureKeyId":"string","downloads":0,"createdAt":"2019-08-24T14:15:22Z","updatedAt":"2019-08-24T14:15:22Z"}],"totalReleaseDownloadsCount":0}
{ "success": true, "releaseDownloads": [ { "id": 0, "platform": "string", "kind": "string", "fileName": "string", "sourceKind": "string", "url": "string", "size": 0, "sha256": "string", "sha512": "string", "signature": "string", "signatureKeyId": "string", "downloads": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "totalReleaseDownloadsCount": 0 }

Responses

StatusMeaningDescriptionSchema
200OK OKLicensing.GetReleaseDownloadsResponse

Authentication: API key (x-api-key).

POST/v1/products/{productId}/releases/{releaseId}/downloadsPOST /v1/products/{productId}/releases/{releaseId}/downloads

Code samples

# You can also use wget curl -X POST /v1/products/{productId}/releases/{releaseId}/downloads \ -H 'Content-Type: application/json' \ -H 'Accept: text/plain' \ -H 'x-api-key: API_KEY'

POST /v1/products/\{productId\}/releases/\{releaseId\}/downloads

Registers a new downloadable artifact for a product release from an externally-hosted https:// URL, using the publisher-supplied size and hashes (they cannot be computed server-side since the bytes are never uploaded).

The same route also accepts a multipart/form-data upload of the artifact itself, with the form fields platform, kind, sourceKind (local, the default, or resource), an optional fileName and the file part: the service then computes size, SHA-256 and SHA-512 server-side.

Body parameter

{ "releaseDownload": { "id": 0, "platform": "string", "kind": "string", "fileName": "string", "sourceKind": "string", "url": "string", "size": 0, "sha256": "string", "sha512": "string", "signature": "string", "signatureKeyId": "string", "downloads": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }
releaseDownload: id: 0 platform: string kind: string fileName: string sourceKind: string url: string size: 0 sha256: string sha512: string signature: string signatureKeyId: string downloads: 0 createdAt: 2019-08-24T14:15:22Z updatedAt: 2019-08-24T14:15:22Z

Parameters

NameInTypeRequiredDescription
productIdpathinteger(int32)trueThe product ID.
releaseIdpathinteger(int32)trueThe release ID.
bodybodyLicensing.InsertReleaseDownloadRequestfalseThe request containing the release download to register.

Example responses

201 Response

{"success":true,"id":0,"platform":"string","kind":"string","size":0,"sha256":"string","sha512":"string","message":"string"}
{ "success": true, "id": 0, "platform": "string", "kind": "string", "size": 0, "sha256": "string", "sha512": "string", "message": "string" }

Responses

StatusMeaningDescriptionSchema
201Created CreatedLicensing.InsertReleaseDownloadResponse

Authentication: API key (x-api-key).

PUT/v1/products/{productId}/releases/{releaseId}/downloadsPUT /v1/products/{productId}/releases/{releaseId}/downloads

Code samples

# You can also use wget curl -X PUT /v1/products/{productId}/releases/{releaseId}/downloads \ -H 'Content-Type: application/json-patch+json' \ -H 'Accept: text/plain' \ -H 'x-api-key: API_KEY'

PUT /v1/products/\{productId\}/releases/\{releaseId\}/downloads

Updates the metadata of an existing release download (platform, kind, file name, signature, or the target URL of a url-sourced artifact). Size and hashes are never updated this way - re-upload or re-register the artifact instead.

Body parameter

{ "releaseDownload": { "id": 0, "platform": "string", "kind": "string", "fileName": "string", "sourceKind": "string", "url": "string", "size": 0, "sha256": "string", "sha512": "string", "signature": "string", "signatureKeyId": "string", "downloads": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }

Parameters

NameInTypeRequiredDescription
productIdpathinteger(int32)trueThe product ID.
releaseIdpathinteger(int32)trueThe release ID.
bodybodyLicensing.UpdateReleaseDownloadRequestfalseThe request containing the release download to update.

Example responses

200 Response

{"success":true,"message":"string"}
{ "success": true, "message": "string" }

Responses

StatusMeaningDescriptionSchema
200OK OKLicensing.UpdateReleaseDownloadResponse

Authentication: API key (x-api-key).

DELETE/v1/products/{productId}/releases/{releaseId}/downloads/{downloadId}DELETE /v1/products/{productId}/releases/{releaseId}/downloads/{downloadId}

Code samples

# You can also use wget curl -X DELETE /v1/products/{productId}/releases/{releaseId}/downloads/{downloadId} \ -H 'Accept: text/plain' \ -H 'x-api-key: API_KEY'

DELETE /v1/products/\{productId\}/releases/\{releaseId\}/downloads/\{downloadId\}

Deletes a release download. A resource-sourced artifact’s Resource row is deleted along with it, but a local-sourced artifact’s file is deliberately left on disk under the download root - this service never deletes from the download root, so an admin who deletes the wrong row by mistake (or one whose bytes are still referenced by an older feed/cache) does not lose the file. A url-sourced artifact has nothing local to clean up either way.

Parameters

NameInTypeRequiredDescription
productIdpathinteger(int32)trueThe product ID.
releaseIdpathinteger(int32)trueThe release ID.
downloadIdpathinteger(int32)trueThe release download ID.

Example responses

200 Response

{"success":true,"message":"string"}
{ "success": true, "message": "string" }

Responses

StatusMeaningDescriptionSchema
200OK OKLicensing.DeleteReleaseDownloadResponse

Authentication: API key (x-api-key).

POST/v1/products/{productId}/releases/{releaseId}/downloads/verifyPOST /v1/products/{productId}/releases/{releaseId}/downloads/verify

Code samples

# You can also use wget curl -X POST /v1/products/{productId}/releases/{releaseId}/downloads/verify \ -H 'Accept: text/plain' \ -H 'x-api-key: API_KEY'

POST /v1/products/\{productId\}/releases/\{releaseId\}/downloads/verify

Recomputes the hashes of every local or resource-backed artifact of a release and compares them against what is stored, reporting any that no longer match (missing file, missing resource, or a hash mismatch) without touching url-sourced artifacts, which have no local bytes to re-check.

Parameters

NameInTypeRequiredDescription
productIdpathinteger(int32)trueThe product ID.
releaseIdpathinteger(int32)trueThe release ID.

Example responses

200 Response

{"success":true,"verified":0,"drifted":[0]}
{ "success": true, "verified": 0, "drifted": [ 0 ] }

Responses

StatusMeaningDescriptionSchema
200OK OKLicensing.VerifyReleaseDownloadsResponse

Authentication: API key (x-api-key).

Last updated on