Nurama Developers
Assets

Download assets

Generate download links for specified assets/files. Requires `canDownloadAssets`. Side effect: one `AccessActivityDaily` row per asset is upserted with `eventType: 'download'` and `visibility: req.body.visibility` (defaults to `'creator'`). The metric write is fire-and-forget — a failure logs and is swallowed; it never breaks the download response. Note: the Joi schema for this route validates `params` rather than `body`, so the request body is currently passed through unvalidated; the limits below reflect the intended contract (`limits.asset.maxDownloadResults`).

POST
/assets/download

Generate download links for specified assets/files. Requires canDownloadAssets. Side effect: one AccessActivityDaily row per asset is upserted with eventType: 'download' and visibility: req.body.visibility (defaults to 'creator'). The metric write is fire-and-forget — a failure logs and is swallowed; it never breaks the download response.

Note: the Joi schema for this route validates params rather than body, so the request body is currently passed through unvalidated; the limits below reflect the intended contract (limits.asset.maxDownloadResults).

Authorization

AuthorizationBearer <token>

OAuth 2.1 authorization code flow with PKCE (required of every client, public or confidential). Scopes are a ceiling on the credential, not a grant of access: a token also cannot exceed what the user who approved it may already do. A write scope does not imply its matching read — ask for both.

In: header

Scope: assets:read

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assets/download" \  -H "Content-Type: application/json" \  -d '{    "assetIds": [      "96fa1cd8-4f1c-475e-ac07-c52694e711b7"    ]  }'
[  {    "fileName": "file1.png",    "ownerAssetId": "65af4c7b22ac19c0b1648241",    "key": "/workspaces/ws-65af4c7b22ac19c0b1648226/projects/pr...",    "url": "https://s3.eu-west-1.amazonaws.com/files-test.nurama.io...",    "mimeType": "image/png",    "expires": 1705988395,    "status": "success"  }]