Video Search
The video search API mimics the search within the Rev portal. All results are based on the authenticated user making the API request.
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| q | string | Search query string. Used to search the Rev title and keywords fields as well as transcripts (speech results), etc. This is the same functionality as using the Search Media form in the Rev UI. | |
| myCustomName | string |
Custom query string used to search the custom fields defined in Rev. Must be exact matches in both pick lists and text/text areas. If they do not exist, they will be ignored in the request. You may specify more than one. This would be passed in as a query string parameter, i.e., |
|
| type | string | Type of videos. Can be live or vod. | |
| categories | string |
List of Category GUIDs to search videos only in the specified categories. Example: Pass blank to get uncategorized videos. Example: Categories= |
|
| uploaders | string |
Uploader full name to get specific videos uploaded by these users. Example: Note that if you are not seeing videos by the uploader you are looking for, please refine the search criteria. |
|
| uploaderIds | string | Uploader GUIDs to get specific videos uploaded by these users. Example: UploaderIds=abc,xyz |
|
| status | string | Can be active or inactive. | |
| fromPublishedDate | date | Valid video published date. | |
| toPublishedDate | date | Valid video published date. | |
| fromUploadDate | date | Valid video upload date. | |
| toUploadDate | date | Valid video upload date. | |
| fromModifiedDate | date | Valid video modified date. | |
| toModifiedDate | date | Valid video modified date. | |
| count | integer | Specific a number of videos to return. Defaults to 50 per page. | |
| scrollId | string |
If totalVideos is greater than the count value, the scrollId parameter is returned from the first request to get the next set of videos. Note: There is a 60 second expiration on this parameter that is renewed each time it is used. If not used within 60 seconds of the first call, it expires. |
|
| exactMatch | boolean |
true / false If true, then the specified field in the searchField parameter must exactly match the q parameter value. Example: |
|
| sortField | string |
If provided the query results will be sorted based on a field – title, whenUploaded, uploaderName, duration, _score. Default sort is by title. Score is the relevance score (Rev portal defaults to relevance score based sorting). |
|
| sortDirection | string | asc / desc | |
| unlisted | string | If provided, the query string will fetch the unlisted setting of the video. This can be listed only, unlisted only, or to return all. Default setting will fetch the listed only videos. | |
| searchField | string | Limits the q parameter to searching only the fields provided in searchField. Can select title, tags, categories or uploader. If the exactMatch flag is also set, then the results will be fetched for exactMatch on the provided searchField only. | |
| includeTranscriptSnippets | boolean | If true, search results include inner hits from transcription files. Default is false. | |
| recommendedFor | string | Returns recommended videos for a provided Username. Videos returned are based on the user’s last ten viewed videos. Note that you must be a Media or Account Admin to use this query. Sort order must be _score. If you have incorrect privileges or the Username provided does not exist, a 401 error will be returned. |
Example Request
{
"videos": [
{
"id": "string",
"title": "string",
"description": "string",
"categories": [
"string"
],
"tags": [
"string"
],
"thumbnailUrl": "string",
"playbackUrl": "string",
"duration": "string",
"viewCount": 0,
"status": "string",
"approvalStatus": "string",
"ApprovalProcessName": "string",
"ApprovalProcessStepName": "string",
"ApprovalProcessStepNumber": 0,
"ApprovalProcessStepsCount": 0,
"uploader": "string",
"uploadedBy": "string",
"whenUploaded": "2020-06-12T13:04:57.162Z",
"lastViewed": "2020-06-12T13:04:57.162Z",
"averageRating": 0,
"ratingsCount": 0,
"speechResult": [
{
"time": "string",
"text": "string"
}
],
"unlisted": true,
"whenModified": "2020-06-12T13:04:57.162Z",
"whenPublished": "2020-06-12T13:04:57.162Z",
"commentCount": 0
}
],
"totalVideos": 0,
"scrollId": "string",
"statusCode": 0,
"statusDescription": "string"
}
Response Codes
| Code | Description |
|---|---|
| 200 | ok |
| 401 |
Unauthorized
|
| 404 | ScrollId expired |
| 500 | Internal server error |
Example – curl
REQUEST: Search for videos that match “test”
curl -X GET -H "Authorization: VBrick MY_TOKEN" "https://MY_REV_URL/api/v2/videos/search?q=test"
REQUEST: Get next page of search results (if more results available)
curl -X GET -H "Authorization: VBrick MY_TOKEN" "https://MY_REV_URL/api/v2/videos/search?q=test&scrollId=MY_SCROLL_ID"
This API only searches videos with the access control set to public.
This API does not require an authorization header.
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| categories | query | GUID for specific categories. Can be multiple GUIDs separated by a comma. Using this parameter with no value will search uncategorized videos. | |
| getInActive | query | true / false |
Example Response
{
"videos": [
{
"videoId": "fe1530da-7938-4d92-b0e7-cfe81e71ad11",
"title": "Keynote Speech",
"description": "H264 Video",
"thumbnailUrl": "http://RevUrl/media/videos/thumbnails/cd7fce61-c45a-4784-a9d7-5a3b8dfc3df5.jpg"
},
{
"videoId": "196fb0f6-46ac-44e3-ae79-34caee70085d",
"title": "On-Boarding Training",
"description": "The video length is 3 minutes.",
"thumbnailUrl": "http://RevUrl/media/videos/thumbnails/8072208e-c026-4503-a43c-ea77b4eafa96.jpg"
}
]
}
Response Codes
| Code | Description |
|---|---|
| 200 | ok |
| 500 | Internal server error |
- Search All Videos
-
The video search API mimics the search within the Rev portal. All results are based on the authenticated user making the API request.
GET/api/v2/videos/searchRequest Parameters
Name Type Description Required q string Search query string. Used to search the Rev title and keywords fields as well as transcripts (speech results), etc. This is the same functionality as using the Search Media form in the Rev UI. myCustomName string Custom query string used to search the custom fields defined in Rev. Must be exact matches in both pick lists and text/text areas. If they do not exist, they will be ignored in the request. You may specify more than one.
This would be passed in as a query string parameter, i.e.,
&myCustomName=XXX.type string Type of videos. Can be live or vod. categories string List of Category GUIDs to search videos only in the specified categories.
Example:
Categories=a0e5cbf6-95cb-46e7-8600-4c07bc31f80b,b1f5cbf6-95cb-46e7-8600-4c07bc31g9pc.Pass blank to get uncategorized videos. Example: Categories=
uploaders string Uploader full name to get specific videos uploaded by these users. Example:
Uploaders=mike smith, john bakerNote that if you are not seeing videos by the uploader you are looking for, please refine the search criteria.
uploaderIds string Uploader GUIDs to get specific videos uploaded by these users. Example: UploaderIds=abc,xyzstatus string Can be active or inactive. fromPublishedDate date Valid video published date. toPublishedDate date Valid video published date. fromUploadDate date Valid video upload date. toUploadDate date Valid video upload date. fromModifiedDate date Valid video modified date. toModifiedDate date Valid video modified date. count integer Specific a number of videos to return. Defaults to 50 per page. scrollId string If totalVideos is greater than the count value, the scrollId parameter is returned from the first request to get the next set of videos.
Note: There is a 60 second expiration on this parameter that is renewed each time it is used. If not used within 60 seconds of the first call, it expires.
exactMatch boolean true / false
If true, then the specified field in the searchField parameter must exactly match the q parameter value.
Example:
?q="myvalue&exactMatch=true&searchField=title"then a title of “myvalue” will match, but “myvalue and even more” will notsortField string If provided the query results will be sorted based on a field – title, whenUploaded, uploaderName, duration, _score.
Default sort is by title. Score is the relevance score (Rev portal defaults to relevance score based sorting).
sortDirection string asc / desc unlisted string If provided, the query string will fetch the unlisted setting of the video. This can be listed only, unlisted only, or to return all. Default setting will fetch the listed only videos. searchField string Limits the q parameter to searching only the fields provided in searchField. Can select title, tags, categories or uploader. If the exactMatch flag is also set, then the results will be fetched for exactMatch on the provided searchField only. includeTranscriptSnippets boolean If true, search results include inner hits from transcription files. Default is false. recommendedFor string Returns recommended videos for a provided Username. Videos returned are based on the user’s last ten viewed videos. Note that you must be a Media or Account Admin to use this query. Sort order must be _score. If you have incorrect privileges or the Username provided does not exist, a 401 error will be returned. Example Request
{ "videos": [ { "id": "string", "title": "string", "description": "string", "categories": [ "string" ], "tags": [ "string" ], "thumbnailUrl": "string", "playbackUrl": "string", "duration": "string", "viewCount": 0, "status": "string", "approvalStatus": "string", "ApprovalProcessName": "string", "ApprovalProcessStepName": "string", "ApprovalProcessStepNumber": 0, "ApprovalProcessStepsCount": 0, "uploader": "string", "uploadedBy": "string", "whenUploaded": "2020-06-12T13:04:57.162Z", "lastViewed": "2020-06-12T13:04:57.162Z", "averageRating": 0, "ratingsCount": 0, "speechResult": [ { "time": "string", "text": "string" } ], "unlisted": true, "whenModified": "2020-06-12T13:04:57.162Z", "whenPublished": "2020-06-12T13:04:57.162Z", "commentCount": 0 } ], "totalVideos": 0, "scrollId": "string", "statusCode": 0, "statusDescription": "string" }Response Codes
Code Description 200 ok 401 Unauthorized
- Incorrect Admin privileges
- Username not found for recommendedFor parameter
404 ScrollId expired 500 Internal server error Example – curl
REQUEST: Search for videos that match “test”
curl -X GET -H "Authorization: VBrick MY_TOKEN" "https://MY_REV_URL/api/v2/videos/search?q=test"
REQUEST: Get next page of search results (if more results available)
curl -X GET -H "Authorization: VBrick MY_TOKEN" "https://MY_REV_URL/api/v2/videos/search?q=test&scrollId=MY_SCROLL_ID"
- Search Public Videos
-
This API only searches videos with the access control set to public.
This API does not require an authorization header.
GET/api/v2/videosRequest Parameters
Name Type Description Required categories query GUID for specific categories. Can be multiple GUIDs separated by a comma. Using this parameter with no value will search uncategorized videos. getInActive query true / false Example Response
{ "videos": [ { "videoId": "fe1530da-7938-4d92-b0e7-cfe81e71ad11", "title": "Keynote Speech", "description": "H264 Video", "thumbnailUrl": "http://RevUrl/media/videos/thumbnails/cd7fce61-c45a-4784-a9d7-5a3b8dfc3df5.jpg" }, { "videoId": "196fb0f6-46ac-44e3-ae79-34caee70085d", "title": "On-Boarding Training", "description": "The video length is 3 minutes.", "thumbnailUrl": "http://RevUrl/media/videos/thumbnails/8072208e-c026-4503-a43c-ea77b4eafa96.jpg" } ] }Response Codes
Code Description 200 ok 500 Internal server error