API 参考
Units
Content Delivery API: POST /units/{id}/open
Parameters
idstring · pathrequired
Request body
mode"read" | "download"
Response 200
mode"read" | "download"requiredurlstringrequiredSigned URL of the original file (download, or playback when there is no streaming version).
expiresInintegerrequiredSeconds. Videos: 1.5 × duration + 10 minutes, between 15 minutes and 4 hours; other files: 600.
titlestring | nullrequiredfileNamestringrequiredmimeTypestring | nullrequiredallowDownloadbooleanrequiredrenditionsobject[]Playback sources: original, plus hls (adaptive-streaming master manifest on a signed path, play this one when present), thumbnails (progress-bar storyboard VTT) and poster for transcoded videos. Same validity as expiresIn.
renditions[].kind"original" | "mp4" | "hls" | "poster" | "thumbnails"requiredrenditions[].urlstringrequiredrenditions[].mimeTypestringrequiredrenditions[].widthintegerrenditions[].heightintegerrenditions[].bytesintegerposterstring | nullthumbnailsstring | nullstreaming"none" | "partial" | "ready"partial: only the lowest quality is in the manifest yet; ready: all qualities.
Errors
UNIT_NOT_FOUND404NOT_PREVIEW403
curl -X POST "https://{site}/api/v1/units/{id}/open" \
-H "Content-Type: application/json" \
-d '{}'