Introduction to the Media API
Movideo's Media API allows developers to interact with the platform through web-services. The API's are based on the REST principles. Where each request can be an HTTP POST or GET, and the response is a gzipped content (If client specified that gzip is supported in its HTTP Headers).
Calling Media API methods
To access your media data you must make a HTTP request to the domain api.movideo.com and include the endpoint you require the data from.
The REST URL is made up of 3 parts:
- Domain (api.movideo.com)
- Endpoint (\media\id)
- Parameters (title=NASA)
Media API Endpoints
See: Media API Endpoints for a complete list of available endpoints.
To prevent unauthorised access to the Media API it is protected with a generated Session Token that is passed as a parameter when making API calls. To generate a token an authentication call must be made with your Application Alias and API Key.
Example Authentication Request
Example Successful Authentication Response
<?xml version="1.0" encoding="UTF-8"?> <session> <applicationAlias>flash_test_app</applicationAlias> <ipAddress>126.96.36.199</ipAddress> <created>2011-01-23T10:22:53</created> <token>e8579fe9-3dc0-47e6-ad4b-c8f3f879abb7</token> <clientAlias>movideodeveloper</clientAlias> <clientId>20</clientId> <location> <countryCode>AU</countryCode> <regionCode>07</regionCode> </location> <deliveryProfiles> <deliveryProfile> <name>FLASH</name> <target>FLASH</target> <protocol>RTMP</protocol> </deliveryProfile> <deliveryProfile> <name>FLASH_SECURE</name> <target>FLASH</target> <protocol>RTMPE</protocol> </deliveryProfile> <deliveryProfile> <name>FLASH_TUNNEL</name> <target>FLASH</target> <protocol>RTMPT</protocol> </deliveryProfile> </deliveryProfiles> </session>
Once you have the token it passed along with all API requests. The token has a session time out of 2 hours.
Media API Console
To introduce you to the Media API we have created the Media API Console. This console allows you to test and debug your calls to the API before full implementation.
To enhance performance, API calls are cached by movideo's API servers. Some API calls can be cached up to 15 minutes. The cache differs for different end user geographical regions and different API calls as some have no cache at all. At any stage your can manually flush the cache from your Administration Console.