library. assets
The files of a media: video, audio, image and WebVTT subtitle files. Each asset lists the storage locations holding its file.
To add a file:
POST /api/v1/library/media/{id}/assetswith the file name, MIME type and size. The response carries anassetIdand a signeduploadtarget.PUTthe file bytes toupload.urlwith the returnedupload.headers.POST /api/v1/library/assets/{id}/confirm. A confirmed video is queued for video analysis.
GET /api/v1/library/assets/{id}/download signs a short-lived read URL for the file.
List the files of a media
Every asset of the media (video, audio, image, subtitle files) with the storage locations holding each file.
Upload a file to a media (returns a signed upload URL)
Creates an UPLOADING asset on the media and a signed upload target on the storage configured for its type. PUT the raw file bytes, not multipart form data, to upload.url with every upload.headers entry before upload.expiresOn, then call POST /api/v1/library/assets/{id}/confirm.
Retrieve an asset and its storage locations
Retrieve an asset and its storage locations
Confirm an uploaded asset
Verifies that the file reached the signed upload target and changes the asset from UPLOADING to ONLINE. A confirmed video is queued for video analysis (shots, scenes, technical data), as when it is uploaded in the library. Confirming again is harmless.
Get a short-lived signed URL for the file
Signs a read URL for the asset, the same way the library streams video and shows images. The URL expires; request a fresh one per use rather than storing it.