Camlytics user guide

Overview of Camlytics Camera Software, and how to get started with it.

This section is made for developers or integrators who would like to integrate with Camlytics application.

The REST API allows handling analytical events such as motion detected, camera obstructed, etc. in a custom way. For example, you might want to store events in a remote database, send them to a web service or start an external application.
The API also allows you to receive the list of Camlytics channels with complete details - streaming URI, name, etc. This might be helpful if you plan to use your own player to view cameras remotely (via mobile device).

The /events endpoint is real time, you will receive new event at the same moment they appear in the video channel.

Camlytics provides a very simple and universal way to control all camera events and retrieve channels data. In order to integrate with the application via REST API, complete the following steps:

  • Start the application and make sure you have the latest version (min supported version is 1.2.0)
  • Make sure the REST API is enabled in settings (should enabled by default)
  • To verify that the REST API is working, add a channel, generate any event (object appear, etc.) and go to http://localhost:48462/v1/json/events?limit=10&order=DESC&timeout=5. If no events are available, an empty JSON array will be returned.
    In case something went wrong, please refer to logs that are located in %APPDATA%\Camlytics\Logs\.
  • For detailed ducumentation, go through autogenerated REST API reference

For additional support contact us at

Please find the JavaScript example that demonstrates how to integrate with Camlytics REST API and receive events in real time.

Note that you can use whatever programming language and framework you prefer. The necessary client code can be generated from Swagger definition file which is compliant with Swagger specifications. Please read more about Swagger here.
Online code generation available at SwaggerHub.

If you don't want to write any code to customize events actions locally you can set up the webhook URL for each of the event types. All webhooks are fired via GET requests each time the event is created with following parameters appended: event-type, event-objectId, event-ruleId, event-origin, event-channelId, event-channelName, event-time, event-ruleName.

video camera webhook

A very good example of utilizing webhooks is using Google Sheets as a cloud storage for your Camlytics events - you can use those to collect data from multiple locations, build customized charts, etc.

To automate submission of data into your Google Sheet, fill in the columns headers with parameter names (event-type, event-objectId, etc.) and click Tools > Script editor. You will be redirected to a Google Script page. Copy and paste the sample script below into the script editor.

You can get more information on how to set up the script here.

function doGet(e){
  return handleResponse(e);
// Usage
//  1. Enter sheet name where data is to be written below
        var SHEET_NAME = "Sheet1";
//  2. Run > setup
//  3. Publish > Deploy as web app 
//    - enter Project Version name and click 'Save New Version' 
//    - set security level and enable service (most likely execute as 'me' and access 'anyone, even anonymously) 
//  4. Copy the 'Current web app URL' and post this in your Camlytics webhook URL field
//  5. Insert column names on your destination sheet matching the parameter names of the data you are passing in (exactly matching case)
var SCRIPT_PROP = PropertiesService.getScriptProperties();
function handleResponse(e) {
  var lock = LockService.getPublicLock();
  try {
    var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty("key"));
    var sheet = doc.getSheetByName(SHEET_NAME);
    var headRow = 1;
    var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
    var nextRow = sheet.getLastRow() + 1;
    var row = []; 
    for (i in headers) {
    sheet.getRange(nextRow, 1, 1, row.length).setValues([row]);
    return ContentService
          .createTextOutput(JSON.stringify({"result":"success", "row": nextRow}))
  } catch(e){
    return ContentService
          .createTextOutput(JSON.stringify({"result":"error", "error": e}))
  } finally {
function setup() {
    var doc = SpreadsheetApp.getActiveSpreadsheet();
    SCRIPT_PROP.setProperty("key", doc.getId());

In the end you will receive the production script URL that you will insert into your Camlytics events setings in this format:
The final URL that webhook is going to build and query is:

Example of output in the Google Sheet that you are going to receive:

camlytics google sheet