The Mogreet platform has fully featured content ingestion, transcoding and serving features to make using audio, images and video in your mobile apps, web and messaging simple and painless. You never need to know what content container, codec, image size or frame rate is appropriate for a given media device – the Mogreet platform does that for you. You simply ingest a piece of content via an API call, and get back a content id and a URL that resolves to the content. You can use that URL (called a 'smart URL') wherever you need to access the content in a mobile message, application, or on the mobile web. When a remote mobile device hits the URL, the Mogreet platform reads the device type and profile information, and delivers the optimal version of the content for that device using the most appropriate delivery mechanism.
There are API calls to list all the content you have ingested, to retrieve the Smart URL for a given content id, and to destroy a piece of content hosted in the system.
As usual the easiest way to test the API calls is with curl in a terminal shell. For example, in the command below, if you replace the client id with your own client id and the token with your own token and enter the command in a terminal or shell window:
You will receive an immediate response back as XML.
You can easily test the media upload with curl as well, using the –F flag to send a file as multipart/form-data:
curl -F "email@example.com" "https://api.mogreet.com/cm/media.upload?client_id=1234&token=e15b909234f6836eab1cb0&type=video&name=VideoCallback"
Remember to replace the "file=" with the name and location of your own file, and to substitute your own client_id and token. Check the man pages for the unix command 'curl' on line or in your terminal window to learn more about using curl to post files to an API.
You can download a pdf version of the full API reference here: Mogreet Messaging System API 4.01.pdf
with the following parameters:
|client_id||Your client id.|
|format||Optional. When set to 'json' the response will be in JSON format rather than XML.|
A successful call will return an HTTP 200 with XML response, having the following elements for each media item in the media list:
|content_id||A unique integer describing that content master in the Mogreet system. Can be used in other media API calls to modify or delete the content item.|
|smart_url||The URL where this content can be accessed on all devices|
|name||The name of the content item given at the time the content was ingested|
|type||One of: Audio, Video, Image|
|filename||The filename of the file ingested|
<?xml version="1.0" encoding="UTF-8"?>
|a media.list call returning a JSON result||