Go to documentation repository
Documentation for Axxon One 2.0. Documentation for other versions of Axxon One is available too.
On this page:
Getting the list of macros
GET http://IP-Address:port/prefix/macro/list/
Parameter | Required | Description |
---|---|---|
exclude_auto | No | Getting the list of macros without automatic rules (see Automatic rules) |
Sample request:
GET http://127.0.0.1:80/macro/list/?exclude_auto
Sample response:
{ "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:
GET http://127.0.0.1/v1/logic_service/macros
Sample response:
[ { "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}
{id} is an id from the list of macros.
Sample request:
GET http://127.0.0.1:80/macro/execute/941f88d1-b512-4189-84a6-7d274892dd95
Possible error codes when executing macros:
Error code | Description |
---|---|
400 | Incorrect request |
500 | Server internal error |
404 | Incorrect id (only for the "execute" macro) |
Overview
Content Tools