Description
To replace a video entity, you will need to first create a new video source.
Once you have created a new video source, you can retrieve the video ID, which is required for uploading the replacement video.
A sample cURL call is shown below.
Request
curl --location 'https://api.video-cdn.net/v1/vms/<VideoManager_ID>/videos/<VIDEO_ID>/source' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer Token' \ --data '{ "uploadFilename": "fileName.mp4", "file": { "fileName": "fileName.mp4", "size": 7378888 } }'
Alternatively, you can use the following URL:
https://api.video-cdn.net/v1/vms/<VIDEOMANAGER_ID>/videos/<VIDEO_ID>/source
Parameters | Data Type | Description |
---|---|---|
VIDEOMANAGER_ID | Integer | mandatory: ID of the VideoManager, to which you intend to upload the video. |
Headers | ||
Authorization: Bearer Token | String | mandatory: Access token (see "Authentication" for more information). |
JSON Body | ||
uploadFileName | String | mandatory: Name of the file to be uploaded |
file | mandatory | |
fileName | String | mandatory: Filename of the video (see suffix note below), nested property of file |
size | String | mandatory: size of the file, nested property of file |
Suffix of the fileName
The suffix of the filename is used to determine the mime type. The following table lists all supported suffixes.
Response
201 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.
location: https://asset-in.video-cdn.net/chunks/env/prod/vms/<VideoManager_ID>/videos/<VIDEO_ID>?bucketId=<BUCKET_ID>&fileId=<FILE_ID>&userId=<USERID>&__token__=<SECURITY_TOKEN>
Parameter | Data Type | Description |
---|---|---|
VIDEOMANAGER_ID | Integer | ID of the VideoManager, in which you intend to upload the video. |
VIDEO_ID | String | Video ID of video entity |
BUCKET_ID | String | Primary bucket ID of video file |
FILE_ID | String | File ID of the new video file |
USER_ID | String | ID of user uploading the file |
SECURITY_TOKEN | String | Access token used to access protected resources |