KalturaAPI:main
From Devwiki
Contents |
Background
Here we'll describe the KalturaAPI - a set of services that allow creating and editing of Collaborative Videos. These Collaborative Videos can be used anywhere on the web.
Partners
To be able to use these service, one should become a Kaltura Partner
A partner, using a partner_id & secret, can use a sequence of services to allow its users to create and modify Collaborative Videos.
Services URL
All the services are actually URLs that can be reached using http-get or https-post.
They are placed at www.kaltura.com/index.php/partnerserivces2/<service-name>
ALL calls should have the basic parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| partner_id | integer | always | the Kaltura Partner given by Kaltura at registration time |
| subp_id | integer | always | a unique ID (usually 100 * partner_id) to specify a "flavor" of the partner's application. A partner can have several subp_ids which each have a different skin to the widget. |
| uid | string | always | the partner's unique ID for the user |
External Services
These services are used by kaltura partners to create a blank Collaborative Video (with a name and a summary) and later add entries (videos, audio clips or images) to this video.
| Service name | General Description |
|---|---|
| startsession | Starts a kaltura-session. This service is called before any of the others. |
| addkshow | Starts a blank Collaborative Video. Sets it's name and summary which will be displayed in the widget. |
| updatekshow | Updates an existing Collaborative Video. |
| getkshow | Returns info about a specific Collaborative Video. |
Internal Services
These services are usually called from within the Contribution Wizard.
When using the wizard, none of the services will ever have to be explicitly called.
| Service name | General Description |
|---|---|
| searchmediaproviders | Lists all the media providers available for a given partner. |
| search | Searches for images/video/audio in a media provider given a set of keywords. Returns enough data to display a thumbnail and tags about the findings. |
| searchmediainfo | Fetches more details about a specific object found in the 'search' service. |
| searchfromurl | Searches a given URL for relevant objects (images/videos/audio). |
| upload | Uploads a file to be used in a video. |
| uploadjpeg | Uploads a binary object (using http-post) to be used in a video. |
| addentry | Adds an entry (object) to an existing Collaborative Video. This service is called after and object is found using the search mechanism, a file is uploaded or a webcam is used to record a video. |
| adduser | Adds a user to the system using his unique ID in the partner's environment. It is possible you'll never need to call this service because users area automatically created in the system assuming they were already authenticated on the partner's side and they have a unique ID. |
Admin Services
These services help display inforamtion and statistics about existing Collaborative Videos and users.
| Service name | General Description |
|---|---|
| listkshows | Lists Collaborative Videos given a query filter. |
| getentry | Returns info about a specific entry. |
| getuser | Returns info about a specific user. |
Types of results
Depending on the a special parameter called 'format', the result of the service can be on of the following:
| format | Result type |
|---|---|
| 1 | JSON |
| 2 | XML |
| 3 | Serialized PHP arrays |
Contribution Wizard
The Contribution Wizard is a flash object that helps add objects to an existing Collaborative Video.
This object actually handles most of the calls to the search/upload/addentry services,
leaving the partner only to initialize it properly with static parameters (ones that are set once per partner and are not supposed to change)
and some dynamic parameters representing the state of the user.
Collaborative Video Editor
The Collaborative Video Editor is a flash object that helps edit an existing Collaborative Video.
Example
A reference implementation can be found at Test Console

