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
cURL
# 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| productId | path | integer(int32) | true | The product ID. |
| releaseId | path | integer(int32) | true | The release ID. |
| filter | query | string | false | The filter to apply to the release downloads. |
| sort | query | string | false | The sort order of the release downloads. |
| take | query | integer(int32) | false | The number of release downloads to take. |
| skip | query | integer(int32) | false | The 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
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Licensing.GetReleaseDownloadsResponse |
Authentication: API key (x-api-key).
POST/v1/products/{productId}/releases/{releaseId}/downloadsPOST /v1/products/{productId}/releases/{releaseId}/downloads
Code samples
cURL
# 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| productId | path | integer(int32) | true | The product ID. |
| releaseId | path | integer(int32) | true | The release ID. |
| body | body | Licensing.InsertReleaseDownloadRequest | false | The 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
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Created | Licensing.InsertReleaseDownloadResponse |
Authentication: API key (x-api-key).
PUT/v1/products/{productId}/releases/{releaseId}/downloadsPUT /v1/products/{productId}/releases/{releaseId}/downloads
Code samples
cURL
# 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| productId | path | integer(int32) | true | The product ID. |
| releaseId | path | integer(int32) | true | The release ID. |
| body | body | Licensing.UpdateReleaseDownloadRequest | false | The request containing the release download to update. |
Example responses
200 Response
{"success":true,"message":"string"}{
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Licensing.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
cURL
# 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| productId | path | integer(int32) | true | The product ID. |
| releaseId | path | integer(int32) | true | The release ID. |
| downloadId | path | integer(int32) | true | The release download ID. |
Example responses
200 Response
{"success":true,"message":"string"}{
"success": true,
"message": "string"
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Licensing.DeleteReleaseDownloadResponse |
Authentication: API key (x-api-key).
POST/v1/products/{productId}/releases/{releaseId}/downloads/verifyPOST /v1/products/{productId}/releases/{releaseId}/downloads/verify
Code samples
cURL
# 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| productId | path | integer(int32) | true | The product ID. |
| releaseId | path | integer(int32) | true | The release ID. |
Example responses
200 Response
{"success":true,"verified":0,"drifted":[0]}{
"success": true,
"verified": 0,
"drifted": [
0
]
}Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | OK | Licensing.VerifyReleaseDownloadsResponse |
Authentication: API key (x-api-key).