VdoCipher - API Doumentation | Secure video streaming for business
Workflow during a video playback
  1. yoursite.com makes an API call to /otp and receives the access token
  2. yoursite.com uses the OTP token to render embed code
  3. Viewer's browser uses this embed code to play video.


What is an OTP?

OTP is a one time access token which is obtained by your website server from API. It expires after a plyback session. It allows you to play the video only when the user is authorised.


Query Parameters

video string

The video id as returned in the video/ action.

Post Parameters

forcedBitrate integer

(optional) The desired bitrate for the video playback. Player searches for the available bitrate closest to this number and plays it.

annotate string

(optional) Watermark to be placed on the video. Please read this documentation for more info.

Returned values

otp string

A one-time password to authenticate video playback.

EXAMPLE

curl 'http://api.vdocipher.com/v2/otp?video=xxxxxxxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' --data 'clientSecretKey=CLIENT_SECRET_KEY'

Query Parameters All parameters are optional. If no parameter provided, this will return the first 30 results.

search array<object>

This is an array which can have indices id, titleor file. The search assumes AND operator if more than one value is given. Make sure that this is url-encoded. Check examples for illustration.

page uint

Page is the page number. It is used to get the next page if the results are truncated by limit. Default 1 , i.e the first page.

limit uint

limit is the maximum number of results returned per query. Default value is 30

type [ json | xml ]

Returned values Response consists of a list of video entities in json or xml as requested by the type parameter. The following information is retuned about a video.

id string

A unique identification number for all videos.

title string

The title of the video. You can also customize the player to show tite as an overlay.

description string

A detailed description of the video. Also can be made visible on the overlay.

file string

The file name with which the video was uploaded.

length uint

The duration of the video in seconds

viewCount uint

The number of times this video has been viewed. This is an approx figure and is not updated in realtime

statusText [ queued | processing | ready ]

A status Text representing the state of video processing. Use this to know if the video is ready to be played.

date_added timestamp

The time when you added the video to vdocipher.

EXAMPLE

curl 'http://api.vdocipher.com/v2/videos?limit=5&search%5Bid%5D=xxxxxxxxxxxxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' --data 'clientSecretKey=CLIENT_SECRET_KEY'

Query Parameters

id string

The id of the video.

Returned values Response consists of a list of files entities in json or xml as requested by the type parameter. The following information is retuned about a video.

id uint

A unique identification number for all videos.

name string

The name of the video which identifies the assets needed for the video. Not required for any API. Representation value only.

type string

A detailed description of the video. Also can be made visible on the overlay.

A string describing the type of file e.g. poster, desktop, mobile

size uint

The file name with which the video was uploaded.

width uint

Width of the video / image.

height uint

Height of the video / image.

downloadable boolean

If this file is ready to be downloaded. Original media, poster images and formats made for redistribution can only be accessed for download.

More on how to download

EXAMPLE

curl 'http://api.vdocipher.com/v2/files?video=xxxxxxxxxxxxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' --data 'clientSecretKey=CLIENT_SECRET_KEY'

INFO

Query Parameters

id string

The id of the video.

Returned values

Response consists of a file object in json or xml as requested by the type parameter. The following information is retuned about a video.

EXAMPLE

curl 'http://api.vdocipher.com/v2/video?id=xxxxxxxxxxxxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' --data 'clientSecretKey=CLIENT_SECRET_KEY'

DELETE

Query Parameters

id string

The id of the video.

Extra Post Parameters

action string "delete"

The value of this parameter should equal the string "delete".

Returned values

200 HTTP code mean the delete is successful. Other HTTP codes are used to convey their respective meanings.

Post Parameters

title string

The title of the video which shall be uploaded using this policy file.

This API is disabled by default.

Please contact info@vdocipher.com to activate this API for your account.

Query Parameters

url string

url encoded value of the video URL

To use with amazon s3, please create temporary signed URL with the S3::getObjectUrl() function, encode this URL as a URIComponent

Returned values Response consists of a list of files entities in json or xml as requested by the type parameter. The following information is retuned about a video.

id string

the video id associated with the newly created video

name string

the current status of processing which should be "Queued"

EXAMPLE

curl 'http://api.vdocipher.com/v2/importUrl?url=xxxxxxxxxxxxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' --data 'clientSecretKey=CLIENT_SECRET_KEY'

Add the list of tags to all the videos in the list. This API can be used with one or more videos at the same time.

Query Parameters

videos array<string>

IDs of videos that need to be tagged with the above set of tags.

tags array<string>

Deletes all crosses of the videos and the tags.

Query Parameters

videos array<string>

tags array<string>

Search entities tagged with the given set of tags

Query Parameters

tags array<string>

The list of tags over which the query will be made. Note that the tags are queried with the AND operator.