API v2 Reference

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
  • can_edit_organizations (bool)
  • can_edit_settings (bool)
  • can_view_organizations (bool)
  • domain_id (int)
  • id (integer)
  • is_admin (boolean)
  • is_domain_admin (bool)
  • is_logged_in (bool)
  • is_organization_admin (bool)
  • locale (string)
  • login (string)
  • notification_email (string)
  • organizations (list)
  • server_info (dict)
  • session (str)
  • settings (object)
    • brand_accent_color (string)
    • brand_background_color (string)
    • brand_error_color (string)
    • brand_footer_address (string)
    • brand_footer_phone (string)
    • brand_footer_work_hours (string)
    • brand_header_color (string)
    • brand_info_text (string)
    • brand_inverted_text_color (string)
    • brand_page_title (string)
    • brand_sidebar_color (string)
    • brand_success_color (string)
    • brand_text_dark_color (string)
    • brand_text_light_color (string)
    • brand_warning_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 (str): Image url(dump only)
    • custom_favicon (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 (str): 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 (str): Image url(dump only)
    • global_demo_access (boolean)
    • global_ga_key (string)
    • global_homepage (string)
    • global_homepage_guest (string)
    • map_center (string)
    • map_gmap_key (string)
    • map_language (string)
    • map_osm_url (string)
    • map_provider (string)
    • map_show_in_nav (boolean)
    • peeklio_license_id (integer)
    • service (boolean)
  • unread_messages_count (int)
  • user_settings (object)
    • camera_list_display_mode (string)
    • favorites_list_display_mode (string)
    • group_camera_add_display_mode (string)
    • group_camera_list_display_mode (string)
    • user_camera_list_display_mode (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

Cameras

POST /vsaas/api/v2/cameras

Creates a camera

Request JSON Object
  • name (string): Stream identifier
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • enabled (boolean)
  • extrenal_id (string)
  • folder_coordinates (string)
  • folder_id (integer)
  • group_id (integer)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (int)
  • motion_detector_enabled (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • organization_id (integer)
  • postal_address (string)
  • preset (object)
    • domain_id (integer)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • is_default (boolean)
    • is_deleted (boolean)
    • vision_params (None)
  • preset_id (integer)
  • static (boolean)
  • stream_url (string)
  • streamer_id (integer)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • video_only (boolean): Do not use audio track
  • 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
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • agent_status (object)
    • connected_at (integer)
    • id (string)
    • ip (string)
    • local_ip (string)
    • streampoint (string)
    • version (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • enabled (boolean)
  • extrenal_id (string)
  • folder_coordinates (string)
  • folder_id (integer)
  • group_id (integer)
  • groups (None)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (int)
  • motion_detector_enabled (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • organization_id (integer)
  • permissions (object)
    • dvr (boolean)
    • edit (boolean)
    • ptz (boolean)
    • view (boolean)
  • playback_config (object)
    • token (string)
  • postal_address (string)
  • preset (object)
    • domain_id (integer)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • is_default (boolean)
    • is_deleted (boolean)
    • vision_params (None)
  • preset_id (integer)
  • static (boolean)
  • stream_status (object)
    • alive (boolean)
    • bitrate (integer)
    • http_port (integer)
    • https_port (integer)
    • lifetime (integer)
    • server (string)
    • source_error (string)
  • stream_url (string)
  • streamer_id (integer)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_attributes (object)
    • favorite (boolean)
    • motion_alarm (boolean)
  • video_only (boolean): Do not use audio track
  • vision_areas (string)
  • vision_enabled (boolean)
  • vision_gpu (integer)
PUT /vsaas/api/v2/cameras/(path: name)

Change camera

Request JSON Object
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • enabled (boolean)
  • extrenal_id (string)
  • folder_coordinates (string)
  • folder_id (integer)
  • group_id (integer)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (int)
  • motion_detector_enabled (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • organization_id (integer)
  • postal_address (string)
  • preset (object)
    • domain_id (integer)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • is_default (boolean)
    • is_deleted (boolean)
    • vision_params (None)
  • preset_id (integer)
  • static (boolean)
  • stream_url (string)
  • streamer_id (integer)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • video_only (boolean): Do not use audio track
  • 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
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • agent_status (object)
    • connected_at (integer)
    • id (string)
    • ip (string)
    • local_ip (string)
    • streampoint (string)
    • version (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • enabled (boolean)
  • extrenal_id (string)
  • folder_coordinates (string)
  • folder_id (integer)
  • group_id (integer)
  • groups (None)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (int)
  • motion_detector_enabled (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • organization_id (integer)
  • permissions (object)
    • dvr (boolean)
    • edit (boolean)
    • ptz (boolean)
    • view (boolean)
  • playback_config (object)
    • token (string)
  • postal_address (string)
  • preset (object)
    • domain_id (integer)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • is_default (boolean)
    • is_deleted (boolean)
    • vision_params (None)
  • preset_id (integer)
  • static (boolean)
  • stream_status (object)
    • alive (boolean)
    • bitrate (integer)
    • http_port (integer)
    • https_port (integer)
    • lifetime (integer)
    • server (string)
    • source_error (string)
  • stream_url (string)
  • streamer_id (integer)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_attributes (object)
    • favorite (boolean)
    • motion_alarm (boolean)
  • video_only (boolean): Do not use audio track
  • 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
  • favorite (boolean)
  • motion_alarm (boolean)
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
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • can_ptz (boolean)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • enabled (boolean)
  • extrenal_id (string)
  • folder_coordinates (string)
  • folder_id (integer)
  • login (string): camera owner’s username
  • motion_detector_enabled (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • organization_id (integer)
  • password (string): camera owner’s password
  • postal_address (string)
  • preset_id (integer)
  • static (boolean)
  • stream_url (string)
  • streamer_id (integer)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_enabled (boolean): is camera owner enabled
  • video_only (boolean): Do not use audio track

Users

POST /vsaas/api/v2/users

Adds user

Request Headers
Request JSON Object
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • can_edit_organizations (bool)
  • can_edit_settings (bool)
  • can_view_organizations (bool)
  • domain_id (integer)
  • enabled (boolean)
  • external_id (string)
  • is_admin (boolean)
  • locale (string)
  • max_sessions (integer)
  • monitoring (boolean)
  • name (string)
  • note (string)
  • notification_email (string (email))
  • organization_id (integer)
  • organizations (list)
  • password (string)
  • phone (string)
GET /vsaas/api/v2/users

Returns a user list

Response JSON Object Array
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • can_edit_organizations (bool)
  • can_edit_settings (bool)
  • can_view_organizations (bool)
  • domain_id (integer)
  • enabled (boolean)
  • external_id (string)
  • id (integer)
  • is_admin (boolean)
  • locale (string)
  • max_sessions (integer)
  • monitoring (boolean)
  • name (string)
  • note (string)
  • notification_email (string (email))
  • organization_id (integer)
  • organizations (list)
  • password (string)
  • phone (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)
  • enabled (boolean)
  • external_id (string)
  • is_admin (boolean)
  • locale (string)
  • max_sessions (integer)
  • monitoring (boolean)
  • name (string)
  • note (string)
  • notification_email (string (email))
  • organization_id (integer)
  • password (string)
  • phone (string)
Response JSON Object
  • login (string)
  • apikey (string)
  • authorized_ip (string)
  • enabled (boolean)
  • external_id (string)
  • id (integer)
  • is_admin (boolean)
  • locale (string)
  • max_sessions (integer)
  • monitoring (boolean)
  • name (string)
  • note (string)
  • notification_email (string (email))
  • organization_id (integer)
  • password (string)
  • phone (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)
  • can_edit_organizations (bool)
  • can_edit_settings (bool)
  • can_view_organizations (bool)
  • domain_id (integer)
  • enabled (boolean)
  • external_id (string)
  • id (integer)
  • is_admin (boolean)
  • locale (string)
  • max_sessions (integer)
  • monitoring (boolean)
  • name (string)
  • note (string)
  • notification_email (string (email))
  • organization_id (integer)
  • organizations (list)
  • password (string)
  • phone (string)
GET /vsaas/api/v2/users/(int: user_id)/cameras

Returns list of user’s cameras

Request JSON Object Array
  • name (string): Stream identifier
  • agent_id (string)
  • agent_key (string)
  • agent_model (string)
  • agent_serial (string)
  • agent_status (object)
    • connected_at (integer)
    • id (string)
    • ip (string)
    • local_ip (string)
    • streampoint (string)
    • version (string)
  • comment (string)
  • coordinates (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • enabled (boolean)
  • extrenal_id (string)
  • folder_coordinates (string)
  • folder_id (integer)
  • group_id (integer)
  • groups (None)
  • last_change (object)
    • created_at (integer)
    • object_id (string)
    • object_type (string)
    • user (string)
  • last_event_time (int)
  • motion_detector_enabled (boolean)
  • onvif_profile (string)
  • onvif_ptz (boolean)
  • onvif_url (string)
  • organization_id (integer)
  • permissions (object)
    • dvr (boolean)
    • edit (boolean)
    • ptz (boolean)
    • view (boolean)
  • playback_config (object)
    • token (string)
  • postal_address (string)
  • preset (object)
    • domain_id (integer)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • is_default (boolean)
    • is_deleted (boolean)
    • vision_params (None)
  • preset_id (integer)
  • static (boolean)
  • stream_status (object)
    • alive (boolean)
    • bitrate (integer)
    • http_port (integer)
    • https_port (integer)
    • lifetime (integer)
    • server (string)
    • source_error (string)
  • stream_url (string)
  • streamer_id (integer)
  • substream_url (string)
  • thumbnails (boolean)
  • thumbnails_url (string)
  • title (string): Human readable title
  • user_attributes (object)
    • favorite (boolean)
    • motion_alarm (boolean)
  • video_only (boolean): Do not use audio track
  • 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)
  • enabled (boolean)
  • external_id (string)
  • is_admin (boolean)
  • locale (string)
  • max_sessions (integer)
  • monitoring (boolean)
  • name (string)
  • note (string)
  • notification_email (string (email))
  • organization_id (integer)
  • password (string)
  • phone (string)

Organizations

POST /vsaas/api/v2/domains/(int: domain_id)/organizations
POST /vsaas/api/v2/organizations

Adds organization

Query Parameters
  • domain_id (integer) – Domain identifier

Request JSON Object
  • title (string)
  • camera_limit (integer)
  • dvr_limit (integer)
  • owner_id (integer)
  • user_limit (integer)
GET /vsaas/api/v2/domains/(int: domain_id)/organizations
GET /vsaas/api/v2/organizations

Returns list of domain organizations

Query Parameters
  • domain_id (integer) – Domain identifier

Response JSON Object Array
  • title (string)
  • camera_count (integer)
  • camera_limit (integer)
  • can_edit_cameras (bool)
  • can_edit_users (bool)
  • can_view_stats (bool)
  • dvr_limit (integer)
  • id (integer)
  • is_default (bool)
  • is_member (bool)
  • mosaic_count (integer)
  • owner (object)
    • login (string)
    • id (integer)
  • owner_id (integer)
  • user_count (integer)
  • user_limit (integer)
PUT /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)
PUT /vsaas/api/v2/organizations/(int: organization_id)

Update an organization

Query Parameters
  • domain_id (integer) – Domain identifier

  • organization_id (integer) – Organization identifier

Request JSON Object
  • title (string)
  • camera_limit (integer)
  • dvr_limit (integer)
  • owner_id (integer)
  • user_limit (integer)
Response JSON Object
  • title (string)
  • camera_limit (integer)
  • dvr_limit (integer)
  • id (integer)
  • owner (object)
    • login (string)
    • id (integer)
  • owner_id (integer)
  • user_limit (integer)
DELETE /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)
DELETE /vsaas/api/v2/organizations/(int: organization_id)

Removes organization

Query Parameters
  • domain_id (integer) – Domain identifier

  • organization_id (integer) – Organization identifier

GET /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)
GET /vsaas/api/v2/organizations/(int: organization_id)

Returns a single organization

Query Parameters
  • domain_id (integer) – Domain identifier

  • organization_id (integer) – Organization identifier

Response JSON Object
  • title (string)
  • camera_count (integer)
  • camera_limit (integer)
  • can_edit_cameras (bool)
  • can_edit_users (bool)
  • can_view_stats (bool)
  • dvr_limit (integer)
  • id (integer)
  • is_default (bool)
  • is_member (bool)
  • mosaic_count (integer)
  • owner (object)
    • login (string)
    • id (integer)
  • owner_id (integer)
  • user_count (integer)
  • user_limit (integer)

Folders

POST /vsaas/api/v2/organizations/(int: organization_id)/folders

Adds folder

Query Parameters
  • organization_id (integer) – Organization identifier

Request JSON Object
  • id (integer)
  • parent_id (integer)
  • title (string)
  • coordinates (string)
  • map_bottomleft (string)
  • map_file (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 (str): Image url(dump only)
  • map_topleft (string)
  • map_topright (string)
  • order_num (integer)
  • organization_id (integer)
GET /vsaas/api/v2/organizations/(int: organization_id)/folders

Returns list of folders in a specified organization

Query Parameters
  • organization_id (integer) – Organization identifier

Response JSON Object Array
  • id (integer)
  • parent_id (integer)
  • title (string)
  • camera_count (integer)
  • coordinates (string)
  • level (integer)
  • map_bottomleft (string)
  • map_file (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 (str): Image url(dump only)
  • map_topleft (string)
  • map_topright (string)
  • order_num (integer)
  • organization_id (integer)
PUT /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)

Changes specified folder’s attributes

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

Request JSON Object
  • id (integer)
  • parent_id (integer)
  • title (string)
  • coordinates (string)
  • map_bottomleft (string)
  • map_file (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 (str): Image url(dump only)
  • map_topleft (string)
  • map_topright (string)
  • move_after (integer): Place this folder after specified id
  • move_before (integer): Place this folder before specified id
  • move_inside (integer): Place this folder under specified id
  • order_num (integer)
  • organization_id (integer)
Response JSON Object Array
  • id (integer)
  • parent_id (integer)
  • title (string)
  • camera_count (integer)
  • coordinates (string)
  • level (integer)
  • map_bottomleft (string)
  • map_file (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 (str): Image url(dump only)
  • map_topleft (string)
  • map_topright (string)
  • order_num (integer)
  • organization_id (integer)
DELETE /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)

Deletes folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

GET /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)

Returns specified folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

Response JSON Object Array
  • id (integer)
  • parent_id (integer)
  • title (string)
  • camera_count (integer)
  • coordinates (string)
  • level (integer)
  • map_bottomleft (string)
  • map_file (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 (str): Image url(dump only)
  • map_topleft (string)
  • map_topright (string)
  • order_num (integer)
  • organization_id (integer)
POST /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)/users

Grants access to a specified folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

Request JSON Object
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)
Response JSON Object
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)
GET /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)/users

Returns list of users who has access to a specified folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

Response JSON Object Array
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)
PUT /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)/users/(int: user_id)

Modifies permissions in a specified folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

  • user_id (integer) – User identifier

Request JSON Object
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)
Response JSON Object
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)
DELETE /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)/users/(int: user_id)

Permits access to a specified folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

  • user_id (integer) – User identifier

Response JSON Object
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)
GET /vsaas/api/v2/organizations/(int: organization_id)/folders/(int: folder_id)/users/(int: user_id)

Returns permissions in a specified folder

Query Parameters
  • organization_id (integer) – Organization identifier

  • folder_id (integer) – Folder identifier

  • user_id (integer) – User identifier

Response JSON Object
  • user_id (integer)
  • can_use_ptz (bool)
  • can_view_dvr (bool)

Presets

POST /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)/presets
POST /vsaas/api/v2/organizations/(int: organization_id)/presets

Adds preset to the organization

Query Parameters
  • organization_id (integer) – Organization identifier

Request JSON Object
  • organization_id (integer)
  • preset_id (integer)
  • id (integer)
  • is_deleted (boolean)
  • preset (object)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • vision_params (None)
Response JSON Object
  • organization_id (integer)
  • preset_id (integer)
  • id (integer)
  • is_deleted (boolean)
  • preset (object)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • vision_params (None)
GET /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)/presets
GET /vsaas/api/v2/organizations/(int: organization_id)/presets

Returns preset list linked to the organization

Query Parameters
  • organization_id (integer) – Organization identifier

Response JSON Object Array
  • organization_id (integer)
  • preset_id (integer)
  • id (integer)
  • is_deleted (boolean)
  • preset (object)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • vision_params (None)
DELETE /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)/presets/(int: preset_id)
DELETE /vsaas/api/v2/organizations/(int: organization_id)/presets/(int: preset_id)

Removes preset from the organization

Query Parameters
  • preset_id (integer) – Preset identifier

  • organization_id (integer) – Organization identifier

GET /vsaas/api/v2/domains/(int: domain_id)/organizations/(int: organization_id)/presets/(int: preset_id)
GET /vsaas/api/v2/organizations/(int: organization_id)/presets/(int: preset_id)

Returns preset linked to the organization

Query Parameters
  • preset_id (integer) – Preset identifier

  • organization_id (integer) – Organization identifier

Response JSON Object Array
  • organization_id (integer)
  • preset_id (integer)
  • id (integer)
  • is_deleted (boolean)
  • preset (object)
    • title (string)
    • dvr_depth (integer)
    • dvr_lock_days (integer)
    • dvr_space (integer)
    • id (integer)
    • is_adjustable (boolean)
    • vision_params (None)
POST /vsaas/api/v2/domains/(int: domain_id)/presets
POST /vsaas/api/v2/presets

Creates preset

Request JSON Object
  • title (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • is_adjustable (boolean)
  • is_default (boolean)
  • is_deleted (boolean)
  • vision_params (None)
Response JSON Object
  • title (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • id (integer)
  • is_adjustable (boolean)
  • is_default (boolean)
  • is_deleted (boolean)
  • vision_params (None)
GET /vsaas/api/v2/domains/(int: domain_id)/presets
GET /vsaas/api/v2/presets

Returns preset list

Response JSON Object Array
  • title (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • id (integer)
  • is_adjustable (boolean)
  • is_default (boolean)
  • is_deleted (boolean)
  • vision_params (None)
PUT /vsaas/api/v2/domains/(int: domain_id)/presets/(int: preset_id)
PUT /vsaas/api/v2/presets/(int: preset_id)

Modifies preset

Query Parameters
  • preset_id (integer) – Preset identifier

Request JSON Object
  • title (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • is_adjustable (boolean)
  • is_default (boolean)
  • is_deleted (boolean)
  • vision_params (None)
Response JSON Object
  • title (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • id (integer)
  • is_adjustable (boolean)
  • is_default (boolean)
  • is_deleted (boolean)
  • vision_params (None)
DELETE /vsaas/api/v2/domains/(int: domain_id)/presets/(int: preset_id)
DELETE /vsaas/api/v2/presets/(int: preset_id)

Removes preset

Query Parameters
  • preset_id (integer) – Preset identifier

GET /vsaas/api/v2/domains/(int: domain_id)/presets/(int: preset_id)
GET /vsaas/api/v2/presets/(int: preset_id)

Returns preset

Query Parameters
  • preset_id (integer) – Preset identifier

Response JSON Object
  • title (string)
  • dvr_depth (integer)
  • dvr_lock_days (integer)
  • dvr_space (integer)
  • id (integer)
  • is_adjustable (boolean)
  • is_default (boolean)
  • is_deleted (boolean)
  • vision_params (None)

Events

POST /vsaas/api/v2/events

Registers events

Authentication via an API key is required

Request JSON Object Array
  • camera_id (string)
  • end_at (integer)
  • events_count (integer)
  • has_preview (bool)
  • 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_id (string)
  • end_at (integer)
  • events_count (integer)
  • has_preview (bool)
  • id (string)
  • object_action (string)
  • object_class (string)
  • object_id (string)
  • source (string)
  • source_id (string)
  • start_at (integer)
  • type (string)
PUT /vsaas/api/v2/events/(string: event_id)

Change an event

Response JSON Object
  • end_at (integer)
  • start_at (integer)
Response JSON Object
  • camera_id (string)
  • end_at (integer)
  • events_count (integer)
  • has_preview (bool)
  • id (string)
  • object_action (string)
  • object_class (string)
  • object_id (string)
  • source (string)
  • source_id (string)
  • start_at (integer)
  • type (string)
GET /vsaas/api/v2/events/(string: event_id)

Returns an event

Response JSON Object
  • camera_id (string)
  • end_at (integer)
  • events_count (integer)
  • has_preview (bool)
  • id (string)
  • object_action (string)
  • object_class (string)
  • object_id (string)
  • source (string)
  • source_id (string)
  • start_at (integer)
  • type (string)
GET /vsaas/api/v2/events/(string: event_id)/preview.jpg

Returns an event preview

Response

application/jpeg image

POST /vsaas/api/v2/events/activity.csv

Registers events

Authentication via an API key is required

Request JSON Object Array
  • camera_id (string)
  • end_at (integer)
  • events_count (integer)
  • has_preview (bool)
  • 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

POST /vsaas/api/v2/events/csv

Registers events

Authentication via an API key is required

Request JSON Object Array
  • camera_id (string)
  • end_at (integer)
  • events_count (integer)
  • has_preview (bool)
  • 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/csv

Returns list of events in csv format.

Query Parameters
  • utc_from – int - return events that accured after this timestamp

  • utc_to – int - return events that accured before this timestamp

  • type – [motion, offline, activity] - type of event

  • camera – show only camera-related events (‘motion’, ‘activity’)

  • camera_id – filter events by camera_id

Custom notifications

POST /vsaas/api/v2/my/device-tokens
POST /vsaas/api/v2/profile/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
GET /vsaas/api/v2/profile/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)
GET /vsaas/api/v2/my/device-tokens/(string: token)
GET /vsaas/api/v2/profile/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)
POST /vsaas/api/v2/my/device-tokens/(string: token)/confirm
POST /vsaas/api/v2/profile/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

POST /vsaas/api/v2/my/subscriptions
POST /vsaas/api/v2/profile/subscriptions

Upserts a new event subscription

Request JSON Object
  • event_type (string)
  • notification_type (string)
  • camera_id (string)
  • last_event_at (integer)
  • notify_url (string)
  • send_timeout (integer)
  • 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)
  • last_event_at (integer)
  • notify_url (string)
  • send_timeout (integer)
  • streamer (object)
    • id (integer)
GET /vsaas/api/v2/my/subscriptions
GET /vsaas/api/v2/profile/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)
  • last_event_at (integer)
  • notify_url (string)
  • send_timeout (integer)
  • streamer (object)
    • id (integer)
GET /vsaas/api/v2/my/subscriptions/(int: id)
GET /vsaas/api/v2/profile/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)
  • last_event_at (integer)
  • notify_url (string)
  • send_timeout (integer)
  • streamer (object)
    • id (integer)
POST /vsaas/api/v2/my/subscriptions/camera_motion
POST /vsaas/api/v2/profile/subscriptions/camera_motion

Upserts a new event subscription

Request JSON Object
  • notification_type (string)
  • camera_id (string)
  • last_event_at (integer)
  • notify_url (string)
  • send_timeout (integer)
  • 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)
  • last_event_at (integer)
  • notify_url (string)
  • send_timeout (integer)
  • streamer (object)
    • id (integer)
POST /vsaas/api/v2/notifications

Sends an arbitary notification to a specified user

Response JSON Object
  • body (string)
  • title (string)
  • user_id (integer)

Mosaics

POST /vsaas/api/v2/mosaics

Creates a mosaic

Request JSON Object
  • title (string)
  • type (string)
  • cameras (): list of Camera objects
  • organization_id (integer)
  • 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 (): list of Camera objects
  • organization_id (integer)
  • visible (boolean)
Response JSON Object
  • id (integer)
  • title (string)
  • type (string)
  • cameras (): list of Camera objects
  • organization_id (integer)
  • 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 (): list of Camera objects
  • organization_id (integer)
  • visible (boolean)

Streamers

POST /vsaas/api/v2/streamers

Creates a streamer

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

Returns list of streamers

Response JSON Object Array
  • api_url (string)
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • has_analytics ()
  • has_dvr_storage ()
  • id (integer)
  • is_local (field)
  • max_bitrate (integer)
  • public_url (string)
  • server_status (object)
    • error (string)
    • http_port (integer)
    • https_port (integer)
    • is_remote (boolean)
    • load (integer)
    • uptime (integer)
  • server_warnings (array)
PUT /vsaas/api/v2/streamers/(int: streamer_id)

Modifies streamer

Query Parameters
  • streamer_id (integer) – Streamer identifier

Request JSON Object Array
  • api_url (string)
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • has_analytics ()
  • has_dvr_storage ()
  • is_local (field)
  • max_bitrate (integer)
  • public_url (string)
  • server_warnings (array)
Response JSON Object Array
  • api_url (string)
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • has_analytics ()
  • has_dvr_storage ()
  • id (integer)
  • is_local (field)
  • max_bitrate (integer)
  • public_url (string)
  • server_status (object)
    • error (string)
    • http_port (integer)
    • https_port (integer)
    • is_remote (boolean)
    • load (integer)
    • uptime (integer)
  • 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
  • api_url (string)
  • auth (string)
  • cluster_key (string)
  • dvr_path (string)
  • has_analytics ()
  • has_dvr_storage ()
  • id (integer)
  • is_local (field)
  • max_bitrate (integer)
  • public_url (string)
  • server_status (object)
    • error (string)
    • http_port (integer)
    • https_port (integer)
    • is_remote (boolean)
    • load (integer)
    • uptime (integer)
  • 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_accent_color (string)
  • brand_background_color (string)
  • brand_error_color (string)
  • brand_footer_address (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header_color (string)
  • brand_info_text (string)
  • brand_inverted_text_color (string)
  • brand_page_title (string)
  • brand_sidebar_color (string)
  • brand_success_color (string)
  • brand_text_dark_color (string)
  • brand_text_light_color (string)
  • brand_warning_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 (str): Image url(dump only)
  • custom_favicon (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 (str): 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 (str): Image url(dump only)
  • dns_names (array)
  • events_filter_backend (string)
  • events_notify_sink (string)
  • 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)
  • mail_from (string)
  • mail_uri (string)
  • map_center (string)
  • map_gmap_key (string)
  • map_language (string)
  • map_osm_url (string)
  • map_provider (string)
  • map_show_in_nav (boolean)
  • max_user_sessions (integer)
  • peeklio_disable_notifications (boolean)
  • peeklio_license_id (integer)
Response JSON Object
  • api_key (string)
  • brand_accent_color (string)
  • brand_background_color (string)
  • brand_error_color (string)
  • brand_footer_address (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header_color (string)
  • brand_info_text (string)
  • brand_inverted_text_color (string)
  • brand_page_title (string)
  • brand_sidebar_color (string)
  • brand_success_color (string)
  • brand_text_dark_color (string)
  • brand_text_light_color (string)
  • brand_warning_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 (str): Image url(dump only)
  • custom_favicon (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 (str): 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 (str): Image url(dump only)
  • dns_names (array)
  • events_filter_backend (string)
  • events_notify_sink (string)
  • 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)
  • mail_from (string)
  • mail_uri (string)
  • map_center (string)
  • map_gmap_key (string)
  • map_language (string)
  • map_osm_url (string)
  • map_provider (string)
  • map_show_in_nav (boolean)
  • max_user_sessions (integer)
  • peeklio_disable_notifications (boolean)
  • peeklio_license_id (integer)
  • service (boolean)
GET /vsaas/api/v2/settings

Get settings

Response JSON Object
  • api_key (string)
  • brand_accent_color (string)
  • brand_background_color (string)
  • brand_error_color (string)
  • brand_footer_address (string)
  • brand_footer_phone (string)
  • brand_footer_work_hours (string)
  • brand_header_color (string)
  • brand_info_text (string)
  • brand_inverted_text_color (string)
  • brand_page_title (string)
  • brand_sidebar_color (string)
  • brand_success_color (string)
  • brand_text_dark_color (string)
  • brand_text_light_color (string)
  • brand_warning_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 (str): Image url(dump only)
  • custom_favicon (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 (str): 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 (str): Image url(dump only)
  • dns_names (array)
  • events_filter_backend (string)
  • events_notify_sink (string)
  • 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)
  • mail_from (string)
  • mail_uri (string)
  • map_center (string)
  • map_gmap_key (string)
  • map_language (string)
  • map_osm_url (string)
  • map_provider (string)
  • map_show_in_nav (boolean)
  • max_user_sessions (integer)
  • peeklio_disable_notifications (boolean)
  • peeklio_license_id (integer)
  • service (boolean)
POST /vsaas/api/v2/settings/email/test

Update settings

Request Object
  • email (string (email))
  • mail_from (string)
  • mail_uri (string)
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) –