/videos/captions/create¶
Create a new video caption.
Parameters¶
- video_key : string
Key of the video for which caption should be created.
- label (optional) : string
Caption label.
- position (optional) : unsigned integer
Indicates where to insert the new caption. The first position is 0. If set to 0, caption will be inserted at the top of the captions list. If not specified, caption will be inserted at the end of the list. Position will be set only if caption is successfully processed.
- md5 (optional) : string
Caption file MD5 message digest. If supplied, it will be compared with the MD5 digest calculated for the received caption file. Uploaded caption will be rejected if MD5 message digests do not match.
- size (optional) : unsigned integer
Caption file size. If supplied, it will be compared with the size of the received caption file. Uploaded caption will be rejected if the sizes do not match.
Example response¶
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>ok</status>
<caption key="SQay5cjC">
<link>
<protocol>http</protocol>
<address>upload.bitsontherun.com</address>
<path>/v1/videos/captions/upload</path>
<query>
<key>SQay5cjC</key>
<token>ee5d1e457c194z431cb54d76d609a9f3792da73a1503f437</token>
</query>
</link>
</caption>
</response>
Response parameters¶
- /response/status : string
Call execution status. Set to ok if call executed successfully.
- /response/caption/@key : string
Key of the created video caption.
- //caption/link/protocol : string
Protocol part of the upload URL.
- //caption/link/address : string
Address part of the upload URL.
- //caption/link/path : string
Path part of the upload URL.
- //caption/link/query/key : string
Upload key query parameter.
- //caption/link/query/token : string
Upload token query parameter.
Upload¶
The parameters in the link block can subsequently be used to construct an upload URL and submit the file to it.