Go to documentation repository
Page History
Section | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Getting the list of macros
...
Parameter | Required | Description |
---|---|---|
exclude_auto | No | Getting the list of macros without automatic rules (see Automatic Rulesrules) |
Sample request:
GET http://127.0.0.1:80/macro/list/?exclude_auto
...
Code Block |
---|
{ "macroCommands" : [ { "id" : "4fd9420e-0d22-4684-9f0a-3514240cc1ac", "name" : "Name 2" }, { "id" : "0d1e05e6-8b4b-4be7-bc44-fcdf2cde4135", "name" : "Name 1" } ] } |
Parameter | Description |
---|---|
id | Displays the macro ID |
name | Displays the macro name |
Sample request to get a list of macros with automatic rules:
...
Code Block |
---|
[ { "guid": "0667120b-46af-407b-ae79-4603c119652e", "name": "19.0.Camera: 1.Motion detection", "mode": { "enabled": true, "user_role": "", "is_add_to_menu": false, "autorule": { "zone_ap": "hosts/Server1/DeviceIpint.19/SourceEndpoint.video:0:0", "only_if_armed": false, "timezone_id": "00000000-0000-0000-0000-000000000000" } }, "conditions": {}, "rules": {} }, { "guid": "4fd9420e-0d22-4684-9f0a-3514240cc1ac", "name": "Macro1", "mode": { "enabled": true, "user_role": "", "is_add_to_menu": false, "common": {} }, "conditions": {}, "rules": {} }, { "guid": "0d1e05e6-8b4b-4be7-bc44-fcdf2cde4135", "name": "Macro2", "mode": { "enabled": true, "user_role": "", "is_add_to_menu": false, "continuous": { "server": "Server1", "timezone_id": "00000000-0000-0000-0000-000000000000", "heartbeat_ms": 30000, "random": true } }, "conditions": {}, "rules": {} } ] |
Parameter | Description |
---|---|
mode | Contains general information about the macro |
is_add_to_menu | Indicates whether a macro was added to the menu:
|
Executing macro
GET http://IP-Address:port/prefix/macro/execute/{id}
...
Overview
Content Tools