LiveResponse API
Using LiveResponse API you will be able to collect data from LiveResponse and use it in other applications through the calls we describe in the API documentation.
Getting started
In order to use LiveResponse API, you need an API-key for the organization whos data you want to access. The API-key can be generated by the organization under Settings / API in the LiveResponse web application.
Documentation
LiveResponse API can be called through either GET or POST over HTTP, depending on what API-method you want to access.
Authentication
Authentication is made by passing a valid API-key as part of the URL, when calling any of the API-methods.
The key should be passed as the querystring-parameter key.
Response format negotiation
The format of the response is negotiated through the HTTP Accept header. Currently the API support JSON and XML.
The accept-header should therefore be set to either application/json or application/xml
API methods
/video/all - HTTP GET
Allow you to fetch meta-data about a given number of your organizations videos.
Parameters
| limit |
Number of videos to display. Possible interval: 1-100. |
| page |
Used in combination with limit, to page through the videos. Possible interval: 1-. |
Sample call
GET http://app.liveresponse.se/api/video/all?key=XXXXXXXXXXXXXXXX&limit=100&page=1 HTTP/1.1
Accept: application/json
Sample response JSON:
[{
"VideoId":1,
"CameraId":1,
"CameraName":"Liveresponse",
"URL":"http://app.liveresponse.se/video/1",
"Created":"2011-12 06T11:58:30Z",
"Live":false,
"Title":"",
"Description":"",
"ThumbnailURL":"http://archive.bambuser.com/w/03/a_0001/XXXXX.jpg",
"VideoLength":14,
"Longitude":"",
"Latitude":"",
"PositionAccuracy":""
}]
Sample response XML:
<ArrayOfVideo>
<Video>
<VideoId>1</VideoId>
<CameraId>1</CameraId>
<CameraName>Liveresponse</CameraName>
<URL>http://app.liveresponse.se/video/1</URL>
<Created>2011-12-06T11:58:30Z</Created>
<Live>false</Live>
<Title/>
<Description/>
<ThumbnailURL>
http://archive.bambuser.com/w/03/a_0001/XXXXX.jpg
</ThumbnailURL>
<VideoLength>14</VideoLength>
<Longitude/>
<Latitude/>
<PositionAccuracy/>
</Video>
</ArrayOfVideo>
/video/position - HTTP POST
Allow you to specify the current geographical position of a given camera. This will update the geographical position
of all videos broadcasted by the camera within the last minute. It will also set the geographical position of all videos
broadcasted by the camera within a minute after the position has been received.
Parameters
| cameraid |
A unique ID of the camera you want to specify the position for. If you don't know the ID
of your camera, please contact our support. |
| latitude |
The current latitude of the camera, given in WGS84. |
| longitude |
The current longitude of the camera, given in WGS84. |
Sample call
POST http://app.liveresponse.se/api/video/position?key=XXXXXXXXXXXXXXXX HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 39
cameraid=2&latitude=57.6&longitude=11.9
Response
If the call is successful you will recieve a HTTP 204 No content, in response.
Unsuccessful calls will result in an HTTP 500, where the HTTP body may contain a more detailed description of the error.