SDK
import { createVoyantCloudClient } from "@voyant-travel/cloud-sdk";
const cloud = createVoyantCloudClient({ apiKey: process.env.VOYANT_API_KEY });
const video = await cloud.video.videos.update("<videoId>", {
"name": "<string>",
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
});curl --request PATCH \
--url https://api.voyant.travel/video/v1/videos/<videoId> \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
}'const response = await fetch("https://api.voyant.travel/video/v1/videos/<videoId>", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"name": "<string>",
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://api.voyant.travel/video/v1/videos/<videoId>",
headers={
"Authorization": "Bearer <token>"
},
json={
"name": "<string>",
"requireSignedUrls": True,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/video/v1/videos/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'requireSignedUrls' => true,
'allowedOrigins' => [
'<string>'
],
'tags' => [
'<string>'
],
'thumbnailTimestampPct' => 0.5,
'meta' => [
]
]),
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.voyant.travel/video/v1/videos/{videoId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"requireSignedUrls\": true,\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"thumbnailTimestampPct\": 0.5,\n \"meta\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.voyant.travel/video/v1/videos/{videoId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"requireSignedUrls\": true,\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"thumbnailTimestampPct\": 0.5,\n \"meta\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/video/v1/videos/{videoId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"requireSignedUrls\": true,\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"thumbnailTimestampPct\": 0.5,\n \"meta\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"organizationId": "<string>",
"status": "pending_upload",
"readyToStream": true,
"thumbnailTimestampPct": 123,
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"downloadStatus": "disabled",
"meta": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"providerVideoUid": "<string>",
"name": "<string>",
"durationSeconds": 123,
"sizeBytes": 123,
"inputWidth": 123,
"inputHeight": 123,
"thumbnailUrl": "<string>",
"playbackHlsUrl": "<string>",
"playbackDashUrl": "<string>",
"maxDurationSeconds": 123,
"maxSizeBytes": 123,
"watermarkProfileId": "<string>",
"downloadReadyAt": "2023-11-07T05:31:56Z",
"errorCode": "<string>",
"errorMessage": "<string>",
"uploadedAt": "2023-11-07T05:31:56Z",
"readyAt": "2023-11-07T05:31:56Z",
"lastEventAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"retryAfterMs": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Video
Update a video
Updates mutable video fields. At least one field is required. Requires scope: video:upload
PATCH
/
video
/
v1
/
videos
/
{videoId}
SDK
import { createVoyantCloudClient } from "@voyant-travel/cloud-sdk";
const cloud = createVoyantCloudClient({ apiKey: process.env.VOYANT_API_KEY });
const video = await cloud.video.videos.update("<videoId>", {
"name": "<string>",
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
});curl --request PATCH \
--url https://api.voyant.travel/video/v1/videos/<videoId> \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
}'const response = await fetch("https://api.voyant.travel/video/v1/videos/<videoId>", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"name": "<string>",
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://api.voyant.travel/video/v1/videos/<videoId>",
headers={
"Authorization": "Bearer <token>"
},
json={
"name": "<string>",
"requireSignedUrls": True,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"thumbnailTimestampPct": 123,
"meta": {}
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/video/v1/videos/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'requireSignedUrls' => true,
'allowedOrigins' => [
'<string>'
],
'tags' => [
'<string>'
],
'thumbnailTimestampPct' => 0.5,
'meta' => [
]
]),
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.voyant.travel/video/v1/videos/{videoId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"requireSignedUrls\": true,\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"thumbnailTimestampPct\": 0.5,\n \"meta\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.voyant.travel/video/v1/videos/{videoId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"requireSignedUrls\": true,\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"thumbnailTimestampPct\": 0.5,\n \"meta\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/video/v1/videos/{videoId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"requireSignedUrls\": true,\n \"allowedOrigins\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"thumbnailTimestampPct\": 0.5,\n \"meta\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"organizationId": "<string>",
"status": "pending_upload",
"readyToStream": true,
"thumbnailTimestampPct": 123,
"requireSignedUrls": true,
"allowedOrigins": [
"<string>"
],
"tags": [
"<string>"
],
"downloadStatus": "disabled",
"meta": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"providerVideoUid": "<string>",
"name": "<string>",
"durationSeconds": 123,
"sizeBytes": 123,
"inputWidth": 123,
"inputHeight": 123,
"thumbnailUrl": "<string>",
"playbackHlsUrl": "<string>",
"playbackDashUrl": "<string>",
"maxDurationSeconds": 123,
"maxSizeBytes": 123,
"watermarkProfileId": "<string>",
"downloadReadyAt": "2023-11-07T05:31:56Z",
"errorCode": "<string>",
"errorMessage": "<string>",
"uploadedAt": "2023-11-07T05:31:56Z",
"readyAt": "2023-11-07T05:31:56Z",
"lastEventAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"retryAfterMs": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Voyant Cloud API token, passed as Authorization: Bearer <token>. Each token carries a fixed set of scopes; an operation rejects tokens missing its required scope.
Path Parameters
Body
application/json
At least one field is required.
Response
Updated video
Show child attributes
Show child attributes
⌘I