Documentation for C-Werk 2.0.

Previous page Get camera events using WebSocket  Working with layouts and videowalls Next page

Working with layouts and videowalls

Sequence of actions

Attention!

  • All Client HTTP API requests should be executed on the VMS Client, which must be run as an Administrator.
  • When executing commands, you must run the command line as an Administrator.
  • Requests must include the Client's IP address.
  • Port 8888 must be free.
  • Antivirus and Firewall must be disabled.

Before you start working with Client HTTP API requests, run the following command in the command line:

netsh http add urlacl url=http://IP-address:8888/ user=DOMAIN\username

where

  • IP-address—the Client's IP address on which Client HTTP API requests should be executed.
  • DOMAIN\username—username. To find out the username, enter the whoami command in the command line.

Note

On Linux, no additional commands are required.

After the command is successfully executed, you can execute the queries described below.

Getting the list of layouts

GET http://IP-adress:8888/GetLayouts − getting available layouts for current logged user.

Sample response:

{
    "Description": "",
    "Status": "OK",
    "LayoutInfo": [
        {
            "Id": "102",
            "Name": "Layout name 2"
        },
        { 
			"Id": "103",
            "Name": "Layout name 3"
        }
    ]
}

Here is an example of an error message:

 {
\"result\":\"no layouts\"
}

Note

An error can occur while requesting the list of Server layouts if the UAC is enabled on the Server. Disable this function in order to eliminate the error.

Switching the layout on the screen

GET http://IP-address:8888/SwitchLayout
ParametrRequiredDescription
layoutIdYesLayout id (see Getting the list of layouts).
displayIdYesMonitor id (see Getting the list of displays).

Sample request:

GET http://127.0.0.1:8888/SwitchLayout?layoutId=102&displayId=\\.\DISPLAY1

Sample response:

{
    "Description": "",
    "Status": "OK"
}

Here is an example of an error message:

{
	\"result\":\"error\"
}

Note

An error can occur if a layout with non-existent ID is specified.

Getting the list of cameras displayed on the layout

GET http://IP-address:8888/GetCameras
ParameterRequiredDescription
layoutIdYes

Layout id (see Getting the list of layouts).

If the layout with specified id will not be found, then the query will return the list of cameras of the current layout for the specified display.

displayIdYesMonitor id (see Getting the list of displays).

Sample request:

GET http://127.0.0.1:8888/GetCameras?layoutId=102&displayId=\\.\DISPLAY1

Sample response:

{
    "Description": "",
    "Status": "OK",
    "CameraInfo": [
        {
            "DisplayName": "1.Camera",
            "Id": "1",
            "Name": "host/HOSTNAME/DeviceIpint1/SourceEndPoint.video:0:0"
        },
        {
            "DisplayName": "2.Camera",
            "Id": "2",
            "Name": " host/HOSTNAME/DeviceIpint2/SourceEndPoint.video:0:0"
        }
    ]
}

Adding and removing cameras


On page:

Removing a camera from the current layout

GET http://IP-address:8888/RemoveCamera

ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).
cameraNameYes

Camera name from the response to Getting the list of cameras displayed on the layout request.

Sample request:

GET http://127.0.0.1:8888/RemoveCamera?displayId=\\.\DISPLAY1&cameraName=host/HOSTNAME/DeviceIpint1/SourceEndPoint.video:0:0

Sample responce:

{ 
	"Description": "", 
	"Status": "OK" 
}

Here is an example of an error message:

{ 
	"Description": "Error description", 
	"Status": "ERROR" 
}

Removing all cameras from the current layout

GET http://IP-address:8888/RemoveAllCameras

ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).

Sample request:

GET http://127.0.0.1:8888/RemoveAllCameras?displayId=\\.\DISPLAY1

Adding a camera to the current layout

GET http://IP-address:8888/AddCamera

ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).
cameraNameYes

Camera name from the response to Getting the list of cameras displayed on the layout request.


Sample request:

GET http://127.0.0.1:8888/AddCamera?displayId=\\.\DISPLAY1&cameraName=host/HOSTNAME/DeviceIpint1/SourceEndPoint.video:0:0

Getting the list of displays

GET http://IP-address:8888/GetDisplays − getting available displays for current logged user.

Sample response:

{
    "Description": "",
    "Status": "OK",
    "DisplayInfo": [
        {
            "Id": "\\\\.\\DISPLAY1",
            "IsMainForm": true
        },
        {
            "Id": "\\\\.\\DISPLAY2",
            "IsMainForm": false
        }
    ]
}
ParametrDescription
id

Display ID.

IsMainForm

The 'true' value corresponds to the main display.

Attention! In other requests, use the monitor Id in the following format: \\.\DISPLAY1

Here is an example of an error message:

{
	"{\"result\":\"no displays\"}"
}

Selecting active display

GET http://IP-address:8888/SelectDisplay
ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).

Sample request:

GET http://127.0.0.1:8888/SelectDisplay?displayId=\\.\DISPLAY1

Sample responce:

{
"Description": "",  
"Status": "OK"
}

Here is an example of an error message:

{
	\"result\":\"error\"
}

Switching camera to archive mode

GET http://IP-address:8888/GotoArchive
ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).
cameraNameYes

Camera name from the response to Getting the list of cameras displayed on the layout request.

timestampYes

Time in ISO format.

Sample request:

GET http://127.0.0.1:8888/GotoArchive?displayId=\\.\DISPLAY2&cameraName=hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0&timestamp=2017-04-07T00:00:00.000

Note

Use the following query to get the list of groups:

GET http://IP-address:8888/GetGroups.

Sample response:

 Id	"4308f2e2-e57c-4cd0-8a4f-826e8b16d39c"
   Name	"Default"

Switching to layout with camera in forensic search mode

GET http://IP-address:8888/SearchArchive
ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).
cameraNameYes

Camera name from the response to Getting the list of cameras displayed on the layout request.

timestampYes

Time in ISO format.

Sample request:

GET http://127.0.0.1:8888/GoToArchive?displayId=\\.\DISPLAY2&cameraName=hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0×tamp=2017-04-07T00:00:00.000

Switching to saved forensic search results

GET http://IP-address:8888/SearchArchive

ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).
cameraNameYes

Camera name from the response to Getting the list of cameras displayed on the layout request.

query

Yes

Name of the saved search query (see Saving search queries).

Sample request:

GET http://127.0.0.1:8888/SearchArchive?displayId=\\.\DISPLAY1&cameraName=host/HOSTNAME/DeviceIpint1/SourceEndPoint.video:0:0&query=query1

Switching to layout with camera in immersion mode

GET http://IP-address:8888/GotoImmersion
ParametrRequiredDescription
displayIdYesMonitor id (see Getting the list of displays).
cameraNameYes

Camera name from the response to Getting the list of cameras displayed on the layout request.

Sample request:

GET http://127.0.0.1:8888/GotoImmersion?displayId=\\.\DISPLAY1&cameraName=hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0

Content

  • No labels