Register an asset and get a presigned upload URL
POST /api/uploads. Register an asset and get a presigned upload URL. Headless LMS Assets API reference.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/uploads" \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "contentType": "string", "kind": "video" }'{ "asset": { "orgId": "string", "id": "string", "key": "string", "kind": "video", "filename": "string", "contentType": "string", "size": 0, "status": "pending", "uploadedBy": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "uploadUrl": "string", "method": "PUT", "expiresInSeconds": 1, "headers": { "property1": "string", "property2": "string" }}{ "error": "string", "message": "string", "requestId": "string"}{ "error": "string", "message": "string", "requestId": "string"}Get a short-lived presigned URL to serve an asset to the student POST
POST /api/learn/assets/{id}/url. Get a short-lived presigned URL to serve an asset to the student. Headless LMS Assets API reference.
Confirm an upload completed (captures size + content type) POST
POST /api/assets/{id}/confirm. Confirm an upload completed (captures size + content type). Headless LMS Assets API reference.