DAM V2
Patch videos
Bulk-patches video metadata. Successful entities are returned in data; per-item failures in errors.
PATCH
/
api
/
v2
/
{team_slug}
/
{app_slug}
/
dam
/
videos
Patch videos
curl --request PATCH \
--url https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videos": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"public": true,
"translations": {
"title": [
{
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"locale": "<string>",
"value": "<string>"
}
]
}
}
]
}
'import requests
url = "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos"
payload = { "videos": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"public": True,
"translations": {
"title": [
{
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"locale": "<string>",
"value": "<string>"
}
]
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videos: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
description: '<string>',
public: true,
translations: {
title: [{locale: '<string>', value: '<string>'}],
description: [{locale: '<string>', value: '<string>'}]
}
}
]
})
};
fetch('https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos', 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.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos",
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([
'videos' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'description' => '<string>',
'public' => true,
'translations' => [
'title' => [
[
'locale' => '<string>',
'value' => '<string>'
]
],
'description' => [
[
'locale' => '<string>',
'value' => '<string>'
]
]
]
]
]
]),
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.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos"
payload := strings.NewReader("{\n \"videos\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"public\": true,\n \"translations\": {\n \"title\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"description\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n ]\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.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videos\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"public\": true,\n \"translations\": {\n \"title\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"description\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos")
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 \"videos\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"public\": true,\n \"translations\": {\n \"title\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"description\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"title": "<string>",
"status": "<string>",
"public": true,
"created_with_ai": true,
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"variants": [
{
"format": "<string>",
"width": 123,
"height": 123,
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z",
"translations": {
"title": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
]
},
"attributes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"filterable": true,
"translatable": true,
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"values": {},
"translations": {
"name": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "2023-11-07T05:31:56Z"
}
],
"used_by": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"priority": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"errors": [
{
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>"
}
]
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}Authorizations
Management API token, sent as Authorization: Bearer <token>.
Body
application/json
Required array length:
1 - 20 elementsShow child attributes
Show child attributes
⌘I
Patch videos
curl --request PATCH \
--url https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videos": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"public": true,
"translations": {
"title": [
{
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"locale": "<string>",
"value": "<string>"
}
]
}
}
]
}
'import requests
url = "https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos"
payload = { "videos": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"public": True,
"translations": {
"title": [
{
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"locale": "<string>",
"value": "<string>"
}
]
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videos: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
description: '<string>',
public: true,
translations: {
title: [{locale: '<string>', value: '<string>'}],
description: [{locale: '<string>', value: '<string>'}]
}
}
]
})
};
fetch('https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos', 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.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos",
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([
'videos' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'description' => '<string>',
'public' => true,
'translations' => [
'title' => [
[
'locale' => '<string>',
'value' => '<string>'
]
],
'description' => [
[
'locale' => '<string>',
'value' => '<string>'
]
]
]
]
]
]),
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.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos"
payload := strings.NewReader("{\n \"videos\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"public\": true,\n \"translations\": {\n \"title\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"description\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n ]\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.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videos\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"public\": true,\n \"translations\": {\n \"title\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"description\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v2/{team_slug}/{app_slug}/dam/videos")
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 \"videos\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"public\": true,\n \"translations\": {\n \"title\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"description\": [\n {\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"title": "<string>",
"status": "<string>",
"public": true,
"created_with_ai": true,
"folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"variants": [
{
"format": "<string>",
"width": 123,
"height": 123,
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z",
"translations": {
"title": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
]
},
"attributes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"filterable": true,
"translatable": true,
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"values": {},
"translations": {
"name": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
],
"description": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "2023-11-07T05:31:56Z"
}
],
"used_by": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"priority": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
],
"errors": [
{
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>"
}
]
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"details": [
"<string>"
]
}
}