CW Search API

From Kaltura Wiki

Jump to: navigation, search

[edit] Preface

The CW Search API enables partners to implement a callback url that the CW will call in order to search for media.

[edit] Request format

The request is sent using http post with the following parameters:

Parameter Type Description
uid String The searching user id.
search String The keywords the user is searching for (there is not any preprocessing of special characters).
media_type Integer 1 - video, 2 - image, 5 - audio
page Integer the page number for paginating the results. First page is 1.
page_size Integer the page size (the CW asks for 20 entries by defaults).
filter Integer 0 - search all, 1 - my friends (for use by SNS).

[edit] Results format

The search results format is shown below.

<objects>
<num_0>
	<id>xyz123</id><!-- some id that identifies the video -->
	<url>http://example.com/data/xyz123_media.flv</url><!-- url to fetch the video -->
	<tags>dunk,amazing</tags><!-- comma delimited tags - will be stored on kaltura servers -->
	<title>amazing dunk</title><!-- will be stored on kaltura servers -->
	<thumb>http://example.com/thumb/xyz123_thumb.jpg</thumb><!-- thumbnail url -->
	<description>amazing jump (30 secs)</description><!-- displayed description shown in the CW as a tooltip and won't be stored -->
	<source_link>http://example.com/media_page/xyz123</source_link><!-- OPTIONAL - link to an html page containing the media  -->
	<credit>john dunker</credit><!-- OPTIONAL - containing attribution information -->
	<media_source></media_source><!-- OPTIONAL - overrides the request media source -->
	<flash_playback_type></flash_playback_type><!-- OPTIONAL - for audio files "audio" / "video" -->
	<license></license><!-- OPTIONAL - enumeration for license type -->
</num_0>
<num_1>
	<id>...</id>
	<url>...</url>
	<tags>...</tags>
	<title>...</title>
	<thumb>...</thumb>
	<description>...</description>
	<source_link>...</source_link>
	<credit>...</credit>
	<media_source>...</media_source>
	<flash_playback_type>...</flash_playback_type>
	<license>...</license>
</num_1>
</objects>

The num_xx nodes are per the specific request (i.e. the result for a request for the second page starts with num_0 as well).

Personal tools