Référence de l’API

Vidéos

GET/v1/videos

Lister les vidéos, des plus récentes aux plus anciennes (pagination par curseur)

Permission videos:read

Paramètres de requête

ChampTypeDétails
limitobligatoireinteger≥ 1 · ≤ 200 · par défaut 50
externalRefstring1 à 200 caractères
status"pending_upload" | "uploaded" | "queued" | "processing" | "ready" | "failed" | "cancelled" | "deleting"—
cursorstring200 caractères au plus · format ^[A-Za-z0-9_-]+$

Réponse 200 · Page de vidéos

ChampTypeDétails
videosobligatoireVideo[]—
nextCursorobligatoirestring | null—
Exemple
curl https://api.vidoum.com/v1/videos \
  -H "Authorization: Bearer $VIDOUM_API_KEY"

GET/v1/videos/{id}

Une vidéo, avec ses qualités et ses sous-titres

Permission videos:read

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 200 · Vidéo

ChampTypeDétails
videoobligatoireVideo—
Exemple
curl https://api.vidoum.com/v1/videos/ID \
  -H "Authorization: Bearer $VIDOUM_API_KEY"

PATCH/v1/videos/{id}

Modifier le titre, la description ou la référence externe

Permission videos:write

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Corps de la requête

ChampTypeDétails
titlestring1 à 200 caractères
descriptionstring | null5000 caractères au plus
externalRefstring | null1 à 200 caractères

Réponse 200 · Vidéo

ChampTypeDétails
videoobligatoireVideo—
Exemple
curl -X PATCH https://api.vidoum.com/v1/videos/ID \
  -H "Authorization: Bearer $VIDOUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Séance 3 — La cellule",
    "description": "Chapitre 2, partie 1",
    "externalRef": "lesson:42"
  }'

DELETE/v1/videos/{id}

Supprimer une vidéo et ses fichiers (les copies en cache sont bloquées d’abord)

Permission videos:write

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 204 · Supprimé

Exemple
curl -X DELETE https://api.vidoum.com/v1/videos/ID \
  -H "Authorization: Bearer $VIDOUM_API_KEY"

POST/v1/videos/{id}/retry

Relancer l’encodage d’une vidéo en échec

Permission videos:writeIdempotency-Key accepté

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 200 · Vidéo en file d’encodage

ChampTypeDétails
videoobligatoireVideo—
Exemple
curl -X POST https://api.vidoum.com/v1/videos/ID/retry \
  -H "Authorization: Bearer $VIDOUM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

POST/v1/videos/{id}/complete

Alias de compatibilité de POST /v1/uploads/{id}/complete pour l’envoi en cours de la vidéo

Permission uploads:writeIdempotency-Key accepté

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Corps de la requête

ChampTypeDétails
partsobject[]1 élément(s) au moins · 10000 éléments au plus
parts[].partNumberobligatoireinteger≥ 1 · ≤ 10 000
parts[].etagobligatoirestring1 à 200 caractères

Réponse 200 · Vidéo en file d’encodage

ChampTypeDétails
videoobligatoireVideo—
Exemple
curl -X POST https://api.vidoum.com/v1/videos/ID/complete \
  -H "Authorization: Bearer $VIDOUM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "parts": [
      {
        "partNumber": 1,
        "etag": "\"3858f62230ac3c91\""
      }
    ]
  }'

GET/v1/videos/{id}/thumbnail

Redirection (302) vers une URL de la miniature valable 10 minutes ; 404 si la lecture est désactivée

Permission videos:read

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Réponse 302 · Redirection vers l’image de la miniature

Exemple
curl https://api.vidoum.com/v1/videos/ID/thumbnail \
  -H "Authorization: Bearer $VIDOUM_API_KEY"

POST/v1/videos/{id}/captions

URL d’envoi signée pour un fichier de sous-titres WebVTT (vidéos prêtes)

Permission videos:write

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—

Corps de la requête

ChampTypeDétails
languageobligatoirestringformat ^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$
sizeobligatoireinteger> 0 · ≤ 1 048 576

Réponse 201 · Envoi de sous-titres

ChampTypeDétails
captionobligatoireobject—
caption.languageobligatoirestring—
caption.urlobligatoirestring—
caption.headersobligatoireobject—
caption.expiresInobligatoireinteger—
Exemple
curl -X POST https://api.vidoum.com/v1/videos/ID/captions \
  -H "Authorization: Bearer $VIDOUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "fr",
    "size": 734003200
  }'

DELETE/v1/videos/{id}/captions/{language}

Supprimer un fichier de sous-titres

Permission videos:write

Paramètres de chemin

ChampTypeDétails
idobligatoirestring (uuid)—
languageobligatoirestringformat ^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$

Réponse 204 · Supprimé

Exemple
curl -X DELETE https://api.vidoum.com/v1/videos/ID/captions/fr \
  -H "Authorization: Bearer $VIDOUM_API_KEY"