Get a video's direct MP4 link
const url = 'https://api.ebitex.io/assets/management/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/direct-mp4';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/assets/management/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/direct-mp4 \ --header 'Authorization: Bearer <token>'Returns whether a video can have a direct MP4 link and, for each rendition, where the link is. A rendition that Stream is still making an MP4 for is brought up to date first, so polling this call is how you wait for the link: its state is off, processing (with percentComplete when known), ready (with its url) or failed. eligible is false for anything that cannot have the link, with a reason: not_video, not_public or not_configured.
Key: an Assets management key (assets.management.read or assets.management.write).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”{ "eligible": true, "reason": null, "renditions": [{ "locale": "default", "state": "ready", "percentComplete": null, "url": "https://…/downloads/default.mp4" }] }
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
payment_required: the organization’s subscription needs attention.
scope_denied: the key is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.
not_found: there is no such asset in the organization.
too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.