Upload a Video
Upload a supported video format. A full list of formats can be found in the Rev help documentation.
Request Body
application/json
——–FormBoundary Content-Disposition: form-data; name=”Video”
{
"title": "My Training Video",
"description": "This is what my training video contains.",
"uploader": "john.smith",
"categories": [
"training",
"new hires"
],
"categoryIds": [
"ae0cdde9-84c6-42b6-b4bc-171447b9806e",
"2k29ek2s-34c9-82b1-k4bq-303ls9dmcmso"
],
"tags": [
"2017",
"v2 training"
],
"isActive": true,
"enableRatings": true,
"enableDownloads": true,
"enableComments": true,
"videoAccessControl": "Private",
"accessControlEntities": [
{
"id": "2qwerasd-323d-asd3-0dk3-asd9dld89aos",
"name": "jane.jones",
"type": "user",
"canEdit": true
};
{
"id": "l30dsld0-03l3-9k3s-djk2-mcidf9dk24e3",
"name": "new hire group",
"type": "group",
"canEdit": false
}
],
"customFields": [
{
"id": "6a1bfa14-dcff-4d64-880b-635c8d48acc0",
"value": "human resources"
}
],
"doNotTranscode": false,
"is360": false,
"unlisted": true,
"publishDate" : "2019-08-06",
"userTags": [
"e3031353-df6e-4c2f-9884-af79dcfe87bd",
"5d8ebc19-fad7-40fc-9682-bbd6a56a89b4",
"6d5249cb-5ce2-4ec0-97fb-e7362ca75fd5"
]
}
——–FormBoundary Content-Disposition: form-data; name=”VideoFile”; filename=”SomeVideoFile.mp4″ Content-Type: video/mp4 ���ftypmp42����isommp42��:moov���lmvhd�������[���[��[1]X��/��������������������������������������������@������������������������������ ���iods�����O��)��� ——–FormBoundary
| Parameter | Type | Validations |
|---|---|---|
| VideoFile | FormDataContentDisposition, required | Video file to upload. Must be a Rev accepted file type. Please provide Content-Type header for the uploaded file. |
| title | string, optional | Title of uploaded file. If blank, API will insert the video file name in this field as the title. |
| description | string, optional | Description of uploaded file. Null if not specified. |
| uploader | string, required | Username that identifies who the video is attached to. Can be different than the authenticated user making the API call. If not specified or if the username does not exist in Rev, the upload will be rejected. |
| categories[ ] | array[string], optional |
Array of categories attached to the video. Multiple categories can be assigned. Note: You should only use category names OR categoryIds but not both. The example request below uses both for documentation purposes only. If you use categoryIds and they do not exist/are incorrect, the request will be rejected. The request is also rejected if you do not have contribute rights to a restricted category and you attempt to add/edit or otherwise modify it. |
| categoryIds [ ] | array[string], optional |
Array of category GUIDs. Multiple GUIDs may be assigned. Note: You should only use categories OR categoryIds but not both. The example request below uses both for documentation purposes only. If you use categoryIds and they do not exist/are incorrect, the request will be rejected. The request is also rejected if you do not have contribute rights to a restricted category and you attempt to add/edit or otherwise modify it. |
| tags [ ] | array[string], optional | An array of tags assigned to the video. Multiple tags may be assigned. |
| isActive | boolean, optional | Reflects the status of the video after uploading. Set to false by default if not specified. |
| enableRatings | boolean, optional | Enable or disable ratings for uploaded video. Set to true by default if not specified. |
| enableDownloads | boolean, optional | Enable or disable ability to download the uploaded video. Set to false by default if not specified. |
| enableComments | boolean, optional | Enable or disable ability to comment on uploaded video. Set to true by default if not specified. |
| videoAccessControl | string, optional |
Set access control for the video. This is an enum and options include: Public / AllUsers / Private / Channels – Set to private by default if not specified. If an incorrect value is specified, the upload will be rejected with a 400 error. Note: If Channels is set at the videoAccessControl, then a channel must be specified in the accessControlEntities. If a Channel is included in the accessControlEntities, then the canEdit parameter will be ignored. |
| accessControlEntities [ ] | array[uploadAccessControlEntity], optional |
Provides explicit rights to a video to a User / Group / Channel. The array further specifies if they can edit the video through the use of the canEdit parameter. The array contains the following properties:
|
| password | string, optional |
Password for the Public videoAccessControl setting. Use this field when the video is set to Public. If not provided, this field is ignored. |
| customFields[ ] | array[uploadCustomFields], optional |
An array of custom fields attached to the video. If a custom field is set as required in Rev, then the custom field is also required in the upload API call or it will be rejected. If it is optional, it may be optional in the API call. If the customField does not exist in Rev or an invalid value is found for a pick list, the upload will fail. If values are not provided for a pick list and/or text field, they will not be set for the video in the API call but the upload will proceed. (See custom fields API to retrieve custom fields) |
| doNotTranscode | boolean, optional | Set to false by default. This enables the video to bypass transcoding. |
| is360 | boolean, optional | Set to false by default. This setting is used to specify that a video is a 360-video. |
| unlisted | boolean, optional | Set to false by default. This setting is used to specify that a video is unlisted and, therefore,not visible or searchable in the Rev UI. |
| publishDate | date |
By default, the publishDate is set to the current date the video is set to Active status. You can also set the publishDate to a date in the future to make the video Active. If the video is already Active, the publishDate can be set to a date in the past. Note: Format must be YYYY-MM-DD to avoid generating an error. |
| userTags | array [uploadUserIds], optional | An array of user account IDs that are tagged in the video in support of Rev IQ – Facial Recognition. The account must be licensed and enabled for Facial Recognition. If the user does not exist, a 500 error will be returned. |
REQUEST: Upload a Video
curl -X POST -H "Authorization: VBrick MY_TOKEN" -F "VideoFile=@video.mp4" -F "Video={"title": "my video", "uploader": "myusername"}" -v "https://MY_REV_URL/api/uploads/videos"
Response Messages
Upload successful
{
"videoId": "c8e8d565-0747-4be6-8547-0ffb1a327dda",
"statusUri": "/api/v1/videos/c8e8d565-0747-4be6-8547-0ffb1a327dda/status"
}
Incorrect value for videoAccessControl
Unauthorized error
Internal server error
uploader not specified or username does not exist in Rev
categoryIds incorrect or do not exist in Rev
customField does not exist in Rev or picklist values incorrect
publishDate format incorrect. Must be YYYY-MM-DD