After the video entity has been successfully created, you must get the upload URL.
curl -v -X GET -H "Authorization: Bearer <ACCESS_TOKEN>" https://api.video-cdn.net/v1/vms/<VIDEOMANAGER_ID>/videos/<VIDEO_ID>/url |
The use of verbose mode ("-v") in the above request is optional if you already have a way to collect the upload URL 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 Type | Description |
---|---|---|
VIDEOMANAGER_ID | Integer | mandatory: The ID of the VideoManager, in which the new video entity has been created in the first step. |
VIDEO_ID | String | mandatory: The video ID that the system has created for the new entity (see "Creating a Video Entity"). |
Headers | ||
ACCESS_TOKEN | String | mandatory: Access token (see "Access and Refresh Tokens"). |
The upload URL is sent back in the HTTP response header under location.
Response format:
Location: https://asset-in.video-cdn.net/chunks/vms/<VIDEOMANAGER_ID>/videos/<VIDEO_ID>?bucketId=<INTERNAL_BUCKET_ID>&fileId=<INTERNAL_FILE_ID>&userId=<USER_ID>&__token__=<EXPIRY_TIME>~<HEX_VALUE> |
Notes:
Note that the URL has an time-limited token, valid for four hours. This means that if the video upload takes longer than four hours to complete, an error will occur. If this happens, perform this request again to generate a new upload URL. |