API for mobile applications
Login
POST: /vsaas/api/login
Example:
`curl -H 'Content-Type: application/json' -d '{"email": "email@example.com", "password": "passwwd"}' http://localhost:80/vsaas/api/login`
Parameters:
- HTTP request payload
{"email": <login>, "password": <password>}
Reply: JSON
{
success: boolean,
session: <session_token>
}
Manage your favorite cameras
Adding a camera to Favorites
POST: /vsaas/my/fav/cameras
Parameters:
- HTTP request payload
{"id": <string>} // camera id
Reply: JSON
{"success": true}
Removing a camera from Favorites
DELETE: /vsaas/my/fav/cameras/{cam_id}
Parameters:
- cam_id camera id
Reply: JSON
{"success": true}
The list of cameras
All the available cameras
GET: /vsaas/api/my/cameras
Parameters:
- HTTP request headers
x-vsaas-session: <session_token>
A list of favourites cameras
GET: /vsaas/api/my/cameras?filter=favorite
Parameters:
- HTTP request headers
x-vsaas-session: <session_token>
Reply: JSON
{
"id": string
"title": string
"access": string // [“private”, “public”, “authorized”]
"comment": string
"postal_address": string
"coordinates": string // "55.7512 37.6184"
"streamer_url": string // "http://demo-watcher.flussonic.com"
"dvr_depth": int // the depth of the archive (per days)
"permissions": { // the user rights status
"dvr": boolean // archive status
"ptz": boolean // PTZ control
"view": boolean // live-view
}
"ptz": boolean // PTZ control status
"server": string // demo-watcher.flussonic.com
"static": boolean // stream type: static or on-demand
"status": { // information about the stream condition
"source_error": string
"alive": boolean
}
"thumbnails": boolean // the camera's snapshots status
"urls": { // the links of any protocols receiving the stream
"hls": string
"hds": string
"jpg": string
"rtmp": string
"rtsp": string
"media_info": string // URL information of the stream
"recording_status": string // URL archive status
}
}