Videos
Confirm a video upload
POST
/
v1
/
videos
/
{id}
/
upload
/
completion
Confirm a video upload
curl --request POST \
--url https://api.vturb.com/v1/videos/{id}/upload/completion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parts": [
{
"part_number": 1,
"etag": "etag-1"
},
{
"part_number": 2,
"etag": "etag-2"
}
]
}
'import requests
url = "https://api.vturb.com/v1/videos/{id}/upload/completion"
payload = { "parts": [
{
"part_number": 1,
"etag": "etag-1"
},
{
"part_number": 2,
"etag": "etag-2"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({parts: [{part_number: 1, etag: 'etag-1'}, {part_number: 2, etag: 'etag-2'}]})
};
fetch('https://api.vturb.com/v1/videos/{id}/upload/completion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vturb.com/v1/videos/{id}/upload/completion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parts' => [
[
'part_number' => 1,
'etag' => 'etag-1'
],
[
'part_number' => 2,
'etag' => 'etag-2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vturb.com/v1/videos/{id}/upload/completion"
payload := strings.NewReader("{\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"etag-1\"\n },\n {\n \"part_number\": 2,\n \"etag\": \"etag-2\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vturb.com/v1/videos/{id}/upload/completion")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"etag-1\"\n },\n {\n \"part_number\": 2,\n \"etag\": \"etag-2\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/videos/{id}/upload/completion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"etag-1\"\n },\n {\n \"part_number\": 2,\n \"etag\": \"etag-2\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "652f2b1e8f1b2c3d4e5f6a7b",
"status": "processing"
}{
"type": "https://docs.vturb.com/errors/unauthorized",
"code": "unauthorized",
"message": "Missing or invalid API credential. Send a vt_ token in the Authorization header.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/forbidden",
"code": "forbidden",
"message": "The credential is missing the scope this action requires.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/not_found",
"code": "not_found",
"message": "Resource not found.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/upload_incomplete",
"code": "upload_incomplete",
"message": "The upload has not been received. Upload every part before confirming.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/service_unavailable",
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Retry shortly.",
"request_id": "00000000-0000-0000-0000-000000000000"
}Authorizations
Paste your VTurb API token (vt_...). Sent as Authorization: Bearer <token>.
Path Parameters
Body
application/json
One entry per uploaded part, with the ETag S3 returned for that part's PUT.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Confirm a video upload
curl --request POST \
--url https://api.vturb.com/v1/videos/{id}/upload/completion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parts": [
{
"part_number": 1,
"etag": "etag-1"
},
{
"part_number": 2,
"etag": "etag-2"
}
]
}
'import requests
url = "https://api.vturb.com/v1/videos/{id}/upload/completion"
payload = { "parts": [
{
"part_number": 1,
"etag": "etag-1"
},
{
"part_number": 2,
"etag": "etag-2"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({parts: [{part_number: 1, etag: 'etag-1'}, {part_number: 2, etag: 'etag-2'}]})
};
fetch('https://api.vturb.com/v1/videos/{id}/upload/completion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vturb.com/v1/videos/{id}/upload/completion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parts' => [
[
'part_number' => 1,
'etag' => 'etag-1'
],
[
'part_number' => 2,
'etag' => 'etag-2'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vturb.com/v1/videos/{id}/upload/completion"
payload := strings.NewReader("{\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"etag-1\"\n },\n {\n \"part_number\": 2,\n \"etag\": \"etag-2\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vturb.com/v1/videos/{id}/upload/completion")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"etag-1\"\n },\n {\n \"part_number\": 2,\n \"etag\": \"etag-2\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/videos/{id}/upload/completion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"etag-1\"\n },\n {\n \"part_number\": 2,\n \"etag\": \"etag-2\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "652f2b1e8f1b2c3d4e5f6a7b",
"status": "processing"
}{
"type": "https://docs.vturb.com/errors/unauthorized",
"code": "unauthorized",
"message": "Missing or invalid API credential. Send a vt_ token in the Authorization header.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/forbidden",
"code": "forbidden",
"message": "The credential is missing the scope this action requires.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/not_found",
"code": "not_found",
"message": "Resource not found.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/upload_incomplete",
"code": "upload_incomplete",
"message": "The upload has not been received. Upload every part before confirming.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/service_unavailable",
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Retry shortly.",
"request_id": "00000000-0000-0000-0000-000000000000"
}