NAV
shell python

Introduction

Welcome to the Aimetis Thin Client API! You can use our API to access Thin Client API endpoints, which provides state and control of Panels, Cameras, Settings and System state.

We have language bindings in Shell and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

To authorize, use this code:

import requests

requests.post('http://{your_thinclient_ip}/Session', 
    data='{"user":"admin","pwd":"{your_password}"}',
    headers={'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Session"
  -X POST
  -H "Content-Type: application/json"
  -d "{'user':'admin','pwd':'{your_password}'}"

Make sure to replace {your_password} with the administrator password set on the Thin Client.

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Session", "rel": "create", "method": "POST" },
  ],
  "Data": {
    "Token": "25892e17-80f6-415f-9c65-7395632f0223",
    "Links": [
      { "href": "/Session/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" }
    ]
  },
  "Version": "1.1.1.234"
}

In all example HTTP requests below that require an authtoken (most), please replace {your_session_token} with the actual GUID provided by the Session request (in this case 25892e17-80f6-415f-9c65-7395632f0223).

Thin Client uses Session Tokens to allow access to the API. You can request a new Thin Client Session Token from the appropriate endpoint in [Session].

Thin Client expects for the Session Token to be included in all API requests to the server in a header that looks like the following:

authtoken: {your_session_token}

Panels

Get All Panels

import requests

requests.get('http://{your_thinclient_ip}/Panel', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Panel"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Panel", "rel": "list", "method": "GET" },
    { "href": "/Panel", "rel": "create", "method": "POST" },
    { "href": "/Panel/Refresh", "rel": "refresh", "method": "POST" },
    { "href": "/Panel/Stop", "rel": "stop", "method": "POST" }
  ],
  "Data": [
    {
      "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
      "PanelName": "My Single View",
      "PanelWidth": 1,
      "PanelHeight": 1,
      "Default": true,
      "Cells": [
        {
          "PanelCellId": 55,
          "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
          "CoordX": 0,
          "CoordY": 0,
          "CameraId": "deb17e15-d47c-449f-b1b0-4d55247d153f",
          "CameraName": "Parking Lot Camera"
        }
      ],
      "Links": [
        { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "edit", "method": "PUT" },
        { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" },
        { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show", "rel": "show", "method": "GET" }
      ]
    }
  ],
  "Version": "1.1.1.234"
}

This endpoint retrieves all panels.

HTTP Request

GET http://{your_thinclient_ip}/Panel

Create a Panel

import requests

requests.post('http://{your_thinclient_ip}/Panel', 
  data='{"PanelName":"My Single View","PanelWidth":1,"PanelHeight":1,"Cells":[{"CoordX":0,"CoordY":0,"CameraId":"deb17e15-d47c-449f-b1b0-4d55247d153f","CameraName":"Parking Lot Camera"}]}',
  headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Panel"
  -X POST
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "{'PanelName':'My Single View','PanelWidth':1,'PanelHeight':1,'Cells':[{'CoordX':0,'CoordY':0,'CameraId':'deb17e15-d47c-449f-b1b0-4d55247d153f','CameraName':'Parking Lot Camera'}]}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Panel", "rel": "list", "method": "GET" },
    { "href": "/Panel", "rel": "create", "method": "POST" },
    { "href": "/Panel/Refresh", "rel": "refresh", "method": "POST" },
    { "href": "/Panel/Stop", "rel": "stop", "method": "POST" }
  ],
  "Data": {
    "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
    "PanelName": "My Single View",
    "PanelWidth": 1,
    "PanelHeight": 1,
    "Default": false,
    "Cells": [
      {
        "PanelCellId": 55,
        "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
        "CoordX": 0,
        "CoordY": 0,
        "CameraId": "deb17e15-d47c-449f-b1b0-4d55247d153f",
        "CameraName": "Parking Lot Camera"
      }
    ],
    "Links": [
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "edit", "method": "PUT" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show", "rel": "show", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint creates a new panel.

HTTP Request

POST http://{your_thinclient_ip}/Panel

Update a Panel

import requests

requests.put('http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223', 
    data='{"PanelGuid":"25892e17-80f6-415f-9c65-7395632f0223","PanelName":"My Single View","PanelWidth":1,"PanelHeight":1,"Cells":[{"PanelCellId":55,"PanelGuid":"25892e17-80f6-415f-9c65-7395632f0223","CoordX":0,"CoordY":0,"CameraId":"deb17e15-d47c-449f-b1b0-4d55247d153f","CameraName":"Parking Lot Camera"}]}',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223"
  -X PUT
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "{'PanelGuid':'25892e17-80f6-415f-9c65-7395632f0223','PanelName':'My Single View','PanelWidth':1,'PanelHeight':1,'Cells':[{'PanelCellId':55,'PanelGuid':'25892e17-80f6-415f-9c65-7395632f0223','CoordX':0,'CoordY':0,'CameraId':'deb17e15-d47c-449f-b1b0-4d55247d153f','CameraName':'Parking Lot Camera'}]}"

The above command returns the updated Panel as JSON structured like this:

{
  "Links": [
    { "href": "/Panel", "rel": "list", "method": "GET" },
    { "href": "/Panel", "rel": "create", "method": "POST" },
    { "href": "/Panel/Refresh", "rel": "refresh", "method": "POST" },
    { "href": "/Panel/Stop", "rel": "stop", "method": "POST" }
  ],
  "Data": {
    "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
    "PanelName": "My Single View",
    "PanelWidth": 1,
    "PanelHeight": 1,
    "Default": false,
    "Cells": [
      {
        "PanelCellId": 55,
        "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
        "CoordX": 0,
        "CoordY": 0,
        "CameraId": "deb17e15-d47c-449f-b1b0-4d55247d153f",
        "CameraName": "Parking Lot Camera"
      }
    ],
    "Links": [
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "edit", "method": "PUT" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show", "rel": "show", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint saves the panel as specified.

HTTP Request

PUT http://{your_thinclient_ip}/Panel/<ID>

URL Parameters

Parameter Description
ID The ID of the panel to update

Delete a Panel

import requests

requests.delete('http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223"
  -X DELETE
  -H "authtoken: {your_session_token}"

The above command returns the deleted panel as JSON structured like this:

{
  "Links": [
    { "href": "/Panel", "rel": "list", "method": "GET" },
    { "href": "/Panel", "rel": "create", "method": "POST" },
    { "href": "/Panel/Refresh", "rel": "refresh", "method": "POST" },
    { "href": "/Panel/Stop", "rel": "stop", "method": "POST" }
  ],
  "Data": {
    "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
    "PanelName": "My Single View",
    "PanelWidth": 1,
    "PanelHeight": 1,
    "Default": false,
    "Cells": [
      {
        "PanelCellId": 55,
        "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
        "CoordX": 0,
        "CoordY": 0,
        "CameraId": "deb17e15-d47c-449f-b1b0-4d55247d153f",
        "CameraName": "Parking Lot Camera"
      }
    ],
    "Links": [
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "edit", "method": "PUT" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show", "rel": "show", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint deletes a specific panel.

HTTP Request

DELETE http://{your_thinclient_ip}/Panel/<ID>

URL Parameters

Parameter Description
ID The ID of the panel to delete

Set Active Panel

import requests

requests.get('http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show"
  -H "authtoken: {your_session_token}"

The above command returns the panel to be displayed as JSON structured like this:

{
  "Links": [
    { "href": "/Panel", "rel": "list", "method": "GET" },
    { "href": "/Panel", "rel": "create", "method": "POST" },
    { "href": "/Panel/Refresh", "rel": "refresh", "method": "POST" },
    { "href": "/Panel/Stop", "rel": "stop", "method": "POST" }
  ],
  "Data": {
    "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
    "PanelName": "My Single View",
    "PanelWidth": 1,
    "PanelHeight": 1,
    "Default": false,
    "Cells": [
      {
        "PanelCellId": 55,
        "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
        "CoordX": 0,
        "CoordY": 0,
        "CameraId": "deb17e15-d47c-449f-b1b0-4d55247d153f",
        "CameraName": "Parking Lot Camera"
      }
    ],
    "Links": [
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "edit", "method": "PUT" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show", "rel": "show", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint displays a specific panel.

HTTP Request

GET http://{your_thinclient_ip}/Panel/<ID>/Show

URL Parameters

Parameter Description
ID The ID of the panel to display

Set/Clear Camera In Cell

import requests

requests.post('http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223/Cell/0/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Panel/25892e17-80f6-415f-9c65-7395632f0223/Cell/0/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f"
  -X POST
  -H "authtoken: {your_session_token}"

The above command returns the active panel as JSON structured like this:

{
  "Links": [
    { "href": "/Panel", "rel": "list", "method": "GET" },
    { "href": "/Panel", "rel": "create", "method": "POST" },
    { "href": "/Panel/Refresh", "rel": "refresh", "method": "POST" },
    { "href": "/Panel/Stop", "rel": "stop", "method": "POST" }
  ],
  "Data": {
    "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
    "PanelName": "My Single View",
    "PanelWidth": 1,
    "PanelHeight": 1,
    "Default": false,
    "Cells": [
      {
        "PanelCellId": 55,
        "PanelGuid": "25892e17-80f6-415f-9c65-7395632f0223",
        "CoordX": 0,
        "CoordY": 0,
        "CameraId": "deb17e15-d47c-449f-b1b0-4d55247d153f",
        "CameraName": "Parking Lot Camera"
      }
    ],
    "Links": [
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "edit", "method": "PUT" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223", "rel": "delete", "method": "DELETE" },
      { "href": "/Panel/25892e17-80f6-415f-9c65-7395632f0223/Show", "rel": "show", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint assigns a specific camera to a specific cell in the active panel. If the value given for CameraID is “blank”, cell will be cleared.

HTTP Request

POST http://{your_thinclient_ip}/Panel/<PanelID>/Cell/<CellIndex>/Camera/<CameraID>

URL Parameters

Parameter Description
PanelID The ID of the active panel
CellIndex The zero-based index of a cell in the active panel
CameraID The ID of a camera to assign to a specific cell in the active panel

Stop Active Panel

import requests

requests.get('http://{your_thinclient_ip}/Panel/Stop', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Panel/Stop"
  -H "authtoken: {your_session_token}"

This endpoint stops the panel display.

HTTP Request

POST http://{your_thinclient_ip}/Panel/Stop

Cameras

Get All Cameras

import requests

requests.get('http://{your_thinclient_ip}/Camera', headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Camera"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": [
    {
      "Id": "25892e17-80f6-415f-9c65-7395632f0223",
      "Name": "Front Door Camera",
      "Links": [
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "update", "method": "PUT" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "remove", "method": "DELETE" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg", "rel": "image", "method": "GET" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen", "rel": "fullscreen", "method": "GET" }
      ]
    },
    {
      "Id": "deb17e15-d47c-449f-b1b0-4d55247d153f",
      "Name": "Server Room Camera",
      "Links": [
        { "href": "/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f", "rel": "update", "method": "PUT" },
        { "href": "/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f", "rel": "remove", "method": "DELETE" },
        { "href": "/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f/Jpeg", "rel": "image", "method": "GET" },
        { "href": "/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
        { "href": "/Camera/deb17e15-d47c-449f-b1b0-4d55247d153f/Fullscreen", "rel": "fullscreen", "method": "GET" }
      ]
    }
  ],
  "Version": "1.1.1.234"
}

This endpoint returns all cameras given by the current video source.

HTTP Request

GET http://{your_thinclient_ip}/Camera

Create Camera (Direct Connect)

import requests

requests.post('http://{your_thinclient_ip}/Camera', 
    data='{"Id":"25892e17-80f6-415f-9c65-7395632f0223","Name":"Front Door Camera","Address":"192.168.0.2","ChannelNumber":0,"Username":"root","Password":"toor","Streams":[{"Format":"H264","RecordFps":8,"StreamNumber":0,"Width":1920,"Height":1080,"MediaUri":"http://192.168.0.2/media","SnapshotUri":"http://192.168.0.2/GetJpeg"}]}',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Camera"
  -X POST
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "{'Id':'25892e17-80f6-415f-9c65-7395632f0223','Name':'Front Door Camera','Address':'192.168.0.2','ChannelNumber':0,'Username':'root','Password':'toor','Streams':[{'Format':'H264','RecordFps':8,'StreamNumber':0,'Width':1920,'Height':1080,'MediaUri':'http://192.168.0.2/media','SnapshotUri':'http://192.168.0.2/GetJpeg'}]}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": {
    "Id": "25892e17-80f6-415f-9c65-7395632f0223",
    "Name": "Front Door Camera",
    "Address": "192.168.0.2",
    "ChannelNumber": 0,
    "Username": "root",
    "Password": "toor",
    "Streams": [{
        "Format": "H264",
        "RecordFps": 8,
        "StreamNumber": 0,
        "Width": 1920,
        "Height": 1080,
        "MediaUri": "http://192.168.0.2/media",
        "SnapshotUri": "http://192.168.0.2/GetJpeg"
    }],
    "Links": [
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "update", "method": "PUT" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "remove", "method": "DELETE" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg", "rel": "image", "method": "GET" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen", "rel": "fullscreen", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint adds the specified Camera.

HTTP Request

POST http://{your_thinclient_ip}/Camera

Update Camera (Direct Connect)

import requests

requests.put('http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223', 
    data='{"Id":"25892e17-80f6-415f-9c65-7395632f0223","Name":"Front Door Camera","Address":"192.168.0.2","ChannelNumber":0,"Username":"root","Password":"toor","Streams":[{"Format":"H264","RecordFps":8,"StreamNumber":0,"Width":1920,"Height":1080,"MediaUri":"http://192.168.0.2/media","SnapshotUri":"http://192.168.0.2/GetJpeg"}]}',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223"
  -X PUT
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "{'Id':'25892e17-80f6-415f-9c65-7395632f0223','Name':'Front Door Camera','Address':'192.168.0.2','ChannelNumber':0,'Username':'root','Password':'toor','Streams':[{'Format':'H264','RecordFps':8,'StreamNumber':0,'Width':1920,'Height':1080,'MediaUri':'http://192.168.0.2/media','SnapshotUri':'http://192.168.0.2/GetJpeg'}]}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": {
    "Id": "25892e17-80f6-415f-9c65-7395632f0223",
    "Name": "Front Door Camera",
    "Address": "192.168.0.2",
    "ChannelNumber": 0,
    "Username": "root",
    "Password": "toor",
    "Streams": [{
        "Format": "H264",
        "RecordFps": 8,
        "StreamNumber": 0,
        "Width": 1920,
        "Height": 1080,
        "MediaUri": "http://192.168.0.2/media",
        "SnapshotUri": "http://192.168.0.2/GetJpeg"
    }],
    "Links": [
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "update", "method": "PUT" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "remove", "method": "DELETE" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg", "rel": "image", "method": "GET" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen", "rel": "fullscreen", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint updates the specified camera.

HTTP Request

PUT http://{your_thinclient_ip}/Camera/<ID>

URL Parameters

Parameter Description
ID The ID of the camera to update.

Replace Cameras (Direct Connect)

import requests

requests.put('http://{your_thinclient_ip}/Camera', 
    data='[{"Id":"25892e17-80f6-415f-9c65-7395632f0223","Name":"Front Door Camera","Address":"192.168.0.2","ChannelNumber":0,"Username":"root","Password":"toor","Streams":[{"Format":"H264","RecordFps":8,"StreamNumber":0,"Width":1920,"Height":1080,"MediaUri":"http://192.168.0.2/media","SnapshotUri":"http://192.168.0.2/GetJpeg"}]}]',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Camera"
  -X PUT
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "[{'Id':'25892e17-80f6-415f-9c65-7395632f0223','Name':'Front Door Camera','Address':'192.168.0.2','ChannelNumber':0,'Username':'root','Password':'toor','Streams':[{'Format':'H264','RecordFps':8,'StreamNumber':0,'Width':1920,'Height':1080,'MediaUri':'http://192.168.0.2/media','SnapshotUri':'http://192.168.0.2/GetJpeg'}]}]"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": [{
    "Id": "25892e17-80f6-415f-9c65-7395632f0223",
    "Name": "Front Door Camera",
    "Address": "192.168.0.2",
    "ChannelNumber": 0,
    "Username": "root",
    "Password": "toor",
    "Streams": [{
        "Format": "H264",
        "RecordFps": 8,
        "StreamNumber": 0,
        "Width": 1920,
        "Height": 1080,
        "MediaUri": "http://192.168.0.2/media",
        "SnapshotUri": "http://192.168.0.2/GetJpeg"
    }],
    "Links": [
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "update", "method": "PUT" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "remove", "method": "DELETE" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg", "rel": "image", "method": "GET" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen", "rel": "fullscreen", "method": "GET" }
    ]
  }],
  "Version": "1.1.1.234"
}

This endpoint replaces all previously saved Direct Connect Cameras with the specified Cameras.

HTTP Request

PUT http://{your_thinclient_ip}/Camera

Delete Camera (Direct Connect)

import requests

requests.delete('http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223', 
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223"
  -X DELETE
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": {
    "Id": "25892e17-80f6-415f-9c65-7395632f0223",
    "Name": "Front Door Camera",
    "Address": "192.168.0.2",
    "ChannelNumber": 0,
    "Username": "root",
    "Password": "toor",
    "Streams": [{
        "Format": "H264",
        "RecordFps": 8,
        "StreamNumber": 0,
        "Width": 1920,
        "Height": 1080,
        "MediaUri": "http://192.168.0.2/media",
        "SnapshotUri": "http://192.168.0.2/GetJpeg"
    }],
    "Links": [
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "update", "method": "PUT" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "remove", "method": "DELETE" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg", "rel": "image", "method": "GET" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
        { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen", "rel": "fullscreen", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint removes the Direct Connect Camera specified by it’s ID.

HTTP Request

DELETE http://{your_thinclient_ip}/Camera/<ID>

URL Parameters

Parameter Description
ID The ID of the camera to remove.

Get Camera Image

import requests

requests.get('http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg"
  -H "authtoken: {your_session_token}"

The above command returns the image as JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": "/9j/4AAQSkZJRgABAgAADAALAAD//...",
  "Version": "1.1.1.234"
}

This endpoint gets a recent image for the camera with the specified id as data:image/jpeg;base64.

HTTP Request

GET http://{your_thinclient_ip}/Camera/<ID>/Jpeg

URL Parameters

Parameter Description
ID The ID of the camera to retrieve an image for.

Get Camera Image (Prior to Adding Camera)

import requests

requests.post('http://{your_thinclient_ip}/Camera/Jpeg', 
    data='[{"Id":"25892e17-80f6-415f-9c65-7395632f0223","Username":"root","Password":"toor","Streams":[{"SnapshotUri":"http://192.168.0.2/GetJpeg"}]}]',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Camera/Jpeg"
  -X POST
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "[{'Id':'25892e17-80f6-415f-9c65-7395632f0223','Username':'root','Password':'toor','Streams':[{'SnapshotUri':'http://192.168.0.2/GetJpeg'}]}]"

The above command returns the image as JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": "/9j/4AAQSkZJRgABAgAADAALAAD//...",
  "Version": "1.1.1.234"
}

This endpoint gets a preview image for the specified unsaved camera as data:image/jpeg;base64.

HTTP Request

POST http://{your_thinclient_ip}/Camera/Jpeg

Set Camera To Fullscreen

import requests

requests.get('http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen"
  -H "authtoken: {your_session_token}"

The above command returns the camera to be displayed fullscreen as JSON structured like this:

{
  "Links": [
    { "href": "/Camera", "rel": "list", "method": "GET" },
    { "href": "/Camera", "rel": "add", "method": "POST" },
    { "href": "/Camera", "rel": "update-list", "method": "PUT" },
    { "href": "/Camera/Jpeg", "rel": "image", "method": "POST" }
  ],
  "Data": {
    "Id": "25892e17-80f6-415f-9c65-7395632f0223",
    "Name": "Front Door Camera",
    "Links": [
      { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "update", "method": "PUT" },
      { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223", "rel": "remove", "method": "DELETE" },
      { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Jpeg", "rel": "image", "method": "GET" },
      { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/TestOnvifCompliance", "rel": "test-onvif", "method": "POST" },
      { "href": "/Camera/25892e17-80f6-415f-9c65-7395632f0223/Fullscreen", "rel": "fullscreen", "method": "GET" }
    ]
  },
  "Version": "1.1.1.234"
}

This endpoint sets a specific camera to be displayed fullscreen.

HTTP Request

GET http://{your_thinclient_ip}/Camera/<ID>/Fullscreen

URL Parameters

Parameter Description
ID The ID of the camera to be displayed fullscreen.

PTZ Control

Relative Movement and Zoom

import requests

requests.put('http://{your_thinclient_ip}/PTZ/0/Relative/Pan/50/Tilt/0/Zoom/0', headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/PTZ/0/Relative/Pan/50/Tilt/0/Zoom/0"
  -X PUT
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"

This endpoint will move and/or zoom a valid PTZ camera in the relative direction specified in the url.

HTTP Request

PUT http://{your_thinclient_ip}/PTZ/<CELL_INDEX>/Relative/Pan/<PAN_VALUE>/Tilt/<TILT_VALUE>/Zoom/<ZOOM_VALUE>

URL Parameters

Parameter Description
CELL_INDEX The index of a cell containing a valid PTZ camera (zero based).
PAN_VALUE A numeric pan value relative to the current location.
TILT_VALUE A numeric tilt value relative to the current location.
ZOOM_VALUE A numeric zoom value relative to the current zoom level.

Absolute Movement and Zoom

import requests

requests.put('http://{your_thinclient_ip}/PTZ/0/Absolute/Pan/50/Tilt/0/Zoom/0', headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/PTZ/0/Absolute/Pan/50/Tilt/0/Zoom/0"
  -X PUT
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"

This endpoint will move and/or zoom a valid PTZ camera to the absolute position specified in the url.

HTTP Request

PUT http://{your_thinclient_ip}/PTZ/<CELL_INDEX>/Absolute/Pan/<PAN_VALUE>/Tilt/<TILT_VALUE>/Zoom/<ZOOM_VALUE>

URL Parameters

Parameter Description
CELL_INDEX The index of a cell containing a valid PTZ camera.
PAN_VALUE A numeric value indicating an absolute location to pan to.
TILT_VALUE A numeric value indicating and absolute location to tilt to.
ZOOM_VALUE A numeric value indicating an absolute zoom level.

Get PTZ Presets

import requests

requests.get('http://{your_thinclient_ip}/PTZ/0/Presets',
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/PTZ/0/Presets"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [],
  "Data": [{
    "Name": "Home",
    "X": 50,
    "Y": 0,
    "Z": 0
  },
  {
    "Name": "Position 1",
    "X": 0,
    "Y": 50,
    "Z": 0
  }],
  "Version": "2.2.0.0"
}

This endpoint returns the list of presets associated with the PTZ camera at a given cell index.

HTTP Request

GET http://{your_thinclient_ip}/PTZ/<CELL_INDEX>/Presets

URL Parameters

Parameter Description
CELL_INDEX The index of a cell containing a valid PTZ camera.

Settings

Retrieve Settings

import requests

requests.get('http://{your_thinclient_ip}/Settings', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/Settings"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Settings", "rel": "list", "method": "GET" },
    { "href": "/Settings", "rel": "edit", "method": "POST" },
    { "href": "/Settings/TestConnection", "rel": "test", "method": "POST" }
  ],
  "Data": [
    { "Name": "FirmwareVersion", "Value": "1.1.0.0" },
    { "Name": "DeviceSerial", "Value": "001122334455" },
    { "Name": "NetworkMode", "Value": "static" },
    { "Name": "NetworkDNS", "Value": "192.168.0.1" },
    { "Name": "NetworkIP", "Value": "192.168.0.20" },
    { "Name": "NetworkMask", "Value": "255.255.255.0" },
    { "Name": "NetworkGW", "Value": "192.168.0.1" },
    { "Name": "DeviceName", "Value": "My Thin Client" },
    { "Name": "Date", "Value": "1/1/2099" },
    { "Name": "Time", "Value": "23:59:59" },
    { "Name": "TimeZone", "Value": "Universal" },
    { "Name": "TimeSynchronization", "Value": "ntp" },
    { "Name": "NTPServer", "Value": "0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org" },
    { "Name": "NTPMode", "Value": "default" },
    { "Name": "VideoSource", "Value": "mobilebridge" },
    { "Name": "SymphonyServer", "Value": "192.168.0.40" },
    { "Name": "SymphonyUser", "Value": "mb_user" },
    { "Name": "SymphonyPort", "Value": "8433" },
    { "Name": "SymphonyHTTPS", "Value": "true" }
  ],
  "Version": "1.1.1.234"
}

This endpoint retrieves the list of current settings.

HTTP Request

GET http://{your_thinclient_ip}/Settings

Update Settings

import requests

requests.post('http://{your_thinclient_ip}/Settings', 
    data='[{"Name":"DeviceName","Value":"New Device Name"}]',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Settings"
  -X POST
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "[{'Name':'DeviceName','Value':'New Device Name'}]"

This endpoint updates the list of current settings with the values specified. Available Settings are as follows:

Setting Name Description Constraints
DeviceName The given name of the device. Will appear on clients and connected monitor String – Should be less than or equal to 60 characters
NetworkMode Will the IP address be assigned automatically or set manually String – dhcp or static
NetworkIP The static IPv4 address of the Thin Client. Ignored when NetworkMode is dhcp String (IPv4 Address) – Default is 192.168.0.20
NetworkMask The subnet mask. Ignored when NetworkMode is dhcp String (IPv4 Address) – Default is 255.255.255.0
NetworkGW The IPv4 address of the network gateway. Ignored when NetworkMode is dhcp String (IPv4 Address) – Default is blank
NetworkDNS The IPv4 address of the domain name server. Ignored when NetworkMode is dhcp String (IPv4 Address) – Default is blank
AdminPassword The password used to connect to the Thin Client via any of the Clients String – Should be less than or equal to 60 characters
VideoSource Will the Thin Client connect to Symphony via Mobile Bridge, or directly to Cameras via ONVIF mobilebridge or directconnect
SymphonyServer The address of the server running Mobile Bridge. Ignored when VideoSource is directconnect String
SymphonyPort The port on which Mobile Bridge is listening. Ignored when VideoSource is directconnect Integer – Default is 8433
SymphonyHTTPS Should the Thin Client connect to Mobile Bridge using SSL. Ignored when VideoSource is directconnect String – true or false
SymphonyUser The username configured in Mobile Bridge. Ignored when VideoSource is directconnect String
SymphonyPwd The password configured in Mobile Bridge. Ignored when VideoSource is directconnect String
TimeZone The code representing the local timezone in which the Thin Client is running String – Default is Universal
TimeSynchronization Will the date and time be synchronized with an NTP server or be manually set String – ntp or manual
Date The current year, month and date in which the Thin Client is running. Ignored when TimeSynchronization is ntp String – Should be of the form `MM:DD:YYYY
Time The current hour, minute and second in which the Thin Client is running. Ignored when TimeSynchronization is ntp String – Should be of the form hh:mm:ss
NTPMode Will the list of NTP servers be the default or be given manually String – default or manual
NTPServer A comma separated list of NTP servers for synchronizing the date and time. Ignored when NTPMode is default String – Default is 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org

HTTP Request

POST http://{your_thinclient_ip}/Settings

Test Mobile Bridge Reachability

import requests

requests.post('http://{your_thinclient_ip}/Settings/TestConnection', 
    data='[{"Name":"SymphonyServer","Value":"192.168.0.40"},{"Name":"SymphonyUser","Value":"mb_user"},{"Name":"SymphonyPwd","Value":"mb_pass"},{"Name":"SymphonyPort","Value":"8433"},{"Name":"SymphonyHTTPS","Value":"true"}]',
    headers={'authtoken': '{your_session_token}', 'content-type': 'application/json'})
curl "http://{your_thinclient_ip}/Settings/TestConnection"
  -X POST
  -H "authtoken: {your_session_token}"
  -H "Content-Type: application/json"
  -d "[{'Name':'SymphonyServer','Value':'192.168.0.40'},{'Name':'SymphonyUser','Value':'mb_user'},{'Name':'SymphonyPwd','Value':'mb_pass'},{'Name':'SymphonyPort','Value':'8433'},{'Name':'SymphonyHTTPS','Value':'true'}]"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/Settings", "rel": "list", "method": "GET" },
    { "href": "/Settings", "rel": "edit", "method": "POST" },
    { "href": "/Settings/TestConnection", "rel": "test", "method": "POST" }
  ],
  "Data": 2,
  "Version": "1.1.1.234"
}

This endpoint determines if the Thin Client can reach the Mobile Bridge at the specified protocol and address and authenticate with it using the specified credentials.

Return codes and their associated meaning are as follows:

HTTP Request

POST http://{your_thinclient_ip}/Settings/TestConnection

System

Discover Mobile Bridge(s) On Network

import requests

requests.get('http://{your_thinclient_ip}/System/MobileBridge', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/MobileBridge"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/System/MobileBridge", "rel": "mobile-bridge-list", "method": "GET"},
    { "href": "/System/IsNotRegistered", "rel": "is-not-registered", "method": "GET"},
    { "href": "/System/Restart", "rel": "restart", "method": "POST"},
    { "href": "/System/Restore", "rel": "restore", "method": "POST"},
    { "href": "/System/Update", "rel": "check-for-update", "method": "GET"},
    { "href": "/System/Update/State", "rel": "update-status", "method": "GET"},
    { "href": "/System/Update", "rel":"update-firmware", "method": "POST"},
    { "href": "/System/Upload", "rel":"upload-firmware", "method": "POST"}
  ],
  "Data": [
    { "ServerName": "My First Symphony Server", "IP": "192.168.0.60", "Version": "6.13.1.0", "FarmId": "12345" },
    { "ServerName": "My Second Symphony Server", "IP": "192.168.0.80", "Version": "6.12.4.7", "FarmId": "54321" }
  ],
  "Version": "1.1.1.234"
}

This endpoint attempts to discover available Mobile Bridge services on the network.

HTTP Request

GET http://{your_thinclient_ip}/System

Check Registration

import requests

requests.get('http://{your_thinclient_ip}/System/IsNotRegistered', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/IsNotRegistered"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/System/MobileBridge", "rel": "mobile-bridge-list", "method": "GET"},
    { "href": "/System/IsNotRegistered", "rel": "is-not-registered", "method": "GET"},
    { "href": "/System/Restart", "rel": "restart", "method": "POST"},
    { "href": "/System/Restore", "rel": "restore", "method": "POST"},
    { "href": "/System/Update", "rel": "check-for-update", "method": "GET"},
    { "href": "/System/Update/State", "rel": "update-status", "method": "GET"},
    { "href": "/System/Update", "rel":"update-firmware", "method": "POST"},
    { "href": "/System/Upload", "rel":"upload-firmware", "method": "POST"}
  ],
  "Data": false,
  "Version": "1.1.1.234"
}

This endpoint checks if the Thin Client has NOT been registered with XNet. Requires that the Thin Client has internet connectivity in order to contact XNet to get registration status. If the Thin Client was determined to be registered, that result will be cached on the Thin Client.

HTTP Request

GET http://{your_thinclient_ip}/System/IsNotRegistered

Restart The Thin Client

import requests

requests.get('http://{your_thinclient_ip}/System/Restart', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/Restart"
  -H "authtoken: {your_session_token}"

This endpoint restarts the Thin Client.

HTTP Request

GET http://{your_thinclient_ip}/System/Restart

Restore To Factory Defaults

import requests

requests.get('http://{your_thinclient_ip}/System/Restore', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/Restore"
  -H "authtoken: {your_session_token}"

This endpoint starts the factory restore process on the Thin Client.

HTTP Request

GET http://{your_thinclient_ip}/System/Restore

Get Latest Firmware Version

import requests

requests.get('http://{your_thinclient_ip}/System/Update', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/Update"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/System/MobileBridge", "rel": "mobile-bridge-list", "method": "GET"},
    { "href": "/System/IsNotRegistered", "rel": "is-not-registered", "method": "GET"},
    { "href": "/System/Restart", "rel": "restart", "method": "POST"},
    { "href": "/System/Restore", "rel": "restore", "method": "POST"},
    { "href": "/System/Update", "rel": "check-for-update", "method": "GET"},
    { "href": "/System/Update/State", "rel": "update-status", "method": "GET"},
    { "href": "/System/Update", "rel":"update-firmware", "method": "POST"},
    { "href": "/System/Upload", "rel":"upload-firmware", "method": "POST"}
  ],
  "Data": "1.1.2.345",
  "Version": "1.1.1.234"
}

This endpoint gets the latest firmware version available for download from XNet.

HTTP Request

GET http://{your_thinclient_ip}/System/Update

Get Current Update State

import requests

requests.get('http://{your_thinclient_ip}/System/Update/State', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/Update/State"
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/System/MobileBridge", "rel": "mobile-bridge-list", "method": "GET"},
    { "href": "/System/IsNotRegistered", "rel": "is-not-registered", "method": "GET"},
    { "href": "/System/Restart", "rel": "restart", "method": "POST"},
    { "href": "/System/Restore", "rel": "restore", "method": "POST"},
    { "href": "/System/Update", "rel": "check-for-update", "method": "GET"},
    { "href": "/System/Update/State", "rel": "update-status", "method": "GET"},
    { "href": "/System/Update", "rel":"update-firmware", "method": "POST"},
    { "href": "/System/Upload", "rel":"upload-firmware", "method": "POST"}
  ],
  "Data": "Step 1 Of 10: verifying integrity of firmware.",
  "Version": "1.1.1.234"
}

This endpoint gets a localized string representing the current state of the update process.

HTTP Request

GET http://{your_thinclient_ip}/System/Update/State

Start Online Update Process

import requests

requests.post('http://{your_thinclient_ip}/System/Update', 
    headers={'authtoken': '{your_session_token}'})
curl "http://{your_thinclient_ip}/System/Update"
  -X POST
  -H "authtoken: {your_session_token}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/System/MobileBridge", "rel": "mobile-bridge-list", "method": "GET"},
    { "href": "/System/IsNotRegistered", "rel": "is-not-registered", "method": "GET"},
    { "href": "/System/Restart", "rel": "restart", "method": "POST"},
    { "href": "/System/Restore", "rel": "restore", "method": "POST"},
    { "href": "/System/Update", "rel": "check-for-update", "method": "GET"},
    { "href": "/System/Update/State", "rel": "update-status", "method": "GET"},
    { "href": "/System/Update", "rel":"update-firmware", "method": "POST"},
    { "href": "/System/Upload", "rel":"upload-firmware", "method": "POST"}
  ],
  "Data": 0,
  "Version": "1.1.1.234"
}

This endpoint starts the process of downloading the latest firmware update from XNet and updating the Thin Client.

HTTP Request

POST http://{your_thinclient_ip}/System/Update

Upload Firmware

import requests

requests.post('http://{your_thinclient_ip}/System/Upload', 
    data='{binary_file_content}',
    headers={'authtoken':'{your_session_token}','content-type':'application/octet-stream'})
curl "http://{your_thinclient_ip}/System/Upload"
  -X POST
  -H "authtoken: {your_session_token}"
  -H "content-type: application/octet-stream"
  -d "{binary_file_content}"

The above command returns JSON structured like this:

{
  "Links": [
    { "href": "/System/MobileBridge", "rel": "mobile-bridge-list", "method": "GET"},
    { "href": "/System/IsNotRegistered", "rel": "is-not-registered", "method": "GET"},
    { "href": "/System/Restart", "rel": "restart", "method": "POST"},
    { "href": "/System/Restore", "rel": "restore", "method": "POST"},
    { "href": "/System/Update", "rel": "check-for-update", "method": "GET"},
    { "href": "/System/Update/State", "rel": "update-status", "method": "GET"},
    { "href": "/System/Update", "rel":"update-firmware", "method": "POST"},
    { "href": "/System/Upload", "rel":"upload-firmware", "method": "POST"}
  ],
  "Data": 0,
  "Version": "1.1.1.234"
}

This endpoint accepts a firmware file and attempts to update the Thin Client with it.

HTTP Request

POST http://{your_thinclient_ip}/System/Upload

Glossary

Terms

The following terms are common in documentation and use of the Thin Client:

Term Meaning
Panel The whole of what appears on the monitor – A grid of Cells, each of which may be assigned a specific Camera. May also be referred to as a View.
Cell The display of a single Video Stream on the screen – May be assigned a single Camera.
Camera The representation of a Physical Device or Channel on an Encoder – Provides one or more Video Streams, the most appropriate of which will be displayed in any Cell the Camera is assigned to.
PanelWidth The number of Cells appearing next to each other horizontally within a Panel – Possible values are 1, 2, 3 and 4.
PanelHeight The number of Cells appearing next to each other vertically within a Panel – Possible values are 1, 2, 3 and 4. Must be less than or equal to PanelWidth.

Errors

The Thin Client API uses the following error codes:

Error Code Meaning
401 Unauthorized – The administrator password used to authorize was incorrect.
403 Forbidden – Session token is incorrect or represents an invalid/expired session.
404 Not Found – The specified resource could not be located.
500 Internal Server Error – Thin Client encountered a problem while processing the request. If problem persists, check system logs or contact support.

Sample Usage

Change Active Panel

@echo off
set address=http://10.234.25.67
set password=admin
set panel_name=My Four View

for /f "delims=" %%i in ('curl -s "%address%/Session"^
 -X POST -H "Content-Type: application/json"^
 -d "{'user':'admin','pwd':'%password%'}"^
 ^| jq -r .Data.Token') do set authtoken=%%i

for /f "delims=" %%i in ('curl -s "%address%/Panel"^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"^
 ^| jq -r ".Data[]|select(.PanelName==\"%panel_name%\")|.PanelGuid"') do set panel_guid=%%i

curl -s "%address%/Panel/%panel_guid%/Show"^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"

curl -s "%address%/Session/%authtoken%"^
 -X DELETE^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"

Switches to the panel named “My Four View”.

Change Camera

@echo off
set address=http://10.234.25.67
set password=admin
set camera_name=Axis 223M
set cell=0

for /f "delims=" %%i in ('curl -s "%address%/Session"^
 -X POST -H "Content-Type: application/json"^
 -d "{'user':'admin','pwd':'%password%'}"^
 ^| jq -r .Data.Token') do set authtoken=%%i

for /f "delims=" %%i in ('curl -s "%address%/Panel"^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"^
 ^| jq -r ".Data[]|select(.Default)|.PanelGuid"') do set panel_guid=%%i

for /f "delims=" %%i in ('curl -s "%address%/Camera"^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"^
 ^| jq -r ".Data[]|select(.Name==\"%camera_name%\")|.Id"') do set camera_id=%%i

curl -s "%address%/Panel/%panel_guid%/Cell/%cell%/Camera/%camera_id%"^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"

curl -s "%address%/Session/%authtoken%"^
 -X DELETE^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"

Switches to the camera named “Axis 223M” in cell index 0 of the active panel.

PTZ Camera Relative Movement

@echo off
set address=http://10.234.25.67
set password=admin
set cell=0
set pan=50
set tilt=0
set zoom=0

for /f "delims=" %%i in ('curl -s "%address%/Session"^
 -X POST -H "Content-Type: application/json"^
 -d "{'user':'admin','pwd':'%password%'}"^
 ^| jq -r .Data.Token') do set authtoken=%%i

curl -s "%address%/PTZ/%cell%/Relative/Pan/%pan%/Tilt/%tilt%/Zoom/%zoom%"^
 -X PUT -d ""^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"

curl -s "%address%/Session/%authtoken%"^
 -X DELETE^
 -H "Content-Type: application/json" -H "authtoken: %authtoken%"

Pans to the right relative of the current location with the PTZ Camera in cell index 0 of the active panel.