API v2

Conventions

Security Parameters

headers
  • x-vsaas-api-key (string) : Watcher API Key
  • x-vsaas-session (string) : Session key, for logged in users

Collections

query
  • search (string): Substring to filter collection items (generally by name, title and comment)
  • limit (integer): Number of items returned (for collections)
  • offset (integer): Number of skipped items (for collections)
headers
  • X-Page-Limit (integer)
  • X-Page-Offset (integer)

HTTP codes

  • 200 Success
  • 400 ValidationError
  • 400 BadRequest
  • 403 Forbidden
  • 403 ApikeyExpired
  • 403 WrongApikey
  • 404 NotFound
  • 500 ApplicationError

Security Roles

  • guest
  • authenticated user
  • administrator
Resource Operation Description
  POST /vsaas/api/v2/auth/restore-password  
  POST /vsaas/api/v2/agents/(string:agent_id)/reboot  
  POST /vsaas/api/v2/agents/(string:agent_id)/reset  
  GET /vsaas/api/v2/agents/(string:agent_id)  
  GET /vsaas/static/(path:filename)  
Authentication POST /vsaas/api/v2/auth/generate-autologin-token  
  POST /vsaas/api/v2/auth/forgot-password  
  POST /vsaas/api/v2/auth/check-login  
  GET /vsaas/api/v2/auth/whoami  
  POST /vsaas/api/v2/auth/login  
Cameras PUT /vsaas/api/v2/cameras/discover  
  DELETE /vsaas/api/v2/cameras/discover  
  GET /vsaas/api/v2/cameras/discover  
  POST /vsaas/api/v2/cameras  
  GET /vsaas/api/v2/cameras  
  POST /vsaas/api/v2/cameras/(path:name)/agent-disconnect  
  POST /vsaas/api/v2/cameras/(path:name)/user_attributes  
  PUT /vsaas/api/v2/cameras/(path:name)/ptz  
  DELETE /vsaas/api/v2/cameras/(path:name)/ptz  
  PUT /vsaas/api/v2/cameras/(path:name)  
  DELETE /vsaas/api/v2/cameras/(path:name)  
  GET /vsaas/api/v2/cameras/(path:name)  
Events POST /vsaas/api/v2/events  
  GET /vsaas/api/v2/events  
Group Cameras POST /vsaas/api/v2/groups/(int:group_id)/cameras/(path:name)/order  
  PUT /vsaas/api/v2/groups/(int:group_id)/cameras/(path:name)  
  DELETE /vsaas/api/v2/groups/(int:group_id)/cameras/(path:name)  
  GET /vsaas/api/v2/groups/(int:group_id)/cameras/(path:name)  
  POST /vsaas/api/v2/groups/(int:group_id)/cameras  
  GET /vsaas/api/v2/groups/(int:group_id)/cameras  
Group Users PUT /vsaas/api/v2/groups/(int:group_id)/users/(int:user_id)  
  DELETE /vsaas/api/v2/groups/(int:group_id)/users/(int:user_id)  
  GET /vsaas/api/v2/groups/(int:group_id)/users/(int:user_id)  
  POST /vsaas/api/v2/groups/(int:group_id)/users  
Groups POST /vsaas/api/v2/groups  
  GET /vsaas/api/v2/groups  
  PUT /vsaas/api/v2/groups/(int:id)  
  DELETE /vsaas/api/v2/groups/(int:id)  
  GET /vsaas/api/v2/groups/(int:id)  
Mosaics POST /vsaas/api/v2/mosaics  
  GET /vsaas/api/v2/mosaics  
  PUT /vsaas/api/v2/mosaics/(int:mosaic_id)  
  DELETE /vsaas/api/v2/mosaics/(int:mosaic_id)  
  GET /vsaas/api/v2/mosaics/(int:mosaic_id)  
Notifications POST /vsaas/api/v2/my/subscriptions/camera_motion  
  POST /vsaas/api/v2/my/subscriptions  
  GET /vsaas/api/v2/my/subscriptions  
  POST /vsaas/api/v2/my/device-tokens  
  GET /vsaas/api/v2/my/device-tokens  
  POST /vsaas/api/v2/my/device-tokens/(string:token)/confirm  
  GET /vsaas/api/v2/my/subscriptions/(int:id)  
  GET /vsaas/api/v2/my/device-tokens/(string:token)  
Settings POST /vsaas/api/v2/settings/initial  
  PUT /vsaas/api/v2/settings  
  GET /vsaas/api/v2/settings  
Streamers POST /vsaas/api/v2/streamers  
  GET /vsaas/api/v2/streamers  
  POST /vsaas/api/v2/streamers/(int:streamer_id)/provision  
  PUT /vsaas/api/v2/streamers/(int:streamer_id)  
  DELETE /vsaas/api/v2/streamers/(int:streamer_id)  
  GET /vsaas/api/v2/streamers/(int:streamer_id)  
Usage GET /vsaas/api/v2/stream_usages  
  GET /vsaas/api/v2/disk_usages  
UsageStatistic GET /vsaas/api/v2/usage_statistic  
UserSerials POST /vsaas/api/v2/user-serials  
  GET /vsaas/api/v2/user-serials  
  PUT /vsaas/api/v2/user-serials/(path:serial)  
  DELETE /vsaas/api/v2/user-serials/(path:serial)  
  GET /vsaas/api/v2/user-serials/(path:serial)  
Users POST /vsaas/api/v2/cameras/import  
  POST /vsaas/api/v2/users/import  
  POST /vsaas/api/v2/users  
  GET /vsaas/api/v2/users  
  GET /vsaas/api/v2/users/(int:user_id)/cameras  
  PUT /vsaas/api/v2/users/(int:id)  
  DELETE /vsaas/api/v2/users/(int:id)  
  GET /vsaas/api/v2/users/(int:id)  

Authentication

POST /vsaas/api/v2/auth/generate-autologin-token

Generates an autologin token Used as an integration point with a custom service

Request JSON Object:
 
  • login (string) –
  • lifetime (integer) –
  • valid_till (integer) –
Response JSON Object:
 
  • autologin_token (string) –
POST /vsaas/api/v2/auth/restore-password

Create new password for user

Request JSON Object:
 
  • password1 (string)
  • password2 (string)
  • token (string)
Response JSON Object:
 
  • login (string) – User’s login
  • session (string) – SessionId
  • is_admin (bool) –
  • notification_email (string) –
POST /vsaas/api/v2/auth/forgot-password

Sends an email contains password reset URL

Request JSON Object:
 
  • login (string) – User’s login (optional)
  • email (string) – User’s notification email (optional)
Status Codes:
POST /vsaas/api/v2/auth/check-login

Checks user login and password

Request JSON Object:
 
  • login (string) – User login
  • password (string) – User password
Status Codes:
  • 200 OK – login and password are correct
  • 403 Forbidden – user does not exist or password is incorrect
GET /vsaas/api/v2/auth/whoami

Returns session information

Request Headers:
 
  • X-Vsaas-Session string – session key, optional
Response JSON Object:
 
  • login (string) – current login
  • is_admin (boolean) – current user can manage cameras, users, and groups
POST /vsaas/api/v2/auth/login

Logs user in

Request JSON Object:
 
  • login (string) – User login
  • password (string) – User password
Response JSON Object:
 
  • groups_count (string)
  • is_admin (boolean)
  • is_logged_in (string)
  • login (string)
  • notification_email (string)
  • session (string)

Camera Management

POST /vsaas/api/v2/cameras/import

Import collection of cameras

Request Headers:
 
Request JSON Object Array:
 
  • name (string): Stream identifier
  • access (string)
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • auth_token (string)
  • can_ptz (boolean)
  • comment (string)
  • coordinates (string)
  • dvr_allowed (boolean): is dvr allowed for owner
  • dvr_depth (integer)
  • dvr_path (string)
  • dvr_protected (boolean)
  • dvr_space (integer)
  • enabled (boolean)
  • login (string): camera owner’s username
  • motion_detector (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • password (string): camera owner’s password
  • postal_address (string)
  • registered_at (string)
  • server (string)
  • static (boolean)
  • stream_url (string)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_enabled (boolean): is camera owner enabled
POST /vsaas/api/v2/cameras

Creates a camera

Request JSON Object:
 
  • name (string): Stream identifier
  • access (string)
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_path (string)
  • dvr_protected (boolean)
  • dvr_space (integer)
  • enabled (boolean)
  • group_id (integer)
  • motion_detector (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • owner (string)
  • postal_address (string)
  • server (string)
  • static (boolean)
  • stream_url (string)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
GET /vsaas/api/v2/cameras

Returns camera list.

Mention: this API call has 2 flavors: admin mode and user mode and it returns different data for these modes.

If no header X-Vsaas-User is specified, then you get all cameras with their configuration information.

If header X-Vsaas-User or X-Vsaas-Session is provided, then response will contain only cameras visible to specified user with reduced set of fields.

Query Parameters:
 
  • favorite – 1 or 0(default) - return only favorite cameras
  • agent – 1 or 0(default) - return only cameras with agent_id
Response JSON Object Aray:
 
  • name (string): Stream identifier
  • access (string)
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • agent_status (object)
    • connected_at (string)
    • id (string)
    • ip (string)
    • local_ip (string)
    • streampoint (string)
    • version (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_path (string)
  • dvr_protected (boolean)
  • dvr_space (integer)
  • enabled (boolean)
  • group_id (integer)
  • groups (object array)
    • id (string)
    • title (string)
  • motion_detector (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • owner (string)
  • permissions (object)
    • dvr (boolean)
    • edit (boolean)
    • ptz (boolean)
    • view (boolean)
  • playback_config (object)
    • token (string)
  • postal_address (string)
  • server (string)
  • static (boolean)
  • stream_status (object)
    • alive (boolean)
    • bitrate (integer)
    • http_port (integer)
    • https_port (integer)
    • lifetime (integer)
    • rtmp_port (integer)
    • rtsp_port (integer)
    • server (string)
    • source_error (string)
  • stream_url (string)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_attributes (object)
    • comment (string)
    • favorite (boolean)
    • motion_alarm (boolean)
    • title (string)
POST /vsaas/api/v2/cameras/(path: name)/agent-disconnect

Disconnect camera agent

Query Parameters:
 
  • name (string) – Camera name
POST /vsaas/api/v2/cameras/(path: name)/user_attributes

Change camera attribute

Request JSON Object:
 
  • comment (string)
  • favorite (boolean)
  • motion_alarm (boolean)
  • title (string)
Query Parameters:
 
  • name (string) – Camera name
PUT /vsaas/api/v2/cameras/(path: name)/ptz

Send ptz command to camera

Query Parameters:
 
  • name (string) – Camera name
Request JSON Object:
 
  • down (integer)
  • in_ (integer)
  • left (integer)
  • out (integer)
  • right (integer)
  • up (integer)
DELETE /vsaas/api/v2/cameras/(path: name)/ptz

Stop ptz command

Query Parameters:
 
  • name (string) – Camera name
PUT /vsaas/api/v2/cameras/(path: name)

Change camera

Request JSON Object:
 
  • access (string)
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_path (string)
  • dvr_protected (boolean)
  • dvr_space (integer)
  • enabled (boolean)
  • group_id (integer)
  • motion_detector (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • owner (string)
  • postal_address (string)
  • server (string)
  • static (boolean)
  • stream_url (string)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
Query Parameters:
 
  • name (string) – Camera name
DELETE /vsaas/api/v2/cameras/(path: name)

Removes camera

Query Parameters:
 
  • name (string) – Camera name
GET /vsaas/api/v2/cameras/(path: name)

Get camera info

Response JSON Object:
 
  • name (string): Stream identifier
  • access (string)
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • agent_status (object)
    • connected_at (string)
    • id (string)
    • ip (string)
    • local_ip (string)
    • streampoint (string)
    • version (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_path (string)
  • dvr_protected (boolean)
  • dvr_space (integer)
  • enabled (boolean)
  • group_id (integer)
  • groups (object array)
    • id (string)
    • title (string)
  • motion_detector (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • owner (string)
  • permissions (object)
    • dvr (boolean)
    • edit (boolean)
    • ptz (boolean)
    • view (boolean)
  • playback_config (object)
    • token (string)
  • postal_address (string)
  • server (string)
  • static (boolean)
  • stream_status (object)
    • alive (boolean)
    • bitrate (integer)
    • http_port (integer)
    • https_port (integer)
    • lifetime (integer)
    • rtmp_port (integer)
    • rtsp_port (integer)
    • server (string)
    • source_error (string)
  • stream_url (string)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_attributes (object)
    • comment (string)
    • favorite (boolean)
    • motion_alarm (boolean)
    • title (string)
Query Parameters:
 
  • name (string) – Camera name

User Management

Group Management

POST /vsaas/api/v2/groups

Creates group or groups

Request JSON Object Array:
 
  • title (string)
  • coordinates (string)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_user_slots (integer)
  • note (string)
  • postal_address (string)
  • streamer_id (integer)
Response JSON Object Array:
 
  • title (string)
  • coordinates (string)
  • id (integer)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_user_slots (integer)
  • note (string)
  • postal_address (string)
  • streamer_id (integer)
GET /vsaas/api/v2/groups

Returns a group

Response JSON Object Array:
 
  • title (string)
  • camera_count (integer)
  • can_manage_cameras (string)
  • can_manage_group (string)
  • can_manage_users (string)
  • coordinates (string)
  • id (integer)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_user_slots (integer)
  • note (string)
  • postal_address (string)
  • streamer_id (integer)
  • user_count (integer)
POST /vsaas/api/v2/groups/(int: group_id)/cameras/(path: name)/order

Modifies camera’s position inside a group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • name (string) – Camera name
PUT /vsaas/api/v2/groups/(int: group_id)/cameras/(path: name)

Modifies camera’s parameters inside a group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • name (string) – Camera name
DELETE /vsaas/api/v2/groups/(int: group_id)/cameras/(path: name)

Removes camera from group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • name (string) – Camera name
  • delete_camera – 1 or 0(default) - only for admins, removes camera entirely

(only if camera is not member of any other group)

GET /vsaas/api/v2/groups/(int: group_id)/cameras/(path: name)

Returns camera in the group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • name (string) – Camera name
Response JSON Object:
 
  • camera_id (string)
  • group_id (integer)
  • camera (object)
    • name (string): Stream identifier
    • access (string)
    • agent_id (string)
    • agent_key (string)
    • agent_model (string)
    • agent_serial (string)
    • agent_status (object)
      • connected_at (string)
      • id (string)
      • ip (string)
      • local_ip (string)
      • streampoint (string)
      • version (string)
    • comment (string)
    • coordinates (string)
    • dvr_depth (integer)
    • dvr_path (string)
    • dvr_protected (boolean)
    • dvr_space (integer)
    • enabled (boolean)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • motion_detector (boolean)
    • onvif_profile (string)
    • onvif_ptz (boolean)
    • onvif_url (string)
    • owner (string)
    • permissions (object)
      • dvr (boolean)
      • edit (boolean)
      • ptz (boolean)
      • view (boolean)
    • playback_config (object)
      • token (string)
    • postal_address (string)
    • server (string)
    • static (boolean)
    • stream_status (object)
      • alive (boolean)
      • bitrate (integer)
      • http_port (integer)
      • https_port (integer)
      • lifetime (integer)
      • rtmp_port (integer)
      • rtsp_port (integer)
      • server (string)
      • source_error (string)
    • stream_url (string)
    • substream_url (string)
    • thumbnails (boolean)
    • thumbnails_url (string)
    • title (string): Human readable title
    • user_attributes (object)
      • comment (string)
      • favorite (boolean)
      • motion_alarm (boolean)
      • title (string)
  • comment (string)
  • id (integer)
  • is_other_group_member (string)
  • order_num (integer)
POST /vsaas/api/v2/groups/(int: group_id)/cameras

Adds camera to group

Query Parameters:
 
  • group_id (string) – Group identifier
Request JSON Object:
 
  • camera_id (string) – Camera name
Response JSON Object:
 
  • camera_id (string)
  • group_id (integer)
  • camera (object)
    • name (string): Stream identifier
    • access (string)
    • agent_id (string)
    • agent_key (string)
    • agent_model (string)
    • agent_serial (string)
    • agent_status (object)
      • connected_at (string)
      • id (string)
      • ip (string)
      • local_ip (string)
      • streampoint (string)
      • version (string)
    • comment (string)
    • coordinates (string)
    • dvr_depth (integer)
    • dvr_path (string)
    • dvr_protected (boolean)
    • dvr_space (integer)
    • enabled (boolean)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • motion_detector (boolean)
    • onvif_profile (string)
    • onvif_ptz (boolean)
    • onvif_url (string)
    • owner (string)
    • permissions (object)
      • dvr (boolean)
      • edit (boolean)
      • ptz (boolean)
      • view (boolean)
    • playback_config (object)
      • token (string)
    • postal_address (string)
    • server (string)
    • static (boolean)
    • stream_status (object)
      • alive (boolean)
      • bitrate (integer)
      • http_port (integer)
      • https_port (integer)
      • lifetime (integer)
      • rtmp_port (integer)
      • rtsp_port (integer)
      • server (string)
      • source_error (string)
    • stream_url (string)
    • substream_url (string)
    • thumbnails (boolean)
    • thumbnails_url (string)
    • title (string): Human readable title
    • user_attributes (object)
      • comment (string)
      • favorite (boolean)
      • motion_alarm (boolean)
      • title (string)
  • comment (string)
  • id (integer)
  • order_num (integer)
GET /vsaas/api/v2/groups/(int: group_id)/cameras

Returns cameras belonging to the group

Response JSON Object:
 
  • camera_id (string)
  • group_id (integer)
  • camera (object)
    • name (string): Stream identifier
    • access (string)
    • agent_id (string)
    • agent_key (string)
    • agent_model (string)
    • agent_serial (string)
    • agent_status (object)
      • connected_at (string)
      • id (string)
      • ip (string)
      • local_ip (string)
      • streampoint (string)
      • version (string)
    • comment (string)
    • coordinates (string)
    • dvr_depth (integer)
    • dvr_path (string)
    • dvr_protected (boolean)
    • dvr_space (integer)
    • enabled (boolean)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • motion_detector (boolean)
    • onvif_profile (string)
    • onvif_ptz (boolean)
    • onvif_url (string)
    • owner (string)
    • permissions (object)
      • dvr (boolean)
      • edit (boolean)
      • ptz (boolean)
      • view (boolean)
    • playback_config (object)
      • token (string)
    • postal_address (string)
    • server (string)
    • static (boolean)
    • stream_status (object)
      • alive (boolean)
      • bitrate (integer)
      • http_port (integer)
      • https_port (integer)
      • lifetime (integer)
      • rtmp_port (integer)
      • rtsp_port (integer)
      • server (string)
      • source_error (string)
    • stream_url (string)
    • substream_url (string)
    • thumbnails (boolean)
    • thumbnails_url (string)
    • title (string): Human readable title
    • user_attributes (object)
      • comment (string)
      • favorite (boolean)
      • motion_alarm (boolean)
      • title (string)
  • comment (string)
  • id (integer)
  • is_other_group_member (string)
  • order_num (integer)
PUT /vsaas/api/v2/groups/(int: group_id)/users/(int: user_id)

Modifies user’s permissions inside a group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • user_id (integer) – User identifier
Request JSON Object:
 
  • group_id (integer)
  • user_id (integer)
  • can_dvr (boolean)
  • can_manage_cameras (boolean)
  • can_manage_users (boolean)
  • can_ptz (boolean)
  • comment (string)
  • id (integer)
  • order_num (integer)
Response JSON Object:
 
  • group_id (integer)
  • user_id (integer)
  • can_dvr (boolean)
  • can_manage_cameras (boolean)
  • can_manage_users (boolean)
  • can_ptz (boolean)
  • comment (string)
  • group (object)
    • title (string)
    • id (integer)
  • id (integer)
  • is_other_group_member (string)
  • order_num (integer)
  • user (object)
    • login (string)
    • dvr_allowed (boolean)
    • enabled (boolean)
    • id (integer)
    • is_admin (boolean)
  • usergroup_id (integer)
DELETE /vsaas/api/v2/groups/(int: group_id)/users/(int: user_id)

Removes user from group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • user_id (integer) – User identifier
  • delete_user – 1 or 0(default) - only for admins, removes user entirely

(only if user is not member of any other group)

GET /vsaas/api/v2/groups/(int: group_id)/users/(int: user_id)

Returns user in the group

Query Parameters:
 
  • group_id (integer) – Group identifier
  • user_id (integer) – User identifier
Response JSON Object:
 
  • group_id (integer)
  • user_id (integer)
  • can_dvr (boolean)
  • can_manage_cameras (boolean)
  • can_manage_users (boolean)
  • can_ptz (boolean)
  • comment (string)
  • group (object)
    • title (string)
    • id (integer)
  • id (integer)
  • is_other_group_member (string)
  • order_num (integer)
  • user (object)
    • login (string)
    • dvr_allowed (boolean)
    • enabled (boolean)
    • id (integer)
    • is_admin (boolean)
  • usergroup_id (integer)
POST /vsaas/api/v2/groups/(int: group_id)/users

Adds user to a group

Query Parameters:
 
  • id (string) – Group identifier
Request JSON Object:
 
  • group_id (integer)
  • user_id (integer)
  • can_dvr (boolean)
  • can_manage_cameras (boolean)
  • can_manage_users (boolean)
  • can_ptz (boolean)
  • comment (string)
  • id (integer)
  • order_num (integer)
Response JSON Object:
 
  • group_id (integer)
  • user_id (integer)
  • can_dvr (boolean)
  • can_manage_cameras (boolean)
  • can_manage_users (boolean)
  • can_ptz (boolean)
  • comment (string)
  • group (object)
    • title (string)
    • id (integer)
  • id (integer)
  • is_other_group_member (string)
  • order_num (integer)
  • user (object)
    • login (string)
    • dvr_allowed (boolean)
    • enabled (boolean)
    • id (integer)
    • is_admin (boolean)
  • usergroup_id (integer)
PUT /vsaas/api/v2/groups/(int: id)

Modifies a group

Query Parameters:
 
  • id (string) – Group fdentifier
Response JSON Object Array:
 
  • title (string)
  • coordinates (string)
  • id (integer)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_user_slots (integer)
  • note (string)
  • postal_address (string)
  • streamer_id (integer)
DELETE /vsaas/api/v2/groups/(int: id)

Deletes a group

Query Parameters:
 
  • id (string) – Group identifier
GET /vsaas/api/v2/groups/(int: id)

Returns a group list

Response JSON Object Array:
 
  • title (string)
  • camera_count (integer)
  • can_manage_cameras (string)
  • can_manage_group (string)
  • can_manage_users (string)
  • coordinates (string)
  • id (integer)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_user_slots (integer)
  • note (string)
  • postal_address (string)
  • streamer_id (integer)
  • users (object array)
    • group_id (integer)
    • user_id (integer)
    • can_dvr (boolean)
    • can_manage_cameras (boolean)
    • can_manage_users (boolean)
    • can_ptz (boolean)
    • comment (string)
    • is_other_group_member (string)
    • order_num (integer)
    • user (object)
      • login (string)
      • dvr_allowed (boolean)
      • enabled (boolean)
      • id (integer)
      • is_admin (boolean)
    • usergroup_id (integer)

Events

POST /vsaas/api/v2/streamer_events
POST /vsaas/api/v2/events

Registers events

Authentication via an API key is required

Request JSON Object Array:
 
  • camera (object)
    • name (string): Stream identifier
    • access (string)
    • agent_id (string)
    • agent_key (string)
    • agent_model (string)
    • agent_serial (string)
    • agent_status (object)
      • connected_at (string)
      • id (string)
      • ip (string)
      • local_ip (string)
      • streampoint (string)
      • version (string)
    • comment (string)
    • coordinates (string)
    • dvr_depth (integer)
    • dvr_path (string)
    • dvr_protected (boolean)
    • dvr_space (integer)
    • enabled (boolean)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • motion_detector (boolean)
    • onvif_profile (string)
    • onvif_ptz (boolean)
    • onvif_url (string)
    • owner (string)
    • permissions (object)
      • dvr (boolean)
      • edit (boolean)
      • ptz (boolean)
      • view (boolean)
    • playback_config (object)
      • token (string)
    • postal_address (string)
    • server (string)
    • static (boolean)
    • stream_status (object)
      • alive (boolean)
      • bitrate (integer)
      • http_port (integer)
      • https_port (integer)
      • lifetime (integer)
      • rtmp_port (integer)
      • rtsp_port (integer)
      • server (string)
      • source_error (string)
    • stream_url (string)
    • substream_url (string)
    • thumbnails (boolean)
    • thumbnails_url (string)
    • title (string): Human readable title
    • user_attributes (object)
      • comment (string)
      • favorite (boolean)
      • motion_alarm (boolean)
      • title (string)
  • camera_id (string)
  • end_at (integer)
  • event_data (string)
  • events_count (integer)
  • ext_data (string)
  • id (string)
  • object_class (string)
  • object_id (string)
  • source (string)
  • source_id (string)
  • start_at (integer)
  • type (string)
Response JSON String Array:
 

List of identifiers of received events

GET /vsaas/api/v2/events

Returns list of events

Response JSON Object Array:
 
  • camera (object)
    • name (string): Stream identifier
    • access (string)
    • agent_id (string)
    • agent_key (string)
    • agent_model (string)
    • agent_serial (string)
    • agent_status (object)
      • connected_at (string)
      • id (string)
      • ip (string)
      • local_ip (string)
      • streampoint (string)
      • version (string)
    • comment (string)
    • coordinates (string)
    • dvr_depth (integer)
    • dvr_path (string)
    • dvr_protected (boolean)
    • dvr_space (integer)
    • enabled (boolean)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • motion_detector (boolean)
    • onvif_profile (string)
    • onvif_ptz (boolean)
    • onvif_url (string)
    • owner (string)
    • permissions (object)
      • dvr (boolean)
      • edit (boolean)
      • ptz (boolean)
      • view (boolean)
    • playback_config (object)
      • token (string)
    • postal_address (string)
    • server (string)
    • static (boolean)
    • stream_status (object)
      • alive (boolean)
      • bitrate (integer)
      • http_port (integer)
      • https_port (integer)
      • lifetime (integer)
      • rtmp_port (integer)
      • rtsp_port (integer)
      • server (string)
      • source_error (string)
    • stream_url (string)
    • substream_url (string)
    • thumbnails (boolean)
    • thumbnails_url (string)
    • title (string): Human readable title
    • user_attributes (object)
      • comment (string)
      • favorite (boolean)
      • motion_alarm (boolean)
      • title (string)
  • camera_id (string)
  • end_at (integer)
  • event_data (string)
  • events_count (integer)
  • ext_data (string)
  • id (string)
  • object_class (string)
  • object_id (string)
  • source (string)
  • source_id (string)
  • start_at (integer)
  • type (string)

Mosaics

POST /vsaas/api/v2/mosaics

Creates a mosaic

Request JSON Object:
 
  • title (string)
  • type (string)
  • cameras (string)
  • visible (boolean)
GET /vsaas/api/v2/mosaics

Returns a list of mosaics

Response JSON Object Array:
 
  • id (integer)
  • title (string)
  • type (string)
  • visible (boolean)
PUT /vsaas/api/v2/mosaics/(int: mosaic_id)

Update a mosaic

Query Parameters:
 
  • mosaic_id (integer) – Mosaic identifier
Request JSON Object:
 
  • title (string)
  • type (string)
  • cameras (string)
  • visible (boolean)
Response JSON Object:
 
  • id (integer)
  • title (string)
  • type (string)
  • cameras (string)
  • visible (boolean)
DELETE /vsaas/api/v2/mosaics/(int: mosaic_id)

Removes mosaic

Query Parameters:
 
  • mosaic_id (integer) – Mosaic identifier
GET /vsaas/api/v2/mosaics/(int: mosaic_id)

Returns a single mosaic

Query Parameters:
 
  • mosaic_id (integer) – Mosaic identifier
Response JSON Object:
 
  • id (integer)
  • title (string)
  • type (string)
  • cameras (string)
  • visible (boolean)

Streamers

POST /vsaas/api/v2/streamers

Creates a streamer

Request JSON Object:
 
  • cluster_key (string)
  • dvr_path (string)
  • hostname (string)
  • port (string)
GET /vsaas/api/v2/streamers

Returns list of streamers

Response JSON Object Array:
 
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • health_warnings (array)
  • hostname (string)
  • id (string)
  • is_backup (string)
  • is_filling (string)
  • max_bitrate (integer)
  • port (string)
  • server_status (object)
    • error (string)
    • fetched_at (string)
    • http_port (string)
    • https_port (string)
    • is_remote (string)
    • load (string)
    • rtmp_port (string)
    • rtsp_port (string)
    • uptime (string)
POST /vsaas/api/v2/streamers/(int: streamer_id)/provision

Provision streamer to flussonic

Query Parameters:
 
  • streamer_id (integer) – Streamer identifier
GET /vsaas/api/v2/streamers/(streamer_id)/cameras
GET /vsaas/api/v2/streamers/(streamer_id)/agents
PUT /vsaas/api/v2/streamers/(int: streamer_id)

Modifies streamer

Query Parameters:
 
  • streamer_id (integer) – Streamer identifier
Request JSON Object Array:
 
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • health_warnings (array)
  • hostname (string)
  • is_backup (string)
  • is_filling (string)
  • max_bitrate (integer)
  • port (string)
Response JSON Object Array:
 
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • health_warnings (array)
  • hostname (string)
  • id (string)
  • is_backup (string)
  • is_filling (string)
  • max_bitrate (integer)
  • port (string)
  • server_status (object)
    • error (string)
    • fetched_at (string)
    • http_port (string)
    • https_port (string)
    • is_remote (string)
    • load (string)
    • rtmp_port (string)
    • rtsp_port (string)
    • uptime (string)
DELETE /vsaas/api/v2/streamers/(int: streamer_id)

Removes streamer

Query Parameters:
 
  • streamer_id (integer) – Streamer identifier
GET /vsaas/api/v2/streamers/(int: streamer_id)

Returns a single streamer

Query Parameters:
 
  • streamer_id (integer) – Streamer identifier
Response JSON Object:
 
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • health_warnings (array)
  • hostname (string)
  • id (string)
  • is_backup (string)
  • is_filling (string)
  • max_bitrate (integer)
  • port (string)
  • server_status (object)
    • error (string)
    • fetched_at (string)
    • http_port (string)
    • https_port (string)
    • is_remote (string)
    • load (string)
    • rtmp_port (string)
    • rtsp_port (string)
    • uptime (string)

Settings

POST /vsaas/api/v2/settings/initial

Create admin (available only on firts run, if inital config was already comleted returns 403 error)

Request Object:
  • login (string)
  • password1 (string)
  • password2 (string)
Response JSON Object:
 
  • login (string) – User’s login
  • session (string) – SessionId
  • is_admin (bool) –
  • notification_email (string) –
PUT /vsaas/api/v2/settings

Update settings

Request Object:
  • brand_background_color (string)
  • brand_footer_address (string)
  • brand_footer_color (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header1_color (string)
  • brand_header2_color (string)
  • brand_info_text (string)
  • brand_page_title (string)
  • brand_player_border_color (string)
  • custom_auth_logo (object)
    • b64_content (string): Image data(load only)
    • delete (boolean): Delete previous file(load only)
    • mime_type (string): Mime type of image(load only)
    • url (string): Image url(dump only)
  • custom_logo (object)
    • b64_content (string): Image data(load only)
    • delete (boolean): Delete previous file(load only)
    • mime_type (string): Mime type of image(load only)
    • url (string): Image url(dump only)
  • global_allow_registration (boolean)
  • global_anonymous_access (boolean)
  • global_auth_backend (string)
  • global_dashboard_type (string)
  • global_demo_access (boolean)
  • global_dvr_path (string)
  • global_ga_key (string)
  • global_homepage (string)
  • global_homepage_guest (string)
  • global_serial_binding_enabled (boolean)
  • map_center (string)
  • map_gmap_key (string)
  • map_language (string)
  • map_provider (string)
  • map_show_in_nav (boolean)
  • peeklio_disable_notifications (boolean)
  • peeklio_license_id (string)
Response JSON Object:
 
  • api_key (string)
  • brand_background_color (string)
  • brand_footer_address (string)
  • brand_footer_color (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header1_color (string)
  • brand_header2_color (string)
  • brand_info_text (string)
  • brand_page_title (string)
  • brand_player_border_color (string)
  • custom_auth_logo (object)
    • b64_content (string): Image data(load only)
    • delete (boolean): Delete previous file(load only)
    • mime_type (string): Mime type of image(load only)
    • url (string): Image url(dump only)
  • custom_logo (object)
    • b64_content (string): Image data(load only)
    • delete (boolean): Delete previous file(load only)
    • mime_type (string): Mime type of image(load only)
    • url (string): Image url(dump only)
  • global_allow_registration (boolean)
  • global_anonymous_access (boolean)
  • global_auth_backend (string)
  • global_dashboard_type (string)
  • global_demo_access (boolean)
  • global_dvr_path (string)
  • global_ga_key (string)
  • global_homepage (string)
  • global_homepage_guest (string)
  • global_serial_binding_enabled (boolean)
  • map_center (string)
  • map_gmap_key (string)
  • map_language (string)
  • map_provider (string)
  • map_show_in_nav (boolean)
  • motion_detector (boolean)
  • peeklio_disable_notifications (boolean)
  • peeklio_license_id (string)
  • service (boolean)
GET /vsaas/api/v2/settings

Get settings

Response JSON Object:
 
  • api_key (string)
  • brand_background_color (string)
  • brand_footer_address (string)
  • brand_footer_color (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header1_color (string)
  • brand_header2_color (string)
  • brand_info_text (string)
  • brand_page_title (string)
  • brand_player_border_color (string)
  • custom_auth_logo (object)
    • b64_content (string): Image data(load only)
    • delete (boolean): Delete previous file(load only)
    • mime_type (string): Mime type of image(load only)
    • url (string): Image url(dump only)
  • custom_logo (object)
    • b64_content (string): Image data(load only)
    • delete (boolean): Delete previous file(load only)
    • mime_type (string): Mime type of image(load only)
    • url (string): Image url(dump only)
  • global_allow_registration (boolean)
  • global_anonymous_access (boolean)
  • global_auth_backend (string)
  • global_dashboard_type (string)
  • global_demo_access (boolean)
  • global_dvr_path (string)
  • global_ga_key (string)
  • global_homepage (string)
  • global_homepage_guest (string)
  • global_serial_binding_enabled (boolean)
  • map_center (string)
  • map_gmap_key (string)
  • map_language (string)
  • map_provider (string)
  • map_show_in_nav (boolean)
  • motion_detector (boolean)
  • peeklio_disable_notifications (boolean)
  • peeklio_license_id (string)
  • service (boolean)

User Serials

POST /vsaas/api/v2/user-serials

Create UserSerial

Request Headers:
 
Request JSON Object:
 
  • owner (string)
  • serial (string)
GET /vsaas/api/v2/user-serials

Returns list of UserSerials

Response JSON Object Array:
 
  • owner (string)
  • serial (string)
PUT /vsaas/api/v2/user-serials/(path: serial)

Modifies UserSerial

Query Parameters:
 
  • serial (integer) – Serial number
Request JSON Object:
 
  • owner (string)
  • serial (string)
Response JSON Object:
 
  • owner (string)
  • serial (string)
DELETE /vsaas/api/v2/user-serials/(path: serial)

Removes UserSerial

Query Parameters:
 
  • serial (integer) – Serial number
GET /vsaas/api/v2/user-serials/(path: serial)

Returns a single UserSerial

Query Parameters:
 
  • serial (integer) – Serial number
Response JSON Object:
 
  • owner (string)
  • serial (string)

Event Notifications

POST /vsaas/api/v2/my/subscriptions/camera_motion

Upserts a new event subscription

Request JSON Object:
 
  • notification_type (string)
  • camera_id (string)
  • streamer_id (integer)
Response JSON Object:
 
  • event_type (string)
  • notification_type (string)
  • camera (object)
    • name (string): Stream identifier
    • title (string): Human readable title
  • id (integer)
  • streamer (object)
    • hostname (string)
    • id (string)
POST /vsaas/api/v2/my/subscriptions

Upserts a new event subscription

Request JSON Object:
 
  • event_type (string)
  • notification_type (string)
  • camera_id (string)
  • streamer_id (integer)
Response JSON Object:
 
  • event_type (string)
  • notification_type (string)
  • camera (object)
    • name (string): Stream identifier
    • title (string): Human readable title
  • id (integer)
  • streamer (object)
    • hostname (string)
    • id (string)
GET /vsaas/api/v2/my/subscriptions

Returns a list of event subscriptions

Response JSON Object Array:
 
  • event_type (string)
  • notification_type (string)
  • camera (object)
    • name (string): Stream identifier
    • title (string): Human readable title
  • id (integer)
  • streamer (object)
    • hostname (string)
    • id (string)
POST /vsaas/api/v2/my/device-tokens

Upserts a new device token

Request JSON Object:
 
  • device_platform (string)
  • token (string)
  • device_model (string)
  • device_version (string)
Response JSON Object:
 
  • device_platform (string)
  • token (string)
  • device_model (string)
  • device_version (string)
  • events_pending (integer)
  • events_sent (integer)
  • last_confirm_at (integer)
GET /vsaas/api/v2/my/device-tokens

Returns a list of device tokens

Response JSON Object Array:
 
  • device_platform (string)
  • token (string)
  • device_model (string)
  • device_version (string)
  • events_pending (integer)
  • events_sent (integer)
  • last_confirm_at (integer)
DELETE /vsaas/api/v2/my/subscriptions/camera_motion/(path: camera_id)
POST /vsaas/api/v2/my/device-tokens/(string: token)/confirm

Should be called by a device when notification is received

Request Headers:
 
  • X-Vsaas-Session string – User’s session key
Request JSON Object:
 
  • token (string) – Device token to confirm
DELETE /vsaas/api/v2/my/subscriptions/(int: id)
GET /vsaas/api/v2/my/subscriptions/(int: id)

Returns an event subscription info

Query Parameters:
 
  • id (string) – Subscription id
Response JSON Object:
 
  • event_type (string)
  • notification_type (string)
  • camera (object)
    • name (string): Stream identifier
    • title (string): Human readable title
  • id (integer)
  • streamer (object)
    • hostname (string)
    • id (string)
DELETE /vsaas/api/v2/my/device-tokens/(string: token)
GET /vsaas/api/v2/my/device-tokens/(string: token)

Returns a device token info

Response JSON Object:
 
  • device_platform (string)
  • token (string)
  • device_model (string)
  • device_version (string)
  • events_pending (integer)
  • events_sent (integer)
  • last_confirm_at (integer)