Patch Video Metadata

NOTES:

  • As of Rev v7.22, users with edit access may update only video metadata fields that are specified.
  • Only fields that are able to be modified by the PUT API are allowed to be modified.
  • Required parameters are the videoId and the patch request.
PATCH
/api/v1/videos/{videoId}

Request Parameters

Name Type Description Required
videoID path ID of the video to edit Yes
body patch request body Videos details to update. Please refer to http://jsonpatch.com/ for the format of the request body.

Patch operations on video non-editable fields [Id, ApprovalStatus, UploadedBy, WhenUploaded, LastViewed] will be ignored.

Operations supported: add, remove, copy, replace, test, move.

Add operation: {“op”: “add”, “path”: “/Categories/0”, “value”: “03846100-96ac-4628-bbe3-b23a0df1081d” }.

Replace operation:{ “op”: “replace”, “path”: “/accessControlEntities/0/CanEdit”, “value”: “false” }

 Yes

 

Response Codes

Code Description
200 ok
401 Unauthorized error
500 Internal server error

Edit Video Metadata

NOTES:

  • As of Rev v7.15 “Teams” is an option within VideoAccessControl and at least one team is required when using. Teams can also be specified under AccessControlEntities, however canEdit will be ignored when specifying Teams.
  • As of Rev v7.15, expirationDate and expirationAction are available as request parameters.
  • When editing accessControlEntities, include id OR name, both are not required
PUT
/api/v1/videos/{videoId}

Request Parameters

Name Type Description Required
videoID path GUID for the specific video
id string Video GUID
title string Video title.
description string Video description
thumbnailUrl string URL to a video thumbnail
categoryIds [] string Category GUID. Can assign a video to multiple categories.
tags string Video tag name. Can assign a video to multiple tags.
isActive true / false Set to false by default.
enableRatings true / false Set to true by default.
enableComments true / false Set to true by default.
videoAccessControl string Options include: Public / All Users / Private / Teams – Set to private by default.
accessControlEntities [] string id = user GUID
name = username
type = User / Group / Teams
canEdit = true / false
If Teams is set at the videoAccessControl, then a team must be specified in the accessControlEntities.

If a Team is included in the accessControlEntities, then the canEdit parameter will be ignored.

customFields[] string id = custom field GUID
value = custom field value
If a custom field is set as required in Rev, then the custom field is required in the upload API call. (See custom fields API to retrieve custom fields)
linkedUrl[] string Url = video stream URL (e.g. rtmp://asdf.company.com/stream)
EncodingType = h264 / hls / hds / h264ts / mpeg4 / mpeg2 / wm
Type = Live/Vod
IsMulticast = true / false
uploadedBy string To change the uploading user. Mostly used for migration purposes.
whenUploaded string To change the upload date. Mostly used for migration purposes.
publishDate string Publish date to have Rev automatically set the video to active.
expirationDate string Date field
expirationAction string Delete/Inactivate

 

Example Request

{
  "id": "string",
  "title": "string",
  "description": "string",
  "thumbnailUrl": "string",
  "linkedUrl": "string",
  "categories": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "isActive": true,
  "approvalStatus": "string",
  "enableRatings": true,
  "enableDownloads": true,
  "enableComments": true,
  "videoAccessControl": "string",
  "canEdit": true,
  "accessControlEntities": [
    {
      "id": "string",
      "name": "string",
      "type": "string",
      "canEdit": true
    }
  ],
  "customFields": [
    {
      "id": "string",
      "name": "string",
      "value": "string",
      "required": true,
      "displayedToUsers": true,
      "fieldType": "string"
    }
  ],
  "expirationDate": "2017-08-31T15:00:10.472Z",
  "expirationAction": "delete",
  "uploadedBy": "string",
  "whenUploaded": "string",
  "publishDate": "2017-08-31T15:00:10.472Z"
}

Response Codes

Code Description
200 ok
401 Unauthorized error
500 Internal server error

Migration

This API often used during migrations to Rev from another system. During video import, you may want to retain the original uploader and upload date. This will allow you to set only these two fields.

PUT
/api/v1/videos/{videoId}/migration

Request Parameters

Name Type Description Required
videoID path GUID for the specific video Yes
username string The uploader will be set to this user Yes
whenUploaded string The upload date will be set to this value

Example Request

{
  "userName": "john.smith",
  "whenUploaded": "2017-08-31T15:00:10.471Z"
}

Response Codes

Code Description
200 ok
401 Unauthorized error
500 Internal server error

Access Control

This API will allow you to set only the access control permissions on a specific video. This can also be set with the API to edit all video metadata, but there may times when a customization is needed to automate access control updates.

NOTE: As of Rev v7.21, this API has been enhanced to now allow access control entities to be set for all four types of access control (previously only Private access control could be set and edited). This includes All Users, Public (if enabled on the Rev account, allows for password to be set), Teams (there should be one valid Team in the account, otherwise this request will be rejected),  and the default setting of Private.

PUT
/api/v1/videos/{videoId}/access-control

Request Parameters

Name Type Description Required
videoID path GUID for the specific video Yes
canEdit string true / false
id string GUID for the user, group or team
type string User / Group / Team

Example Request

{
  "AccessControlEntities": [
  {
    "canEdit": true,
    "id": "6bfb1ad1-71d3-4d9a-9915-d2087865529d",
    "type": "Group"
  },
  {
    "canEdit": true,
    "id": "82d107af-2ec7-49c3-aea2-d35d0c35784h",
    "type": "User"
  },
  {
    "canEdit": true,
    "id": "29ax1ad1-71d3-4d9a-9915-d2087865426s",
    "type": "Team"
  } 
  ]
}

Response Codes

Code Description
200 ok
401 Unauthorized error
500 Internal server error