Appearance
GET /files/downloads
Description
Download file from internal store. This endpoint allows querying absolute, downloadable URLs of files created by a successfully finished conversion job or uploaded earlier via a call to /files/uploads.
Authentication
- Required: Yes
- Method: Bearer token or HMAC
Request Headers
- Authorization:
Bearer [AUTH_TOKEN](Optional) - Accept:
application/json(for JSON responses)application/xml(for XML responses)
Parameters
Query Parameters
- format:
string(Optional)
Values:json,xml
Overrides the Request Accept header. - human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. - object_key:
string(Optional)
Object key (relative path) of the file on the store (e.g.: output_upload_directive). - pipeline_id:
string(Optional)
The ID of the pipeline relative to which the given object key applies. - file_id:
string(Optional)
ID specifying a file/archive in the Files resource. - autograph_tag:
string(Optional)
A unique tag to be embedded dynamically with the download for traceability via Xvid AutoGraph watermarking technology. - redirect:
boolean(Optional)
Values:true,false
If set to true, responds with a HTTP 302 redirect instead of the URL coded as JSON. - expiry_time:
int(Optional)
Desired expiry time (as seconds since epoch) to attach to the returned/redirected download link. - anti_fraud:
boolean(Optional)
Enable a set of features to prevent link sharing, block users behind anonymizing proxies, and block black-listed IPs of well-known pirates from downloading the file. - max_parallel_downloads:
int(Optional)
Maximal allowed (other) downloads in parallel. If the user attempts to start more downloads in parallel than the specified limit, download is denied and an error returned. - streaming:
boolean(Optional)
Values:true,false
If set to true, streams the video in a new browser tab once the link is clicked instead of triggering a file download. Default is false. - ip:
int(Optional)
Allow only clients with the specified IP address to use the link and download the file. The IP must be specified as a 32-bit integer (example: 192.168.2.1 -> (192 << 24) | (168 << 16) | (2 << 8) | 1 = 3232236033).
Example Request
bash
curl -X GET -H "Authorization: Bearer AUTH_TOKEN" "https://api.xvid.com/v1/files/downloads/?file_id=54820cec18bac397e161aebc"Example Response
Success (200 OK)
json
{
"url": "https://cdn-na-east-1.xvid.com/53a1ac4914eaa8ffa4fce91b/test1.mp4?Expires=1403261471&AWSAccessKeyId=AKIAINU6WW5PT7GRJLVA&Signature=QfXTpvTzwB81EQNPttgLlUiX2JQ%3D"
}Error Responses
400 Bad Request
json
{
"error": {
"error_code": "0x0230001",
"error_message": "Invalid Input"
}
}403 Forbidden
json
{
"error": {
"error_code": "0x0000003",
"error_message": "Invalid access token"
}
}404 Not Found
json
{
"error": {
"error_code": "0x0230002",
"error_message": "Requested file does not exist"
}
}500 Internal Server Error
json
{
"error": {
"error_code": "0x0000001",
"error_message": "Internal Error"
}
}