Pular para o conteúdo

Update video metadata

PATCH
/videos/{id}
curl --request PATCH \
--url https://api.devstreamcore.com/v1/videos/vid_a1b2c3d4e5f6a1b2c3d4 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "example", "description": "example", "passthrough": "example", "tags": [ "example" ] }'
id
required
string
Example
vid_a1b2c3d4e5f6a1b2c3d4
Media type application/json
object
title
string
>= 1 characters <= 255 characters
description
string
<= 4096 characters
passthrough
string
<= 2048 characters
tags
Array<string>
<= 20 items
Example generated
{
"title": "example",
"description": "example",
"passthrough": "example",
"tags": [
"example"
]
}

The updated video

Media type application/json

A video asset. The shape is stable — fields are only ever added.

object
id
required
string
title
required
string
description
required
string | null
thumbnail_url
required
string | null
status
required
string
Allowed values: preparing ready errored reprocessing
progress
required

0–100, aggregated across encode + package jobs

number
transcode_attempts
required
number | null
duration
required

Seconds

number | null
file_size_bytes
required
number | null
video_codec
required
string | null
fps
required
number | null
source_url
required

Public URL of the original upload; null until landed in R2

string | null
source_width
required

Native width of the original upload (px); null when unknown

number | null
source_height
required

Native height of the original upload (px); null when unknown

number | null
creator_username
required
string | null
playback
required
object
hls
required
string | null
dash
required
string | null
mp4
required
Array<object>
object
height
required
number
url
required
string
bitrate_kbps
required

Encode target bitrate in kb/s; null on legacy rows

number | null
hls
required

Per-resolution HLS variant playlist URL; null when ungated

string | null
playback_ids
required
Array<object>
object
id
required
string
policy
required
string
Allowed values: public signed
created_at
required
string
policy
required
string
Allowed values: public signed
passthrough
required
string | null
ingest
required
object
kind
required
string
Allowed values: direct_upload url console
errors
required
Array<object>
object
type
required
string
messages
required
Array<string>
view_count
required
number
tags
required
Array<string>
created_at
required
string
updated_at
required
string
Example
{
"id": "vid_a1b2c3d4e5f6a1b2c3d4",
"status": "preparing",
"playback_ids": [
{
"id": "play_a1b2c3d4e5f6a1b2c3d4",
"policy": "public"
}
],
"policy": "public",
"ingest": {
"kind": "direct_upload"
}
}

Invalid request

Media type application/json

Error envelope — a single error per response.

object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found rate_limit_error quota_exceeded api_error
code
string
message
required
string
param
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error"
}
}

Missing or invalid API key

Media type application/json

Error envelope — a single error per response.

object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found rate_limit_error quota_exceeded api_error
code
string
message
required
string
param
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error"
}
}

Resource not found

Media type application/json

Error envelope — a single error per response.

object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found rate_limit_error quota_exceeded api_error
code
string
message
required
string
param
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error"
}
}