| Support |

Videos

Videos – all videos

Request URL: http://api.buto.tv/videos/?limit=10&offset=0
Request Method: GET
Requires Authentication: Yes

Returns full video details for all videos in the authenticated user’s organisation. Responses are limited to 25 videos, and can be optionally restricted further with the GET parameter ‘limit’. An offset can also be passed to allow paging of data.

<videos>
<video>
...
<video>
<video>
...
</video>
</videos>


Videos – Single video

Request URL: http://api.buto.tv/videos/{#video id}
Request Method: GET
Requires Authentication: No

Returns all details about a video, full data reference can be found at the bottom of this page. Invalid requests will return error readout and a 400 range status code. Successful requests return a 200 status code.

<video>
...
</video>


Videos – Search

Request URL: http://api.buto.tv/videos/search/
Request Method: POST
Requires Authentication: Yes

Returns videos that match a specific criteria. All of the XML tags below are optional and can be omitted from the request. If a start date is provided a valid end date must also be provided. Dates should be formatted as ISO 8601 dates. Valid requests will return full video details, all requests are limited to 25 responses or less.

Request

<search>
<start_date>'ISO 8601'</start_date>
<end_date>'ISO 8601'</end_date>
<text>'String - search text'</text>
<tags>
<tag>'String - search tag'</tag>
<tag>...</tag>
</tags>
</search>


Response

<videos>
<video>
...
</video>
</videos>


Video – Republish

Request URL: http://api.buto.tv/videos/republish
Request Method: POST
Requires Authentication: Yes

Republishes a video to a new ‘copy’ with different settings. All parameters are required and must be POSTed as XML. Successful requests will return full video details as XML and a 201 created status header. Incorrect or malformed requests will return a 400 range status code and error details.

Request

<video>
<video_id>'String - media ID of the video to republish'</video_id>
<title>'String'</title>
<description>'String'</description>
<embed_width>'Integer - between 400 and 1920'</embed_width>
<embed_height>'Integer - between 224 and 1080'&lt/embed_width>
<settings_id>'String - valid settings id'</settings_id>
<theme_id>'String - valid theme id'</theme_id>
</video>


Response

Responses follow the standard video response, shown at the bottom of this page


Video – Upload

Request URL: http://api.buto.tv/videos/upload
Request Method: POST
Requires Authentication: Yes

Request

This API allows direct uploading to Buto, which will then encode the video file as normal. Currently the API only allows for one file to be uploaded each call. Uploads should be POSTed as XML.

<upload>
<name>'String - title of the video'</name>
<file_path>'String - full HTTP path to the video file'</file_path>
<encode_width>'Integer - value between 400 and 2000'</encode_width>
<encode_height>'Integer - value between 200 and 2000'</encode_height>
<!-- Optional parameters - default values chosen if not specified -->
<settings_id>'String'</settings_id>
<theme_id>'String'</theme_id>
</upload>


Response

A successful upload returns a 200 OK status, as well as XML output of the newly created video.

<video>
<id>'String'</id>
<media_id>'String'</media_id>
<status>'encoding'</status>
<name>'String'</name>
</video>


Video – Data reference

All video responses will be returned in the following XML format, comments have been used to show parameters that may or may not be returned (depending on the settings for a particular video).

All parameters shown here are sample dummy data, representing the data types returned by the API.

<?xml version="1.0"?>
<video>
<id>'String - 5 char ID'</id>
<name>'String'</name>
<publish_title>Default Publish</publish_title>
<publish_width>640</publish_width>
<publish_height>360</publish_height>
<description>'String'</description>
<media_id>'String - 5 char ID'</media_id>
<is_enabled>'Boolean'</is_enabled>
<comments_count>'Integer'</comments_count>
<interestingness_score>'Integer'</interestingness_score>
<length>'Integer'</length>
<age_rating>'Integer'</age_rating>
<video_mp4_100>'String - http path'</video_mp4_100>
<video_mp4_250>'String - http path'</video_mp4_250>
<video_mp4_360>'String - http path'</video_mp4_360>
<video_mp4_500>'String - http path'</video_mp4_500>
<video_mp4_800>'String - http path'</video_mp4_800>
<video_mp4_1200>'String - http path'</video_mp4_1200>
<video_mp4_2500>'String - http path'</video_mp4_2500>
<video_mp4_3500>'String - http path'</video_mp4_3500>
<video_3gp_360>'String - http path'</video_3gp_360>
<video_flv_100>'String - http path'</video_flv_100>
<video_flv_250>'String - http path'</video_flv_250>
<video_flv_500>'String - http path'</video_flv_500>
<video_flv_800>'String - http path'</video_flv_800>
<video_flv_1200>'String - http path'</video_flv_1200>
<video_m4v_256>'String - http path'</video_m4v_256>
<video_m4v_1024>'String - http path'</video_m4v_1024>
<poster_large>'String - http path'</poster_large>
<poster_small>'String - http path'</poster_small>
<allow_hd>7201080</allow_hd>
<auto_hd>720</auto_hd>
<creator_id>'String - 5 char ID'</creator_id>
<created_at>'ISO date'</created_at>
<modified_at>'ISO date'</modified_at>
<modifier_id>'String - 5 char ID'</modifier_id>
<tags>
<tag>'String'</tag>
<tag>...</tag>
<tag>...</tag>
</tags>
<restricted>'Boolean'</restricted>
<settings>
<id>'String - 5 char ID'</id>
<name>'String'</name>
<comments_status>'String'</comments_status>
<sharing_enabled>'Boolean'</sharing_enabled>
<pre_buffer_enabled>'Boolean'</pre_buffer_enabled>
<auto_play>'Boolean'</auto_play>
<show_title_bar>'Boolean'</show_title_bar>
</settings>
<theme>
<id>'String - 5 char ID'</id>
<name>'String'</name>
<background_rgb>'6 char int'</background_rgb>
<transport_bar_rgb>'6 char int</transport_bar_rgb>
<accent_rgb>'6 char int</accent_rgb>
<font_rgb>'6 char int</font_rgb>
</theme>
<!-- Optional - if Hotspots are set for this video -->
<hotspots>
<hotspot>
<id>'String - 5 char'</id>
<label>'String'</label>
<positions>
<position>
<radius>'Integer - %'</radius>
<x_position>'Integer - %'</x_position>
<y_position>'Integer - %'</y_position>
<background_rgb>'6 char int</background_rgb>
<time>'Integer'</time>
</position>
</positions>
<advert>
<id>'String - 5 char ID'</id>
<name>'String'</name>
<description>'String'</description>
<image_path>'String - Http path'</image_path>
<button_value>'String'</button_value>
<href>'String - http path'</href>
<link_target>'_blank, _self or _parent'<link_target>
<created_at>'ISO Date'</created_at>
<creator_id>'String - 5 char ID'</creator_id>
<modified_at>'ISO Date'</modified_at>
<modifier_id>'String - 5 char ID'</modifier_id>
</advert>
</hotspot>
</hotspots>
</video>