Skip to content

API Specification

lelandmiller edited this page Sep 18, 2014 · 8 revisions

All the API actions should be accessible through standard http methods. Pagination should be implemented in all calls that return lists.

Routes

Video Routes

/media/:cam/:id{.avi|.mp4}

This route statically serves the video files. For example, /media/quad1/21.mp4 would serve video 21 from the camera named quad1. The .avi file is the original DivX encoded avi and the mp4 is converted for web use.

Message Routes

get /messages?page={1}&size={20}

Returns all messages as a JSON object. Results must be paginated and by default will return page 1 of size 20. Returns an object of the form:

{
    "pagination": {
        "current": <#, current page>,
        "count": <#, total item count>,
        "size": <#, page size>
    }
    "data": <Array, the array containing message objects>
}

/messages/:cam/:id

Get the message

Camera Routes

Clone this wiki locally