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

Authentication

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
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/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/login

Logs user in

Request JSON Object:
 
  • login (string) – User login
  • password (string) – User password
Response JSON Object:
 
  • groups_count (string)
  • groups_membership (string)
  • is_admin (boolean)
  • is_logged_in (string)
  • login (string)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • notification_email (string)
  • session (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) –
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

Camera Management

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)
  • external_id (string)
  • extrenal_id (string)
  • group_id (integer)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (string)
  • 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
  • vision_areas (string)
  • vision_enabled (boolean)
  • vision_gpu (integer)
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)
  • external_id (string)
  • extrenal_id (string)
  • group_id (integer)
  • groups (object array)
    • id (string)
    • title (string)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (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)
  • vision_areas (string)
  • vision_enabled (boolean)
  • vision_gpu (integer)
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)
  • external_id (string)
  • extrenal_id (string)
  • group_id (integer)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (string)
  • 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
  • vision_areas (string)
  • vision_enabled (boolean)
  • vision_gpu (integer)
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)
  • external_id (string)
  • extrenal_id (string)
  • group_id (integer)
  • groups (object array)
    • id (string)
    • title (string)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (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)
  • vision_areas (string)
  • vision_enabled (boolean)
  • vision_gpu (integer)
Query Parameters:
 
  • name (string) – Camera name
POST /vsaas/api/v2/cameras/(path: name)/agent-disconnect

Disconnect camera agent

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
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
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)
  • external_id (string)
  • extrenal_id (string)
  • login (string): camera owner’s username
  • max_cam_slots (integer): is max cam slots for owner
  • max_dvr_days (integer): is max dvr days for owner
  • max_dvr_space (integer): is max dvr space for owner
  • 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

User Management

POST /vsaas/api/v2/users

Adds user

Request Headers:
 
Request JSON Object:
 
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • camera_count (string)
  • dvr_allowed (boolean)
  • enabled (boolean)
  • external_id (string)
  • group_id (integer)
  • is_admin (boolean)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • note (string)
  • notification_email (string)
  • password (string)
GET /vsaas/api/v2/users

Returns a user list

Response JSON Object Array:
 
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • camera_count (string)
  • dvr_allowed (boolean)
  • enabled (boolean)
  • external_id (string)
  • group_id (integer)
  • groups (object array)
    • group_id (integer)
    • can_dvr (boolean)
    • can_manage_cameras (boolean)
    • can_manage_users (boolean)
    • can_ptz (boolean)
    • comment (string)
    • group (object)
      • title (string)
      • camera_count (integer)
      • can_manage_cameras (string)
      • can_manage_group (string)
      • can_manage_users (string)
      • id (integer)
      • note (string)
      • user_count (integer)
    • order_num (integer)
    • usergroup_id (integer)
  • id (integer)
  • is_admin (boolean)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • note (string)
  • notification_email (string)
  • password (string)
PUT /vsaas/api/v2/users/(int: id)

Modifies user

Query Parameters:
 
  • id (integer) – User identifier
Request JSON Object:
 
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • dvr_allowed (boolean)
  • enabled (boolean)
  • external_id (string)
  • is_admin (boolean)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • note (string)
  • notification_email (string)
  • password (string)
Response JSON Object:
 
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • dvr_allowed (boolean)
  • enabled (boolean)
  • external_id (string)
  • group_id (integer)
  • id (integer)
  • is_admin (boolean)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • note (string)
  • notification_email (string)
  • password (string)
DELETE /vsaas/api/v2/users/(int: id)

Removes user

Query Parameters:
 
  • id (integer) – User identifier
GET /vsaas/api/v2/users/(int: id)

Returns a single user

Query Parameters:
 
  • id (integer) – User identifier
Response JSON Object:
 
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • camera_count (string)
  • dvr_allowed (boolean)
  • enabled (boolean)
  • external_id (string)
  • group_id (integer)
  • groups (object array)
    • group_id (integer)
    • can_dvr (boolean)
    • can_manage_cameras (boolean)
    • can_manage_users (boolean)
    • can_ptz (boolean)
    • comment (string)
    • group (object)
      • title (string)
      • camera_count (integer)
      • can_manage_cameras (string)
      • can_manage_group (string)
      • can_manage_users (string)
      • id (integer)
      • note (string)
      • user_count (integer)
    • order_num (integer)
    • usergroup_id (integer)
  • id (integer)
  • is_admin (boolean)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • note (string)
  • notification_email (string)
  • password (string)
GET /vsaas/api/v2/users/(int: user_id)/cameras

Returns list of user’s cameras

Request JSON Object Array:
 
  • 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)
  • external_id (string)
  • extrenal_id (string)
  • group_id (integer)
  • groups (object array)
    • id (string)
    • title (string)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (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)
  • vision_areas (string)
  • vision_enabled (boolean)
  • vision_gpu (integer)
Query Parameters:
 
  • id (integer) – User identifier
POST /vsaas/api/v2/users/import

Import collection of users

Request Headers:
 
Request JSON Object Array:
 
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • dvr_allowed (boolean)
  • enabled (boolean)
  • external_id (string)
  • group_id (integer)
  • groups (array)
  • is_admin (boolean)
  • max_cam_slots (integer)
  • max_dvr_days (integer)
  • max_dvr_space (integer)
  • note (string)
  • notification_email (string)
  • password (string)

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_dvr_space (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_dvr_space (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_dvr_space (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

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)
    • external_id (string)
    • extrenal_id (string)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • last_change (object)
      • created_at (integer)
      • object_id (string)
      • object_type (string)
      • user (string)
    • last_event_time (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)
    • vision_areas (string)
    • vision_enabled (boolean)
    • vision_gpu (integer)
  • 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)
    • external_id (string)
    • extrenal_id (string)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • last_change (object)
      • created_at (integer)
      • object_id (string)
      • object_type (string)
      • user (string)
    • last_event_time (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)
    • vision_areas (string)
    • vision_enabled (boolean)
    • vision_gpu (integer)
  • comment (string)
  • id (integer)
  • is_other_group_member (string)
  • order_num (integer)
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)
    • external_id (string)
    • extrenal_id (string)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • last_change (object)
      • created_at (integer)
      • object_id (string)
      • object_type (string)
      • user (string)
    • last_event_time (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)
    • vision_areas (string)
    • vision_enabled (boolean)
    • vision_gpu (integer)
  • comment (string)
  • id (integer)
  • is_other_group_member (string)
  • order_num (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
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: 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)
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_dvr_space (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_dvr_space (integer)
  • max_user_slots (integer)
  • note (string)
  • postal_address (string)
  • streamer (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/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)
    • external_id (string)
    • extrenal_id (string)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • last_change (object)
      • created_at (integer)
      • object_id (string)
      • object_type (string)
      • user (string)
    • last_event_time (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)
    • vision_areas (string)
    • vision_enabled (boolean)
    • vision_gpu (integer)
  • camera_id (string)
  • end_at (integer)
  • event_data (string)
  • events_count (integer)
  • ext_data (string)
  • id (string)
  • object_action (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)
    • external_id (string)
    • extrenal_id (string)
    • group_id (integer)
    • groups (object array)
      • id (string)
      • title (string)
    • last_change (object)
      • created_at (integer)
      • object_id (string)
      • object_type (string)
      • user (string)
    • last_event_time (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)
    • vision_areas (string)
    • vision_enabled (boolean)
    • vision_gpu (integer)
  • camera_id (string)
  • end_at (integer)
  • event_data (string)
  • events_count (integer)
  • ext_data (string)
  • id (string)
  • object_action (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)
  • 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)
  • server_warnings (array)
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)
  • hostname (string)
  • is_backup (string)
  • is_filling (string)
  • max_bitrate (integer)
  • port (string)
  • server_warnings (array)
Response JSON Object Array:
 
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • 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)
  • server_warnings (array)
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)
  • 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)
  • server_warnings (array)
POST /vsaas/api/v2/streamers/(int: streamer_id)/provision

Provision streamer to flussonic

Query Parameters:
 
  • streamer_id (integer) – Streamer identifier

Settings

PUT /vsaas/api/v2/settings

Update settings

Request Object:
  • brand_background_color (string)
  • brand_footer_address (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header_color (string)
  • brand_info_text (string)
  • brand_page_title (string)
  • brand_sidebar_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)
  • global_use_v1_ui (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)
  • usages_avalilable (boolean)
Response JSON Object:
 
  • api_key (string)
  • brand_background_color (string)
  • brand_footer_address (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header_color (string)
  • brand_info_text (string)
  • brand_page_title (string)
  • brand_sidebar_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)
  • global_use_v1_ui (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)
  • usages_avalilable (boolean)
GET /vsaas/api/v2/settings

Get settings

Response JSON Object:
 
  • api_key (string)
  • brand_background_color (string)
  • brand_footer_address (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header_color (string)
  • brand_info_text (string)
  • brand_page_title (string)
  • brand_sidebar_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)
  • global_use_v1_ui (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)
  • usages_avalilable (boolean)
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) –