Upload API
|
2578 reads - Updated on: 01/27/2012 11:48:03 |
Follow these 4 steps to integrate the ability to upload geolocated videos in Kinomap directly in your products...
1. Register your application
Use this form to register your application: http://api.kinomap.com/application/request
2. Get upload informations
Post a HTTP request to get the upload informations.
POST or GET call with the parameters to:
http://api.kinomap.com/upload/getInfoParameters:
- app_key: Application key
- login: User login
- md5_pwd: User password md5 hash
- upload_type: http or ftp (in this case use member login and md5_pwd)
- video_format: mp4, avi, wmv, mov, 3gp (contact us for more informations)
- gps_format: nmea, gpx
- timestamp: The number of seconds that have elapsed since midnight, January 1, 1970, also known as UNIX time
- nonce: A randomly-generated string
- signature: The cryptographic method used to sign the call (An sha1 hash of the concatenation of app_key, timestamp and nonce, with your app_secret)
- output_format: xml (default), json
- chunked: set to "1" to use a chunked upload
- token: to resume upload of the video file (saved from previous upload of this video) - Enabled just on HTTP
- chunkSize: the current chunk size you use to know the position resuming- Enabled just on HTTP
Example:
http://api.kinomap.com/upload/getInfo?app_key=123456789abcdefghij&login=demo&md5_pwd=defekfzlekfzefdadadzdadzadzd&gps_format=nmea&upload_type=http&video_format=mp4×tamp=1297696525&nonce=abcdefghij&signature=jden54fe8dfde85d1&output_format=xml
Answer:
- token: Upload token (alphanumeric string)
- url: Destination URL
- host: Host (an alternative of url)
- path (an alternative of url)
- position: the position to resume the upload of the video file (if you use the resuming method, and the api assumes that your position on your application start at 0 not 1) - Enabled just on HTTP
Example:
<?xml version="1.0" encoding="UTF-8"?> <uploadInfo><token>defzzfefzef243434453</token><url>http://ul1.kinomap.com/post.php</url><host>ul1.kinomap.com</host><path>/post.php</path></uploadInfo>
3. Upload your files
Use the previously given informations to upload your files either via FTP transfer or HTTP Post.
The required files are:
- The video file: named token.video_format
- The GPS file: named token.gps_format
- The XML/Kino file: named token.kino
In the case of HTTP Post, you must upload one file at a time. And the name of the variable file is: uploadFile. To receive a success or error message, you can add this parameter
- output_format: xml (default), json
- start: set to "1" to inform the server it's the first chunk (so the server create the file, not append it)
4. Complete the upload
Post a HTTP request to inform that the upload phase is done so that the 3 files can be processed, including the video transcoding.
POST or GET call with the parameters to:
http://api.kinomap.com/upload/completeParameters:
- token
- output_format: xml (default), json
Example:
http://api.kinomap.com/upload/complete?token=12345654324564321&output_format=xml
Answer:
- track_id: (alphanumeric string, length: 6 actually)
Example:
<?xml version="1.0" encoding="UTF-8"?> <uploadComplete><track_id>ab34gt</track_id></uploadComplete>
>>Examples of the Upload API integration:
- Javascript (full web/ajax solution): http://api.kinomap.com/upload/demo/javascript
- CoutourGPS Kinomap Uploader (Windev): http://wiki.kinomap.com/fr/community/downloads/kinomap_contour_uploader
- Perl Uploader: https://github.com/paulcox/ppzilogarchive/blob/master/www/cgi-bin/kinoma...
|
Copyright 2009-2013
| You can unsubscribe at any time by clicking the link provided in our newsletters. |







