Example

GET /video/:id/password/:password

Check to see if a password for a video is valid.
Buto allows clients to set a password on a video in the control panel. This password has to be entered into our video embeds before playback will be allowed.NB This will not lock a video down to the CDN level and is merely meant to prevent embedded videos from being played back. For that level of security you'll need video access tokens.
We also recommend that you always use HTTPS with this endpoint so as not to send your passwords in plaintext.NB Please note that we will not store the original password in our DB or logs, we'll do a hash compare and then discard the password

Collection /video/upload

To Upload a video to your account pragmaticallyNB The url to the source video must be publicly available for our systems to pull from. Internal development, intranet and extranet addresses will not work.NB The API key you use will determine which account the video is uploaded to.

POST /video/upload

Upload a new video to your account or replace an existing one:

Compulsory fields

You'll need these fields for a new upload or a replace
- The url of the source video
- The organisation_id of the organisation_id you're uploading from

New Video Fields

While uploading a new video you can also do the following:
- Set the Video name and description
- Set the Video publish internal title field which is for internal use in the control panel
- Set tags against the video NB Do not use spaces in your multiword tags, use hyphens
- Set the Video description_private field which will not be returned without a valid API key
- Set published_width and published_height
- Set theme_id and settings_id
- Set notify to a string 'false' to prevent sending encoding success email to the user

Replace Video Fields

When replacing an existing video you must supply the following field, any other fields you set apart from the compulsory ones will be ignored
- the media_id of the existing video

item

value

Access

Client Key, System Key

Full url

https://api.buto.tv/v2/video/upload/

verb

GET

params

as above

Example usage 1 - Upload a new video

#upload a new video
api_key=<your api key>
#NB we have to url encode our json string to use curl on the command line, so we use php/python/node for this purpose
url_encoded=`php -r 'echo urlencode(json_encode({"name":"title","description":"public info about myvideo","description_private":"data that will not be returned by the public video api","url":"http://example.com/myvideo.mp4","organisation_id":"12345","tags":["soil-testing", "ph-neutral-crops","organic-potato-farming"]}));'`
curl -X POST -u ${api_key}:x --data-binary "data=${url_encoded}" https://api.buto.tv/v2/video/upload

Collection /video/tag

To work with videos that have tags

GET /video/tag/:tag

GET a list of videos that use the specified tag(s).

NB

You can either pass in single tag or pass in a json formatted array of tags like : {"tags":["custom_tag_one","custom_tag_two"]}
If you're using curl on bash/zsh take care when you're escaping the json. On zsh it gets a bit intense and {"tags":["custom_tag_one","custom_tag_two"]} becomes "\{\"tags\":\[\"custom_tag_one\",\"custom_tag_two\"\]\}". Stick with postman when testing this endpoint.