Download your videos
Get video download URL
Returns information on the downloadable version of the video.
GET https://api.video.ibm.com/videos/{video_id}/downloadable/{video_format}.json
The {video_format}
can be mp4 or flv.
Parameters
This request has no parameters.
Success response
Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a downloadable
key.
KEY | TYPE | DESCRIPTION |
---|---|---|
status | string | State of the downloadable video. Possible values: available if the video is ready to download; unavailable if the downloadable version is not (yet) available; pending if the process of generation downloadable version is in progress |
download_url | string | The video download URL. (Value is null if the downloadable version is not available.) |
expires_at | number | Date and time when the downloadable version will expire (Unix timestamp) |
Example of a success response:
{"downloadable": {"status": "available","download_url": "https://download.domain/example_download_path?download_parameters","expires_at": 1471363639}}
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired, or malformed | |
404 Not Found | not_found | Video was not found |
429 Too Many Requests | too_many_requests | Rate limit exceeded (Read more) |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Requesting a downloadable version of a video
The downloadable version of a video is not always available, and you have to request us to generate a temporary video file for download. The workflow is the following:
- Use this call to request a downloadable file.
- Poll the same API resource for status updates.
- Use the value of the
download_url
property as soon as it is available.
You have 365 days to download the video file after it becomes available. Please refer to the property expires_at
for the proper timing.
POST https://api.video.ibm.com/videos/{video_id}/downloadable/{video_format}.json
The {video_format}
can be mp4 or flv.
If everything works as expected, you’ll instantly get the same response format as the GET version provides, but the property status
will be pending
or available
.
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired, or malformed | |
404 Not Found | not_found | Video was not found |
429 Too Many Requests | too_many_requests | Rate limit exceeded (Read more) |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |