Téléversements
POST/v1/uploads
Créer une vidéo et sa session d’envoi (envoi unique ou en plusieurs parties)
Permission uploads:writeIdempotency-Key accepté
Corps de la requête
| Champ | Type | Détails |
|---|---|---|
| titleobligatoire | string | 1 à 200 caractères |
| description | string | 5000 caractères au plus |
| contentTypeobligatoire | "video/mp4" | "video/quicktime" | "video/webm" | — |
| sizeobligatoire | integer | > 0 · ≤ 50 Gio |
| externalRef | string | 1 à 200 caractères |
| method | "single" | "multipart" | — |
Réponse 201 · Vidéo et envoi
curl -X POST https://api.vidoum.com/v1/uploads \
-H "Authorization: Bearer $VIDOUM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"title": "Séance 3 — La cellule",
"description": "Chapitre 2, partie 1",
"contentType": "video/mp4",
"size": 734003200,
"externalRef": "lesson:42",
"method": "single"
}'GET/v1/uploads/{id}
État d’un envoi ; parties reçues pour reprendre un envoi en plusieurs parties
Permission uploads:write
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Réponse 200 · Envoi
| Champ | Type | Détails |
|---|---|---|
| uploadobligatoire | Upload | — |
curl https://api.vidoum.com/v1/uploads/ID \
-H "Authorization: Bearer $VIDOUM_API_KEY"POST/v1/uploads/{id}/complete
Vérifier le fichier et placer la vidéo dans la file d’encodage
Permission uploads:writeIdempotency-Key accepté
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Corps de la requête
| Champ | Type | Détails |
|---|---|---|
| parts | object[] | 1 élément(s) au moins · 10000 éléments au plus |
| parts[].partNumberobligatoire | integer | ≥ 1 · ≤ 10 000 |
| parts[].etagobligatoire | string | 1 à 200 caractères |
Réponse 200 · Vidéo en file d’encodage
| Champ | Type | Détails |
|---|---|---|
| videoobligatoire | Video | — |
curl -X POST https://api.vidoum.com/v1/uploads/ID/complete \
-H "Authorization: Bearer $VIDOUM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"parts": [
{
"partNumber": 1,
"etag": "\"3858f62230ac3c91\""
}
]
}'POST/v1/uploads/{id}/parts
URL signées pour 100 parties au plus d’un envoi en plusieurs parties
Permission uploads:write
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Corps de la requête
| Champ | Type | Détails |
|---|---|---|
| partNumbersobligatoire | integer[] | 1 élément(s) au moins · 100 éléments au plus |
Réponse 200 · URL des parties
| Champ | Type | Détails |
|---|---|---|
| partsobligatoire | object[] | — |
| parts[].partNumberobligatoire | integer | — |
| parts[].urlobligatoire | string | — |
| expiresInobligatoire | integer | — |
curl -X POST https://api.vidoum.com/v1/uploads/ID/parts \
-H "Authorization: Bearer $VIDOUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"partNumbers": [
1,
2,
3
]
}'POST/v1/uploads/{id}/cancel
Annuler un envoi ou une vidéo en attente d’encodage (idempotent)
Permission uploads:write
Paramètres de chemin
| Champ | Type | Détails |
|---|---|---|
| idobligatoire | string (uuid) | — |
Réponse 200 · Vidéo annulée
| Champ | Type | Détails |
|---|---|---|
| videoobligatoire | Video | — |
curl -X POST https://api.vidoum.com/v1/uploads/ID/cancel \
-H "Authorization: Bearer $VIDOUM_API_KEY"