You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lelandmiller edited this page Sep 23, 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}&before=ISOString&after={ISO8601_string}
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": {
"count": 432
},
"data": [{}]
}
Where count is a total count of all of the objects in the database for the requested collection (not just on the current page), and data contains an array of the requested message objects on the current page.