To log in you will need those ids:
curl --request POST 'https://www.ultimedia.com/api/video/auth' \
--header 'Content-Type: application/json' \
--data-raw '{
"login":"xxxxx",
"pwd":"xxxxx",
"key":"xxxxx"
}'
{
“token” : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
Note : The token is only valid for one action. It won't be valid for the next calls so you'll need a new token at each API call.
URL : POST https://www.ultimedia.com/api/video/upload
curl --request POST 'https://www.ultimedia.com/api/video/upload' \
--header 'Authorization: Bearer <VALEUR DE TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title":"title of the video",
"description":"description of the video",
"authors":["author1", "author2"],
"tags":["tag1","tag2"],
"category":"news",
“ad”: “no”
"countries_allowed":["fr"],
"language":"fr",
"video":"URL of the MP4 video",
"picture":"URL of the image",
"catalog":"id of the catalogue"
}'
Warning :
To upload an HLS video, instead of the variable URL you will need to use the hls variable :
“hls”: “xxxxxxxx.m3u8”
{
"success": true,
"id": "21_qs3qqx3"
}
Note :
The ID is presented in two parts : One part is the content type and the second is the ID of the video.
{
"success": false,
"error": "error message"
}
If you want to retrieve the embed code after you added the video, you'll need to fill in the mdtk and zone values and then you'll get a similar response :
{
"success": true,
"id": "21_qs3qq53",
"embed": "<iframe src=\"https://www.ultimedia.com/deliver/generic/js/mdtk/01964170/src/qs3qq53/zone/1/\" frameborder=\"0\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" hspace=\"0\" vspace=\"0\" width=\"100%\" height=\"100%\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" allowfullscreen=\"true\" allow=\"autoplay\" referrerpolicy=\"no-referrer-when-downgrade\"></iframe>",
"iframe_url": "https://www.ultimedia.com/deliver/generic/iframe/mdtk/01964170/zone/1/src/qs3qq53",
"image_original": "https://medialb.ultimedia.com/multi/38zpq/qs3qq53-O.jpg"
}
URL : PUT https://www.ultimedia.com/api/video/upload/id
curl --request POST 'https://www.ultimedia.com/api/video/upload/id/qs3qqx3' \
--header 'Authorization: Bearer <TOKEN VALUE>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title":"Video Title",
"description":"Video description",
"authors":["author1", "author2"],
"tags":["tag1","tag2"],
"category":"news",
“ad”: “no”
"countries_allowed":["fr"],
"language":"fr",
"video":"MP4 File URL",
"picture":"Image URL",
"catalog":"Catalogue ID"
}'
{
"success": true
}
curl --request DELETE 'https://www.ultimedia.com/api/video/upload/id/qs3qqx3' \
--header 'Authorization: Bearer <TOKEN VALUE>' \
{
"success": true
}