headless lms

Add a library file to a download

POST /api/downloads/{downloadId}/assets. Add a library file to a download. Headless LMS Content API reference.

POST
/api/downloads/{downloadId}/assets

Requires downloads:write. Added last. 409 when the file is not a ready library file or is already in the download. A file not uploaded for the download needs media:read (403 otherwise). Returns the download's files.

Path Parameters

downloadId*string

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

application/json

application/json

curl -X POST "https://example.com/api/downloads/string/assets" \  -H "Content-Type: application/json" \  -d '{    "assetId": "string"  }'
[  {    "orgId": "string",    "id": "string",    "downloadId": "string",    "assetId": "string",    "seq": -9007199254740991,    "displayName": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "filename": "string",    "contentType": "string",    "size": 0,    "url": "string"  }]
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}