Appearance
PUT /files/uploads/ID
Description
Finish a specific upload specified by ID
Authentication
- Required: Yes
- Method: Bearer token
Request Headers
- Authorization:
Bearer [AUTH_TOKEN] - Accept:
application/json(for JSON responses)application/xml(for XML responses)
Parameters
Query Parameters
format:
string(Optional)
Values:json,xml
This will override the Request Accept header.human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. Useful when calling the API through curl or a browser.show_null:
boolean(Optional)
Values:true,false
If set to "true", the response will contain also keys that are not set to a value.
Body Parameters
- nb_chunks:
integer(Required)
Must be specified to indicate the total number of chunk files that were uploaded and to signal that the uploading process is now complete (so no further chunks will be uploaded anymore).
Example Request
bash
curl -X PUT -H "Authorization: Bearer AUTH_TOKEN" -H "application/json" -d '{ \
"upload": { \
"nb_chunks": 1, \
} \
}' "https://api.xvid.com/v1/files/uploads/5475f75ce4b084a392305dcb?human=true&show_null=true"Example Response
Success (200 OK)
json
{
"upload": {
"form_post_url": "https://s3-eu-west-1.amazonaws.com/prd-xmc-xvid-s3-eu-west-1/",
"status": "COMPLETING",
"nb_chunks": 1,
"storage_type": "S3",
"object_key": "uploads/test.mp4",
"pipeline": { "id": "547f3eede4b025bcbff38657" },
"file": { "id": "598358fe6baa605b1e33754e" },
"id": "598358fe6baa605b1e33754e"
}
}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"
}
}