Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

To start the upload process, you need to first create a video entity. Creating the entity will allow you to collect the video ID, which you will need to finish uploading your video.


Create a new video entity

Create the new video entity with the following request:

Request

Code Block
languagetext
themeConfluence
curl -v -X POST -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json" -d "{ 'title': '<VIDEO_TITLE>', 'description': '<DESCRIPTION_OF_VIDEO>', 'keywords': ['<FOO>', '<BAR>'], 'group': <ID_OF_OWNER_GROUP>, 'channel': <ID_OF_CHANNEL>, 'fileName': '<FILENAME>', 'autoPublish': true }" https://api.video-cdn.net/v1/vms/<VIDEOMANAGER_ID>/videos/
Note

The use of verbose mode ("-v") in the above request is optional if you already have a way to collect the video ID from the response header. If using a command line tool, it may be necessary to enable verbose mode to allow you to see the response headers.

Parameters

Data TypeDescription
VIDEOMANAGER_IDIntegermandatory: ID of the VideoManager, to which you intend to upload the video.
Headers

ACCESS_TOKENStringmandatory: Access token (see "Authentication" for more information).
JSON Body

titleStringoptional: Title of the video
descriptionStringoptional: Description of the video
keywordsList of Stringsoptional: Keywords of the video
groupIntegeroptional: ID of the owner group
channelIntegeroptional: ID of the channel
fileNameStringmandatory: Filename of the video (see suffix note below)
autoPublishBooleanoptional: If true, the video will automatically be published after upload is complete and the 360p mp4 has been transcoded.

Suffix of the fileName

The suffix of the filename is used to determine the mime type. The following table lists all supported suffixes.

Expand
titleFile Name Suffix
SuffixMime Type
mp4video/ mp4
mov

video/quicktime

flv

video/x-flv

wmv

video/x-ms-wmv

mpg

video/mpeg

avi

video/x-msvideo

mp3

audio/mpeg

mpeg

video/mpeg

m4v

video/x-m4v

vob

video/mpeg

f4v

video/x-flv

wav

audio/vnd.wave

3gp

video/3gpp

rm

audio/x-pn-realaudio

mts

video/mpeg

m2v

video/mpeg

wma

audio/x-ms-wma

mxf

application/mxf

m2p

video/mpeg

m2t

video/mpeg

mkv

video/x-matroska

webm

video/webm

qt

video/quicktime

mp2

audio/mpeg

m2ts

video/mpeg

ogvvideo/ogg


Response

Status
colourGreen
title201 CREATED
The location data of the response header will return a URL containing the newly created video ID. You will need this video ID for the next step.

Code Block
languagetext
themeConfluence
locationLocation: https://vmproapi.movingimagevideo-cdn.comnet/vamv1/rest/vms/<VIDEOMANAGER_ID>/videos/<VIDEO_ID>/source/<REPLACEMENT_VIDEO_ID>
ParameterData TypeDescription
VIDEOMANAGER_IDIntegerID of the VideoManager, in which you intend to upload the video.
VIDEO_IDString
Video ID of video entity to be replaced
REPLACEMENT_VIDEO_ID
StringVideo ID of the new replacement video
Newly created video ID for the new video entity.