Go to documentation repository
Page History
...
| Section | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Tip |
|---|
...
Pozyskaj listę wszystkich makr
POST http://IP-address:port/prefix/grpc
Request bodyBody zapytania:
| Code Block |
|---|
{
"method":"axxonsoft.bl.logic.LogicService.ListMacros",
"data": {
"view": "VIEW_MODE_FULL"
}
} |
...
| Info | ||
|---|---|---|
| ||
VIEW_MODE_FULL - complete information; VIEW_MODE_STRIPPED - only basic information about macros without the launch and operation conditions. |
...
Pozyskaj wszystkie informacje na temat jednego/kilku makr
| Code Block |
|---|
{
"method":"axxonsoft.bl.logic.LogicService.BatchGetMacros",
"data":{
"macros_ids" : ["cfd41b18-c983-4a48-aaa1-ca7e666e6e49"]
}
} |
...
Utwórz/
...
Usuń/
...
Zmień makro
| Note | ||
|---|---|---|
| ||
Requests for creating and changing a macro should contain its entire structureŻądania tworzenia oraz zmiany makr powinny zawierać całą ich strukturę. |
Creating:
| Code Block |
|---|
{
"method": "axxonsoft.bl.logic.LogicService.ChangeMacros",
"data": {
"added_macros": {
"guid": "3303abb2-181e-4183-8987-8a06c309a741",
"name": "TEST_MACRO",
"mode": {
"enabled": true,
"user_role": "",
"is_add_to_menu": true,
"common": {}
},
"conditions": {
"0": {
"path": "/C:0",
"archive_write": {
"camera": "hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0",
"state": "ON"
}
},
"1": {
"path": "/C:0",
"archive_write": {
"camera": "hosts/SERVER1/DeviceIpint.1/SourceEndpoint.video:0:0",
"state": "ON"
}
}
},
"rules": {
"0": {
"path": "/E:0",
"action": {
"timeout_ms": 60000,
"cancel_conditions": {},
"action": {
"raise_alert": {
"zone": "",
"archive": "",
"offset_ms": 0,
"mode": "RAM_AlwaysIfNoActiveAlert"
}
}
}
},
"1": {
"path": "/E:0",
"action": {
"timeout_ms": 60000,
"cancel_conditions": {},
"action": {
"raise_alert": {
"zone": "",
"archive": "",
"offset_ms": 0,
"mode": "RAM_AlwaysIfNoActiveAlert"
}
}
}
}
}
}
}
} |
Changing (removing conditions and rulesZmiana (usunięcie warunków i zasad):
| Info | ||
|---|---|---|
| ||
Leave empty curly brackets Pozostaw puste nawiasy { } in the w grupach conditions and oraz rules groups. |
| Code Block |
|---|
{
"method": "axxonsoft.bl.logic.LogicService.ChangeMacros",
"data": {
"modified_macros": {
"guid": "3303abb2-181e-4183-8987-8a06c309a741",
"mode": {
"common": {}
},
"conditions": {
"0": {}
},
"rules": {
"1": {}
}
}
}
} |
RemovingUsuwanie:
| Code Block |
|---|
{
"method":"axxonsoft.bl.logic.LogicService.ChangeMacros",
"data":{
"removed_macros" : ["3303abb2-181e-4183-8987-8a06c309a741"]
}
} |
...
Uruchom makro
| Code Block |
|---|
{
"method":"axxonsoft.bl.logic.LogicService.LaunchMacro",
"data":{
"macro_id" : "caef76f0-37e9-43b0-aba6-c2a2f32ccd2f"
}
} |
Examples
Przykłady
Pozyskaj informacje o automatycznej reguleGet information on automatic rule
ResponseOdpowiedź:Expand Code Block { "items": [ { "guid": "4932bbc7-c702-4a18-b050-2898b1b61738", "name": "534k_1.Camera. Motion detection", "mode": { "enabled": true, "user_role": "", "is_add_to_menu": false, "autorule": { "zone_ap": "hosts/Server1/DeviceIpint.6/SourceEndpoint.video:0:0", "only_if_armed": false, "timezone_id": "00000000-0000-0000-0000-000000000000" } }, "conditions": { "0": { "path": "/C:0", "detector": { "event_type": "MotionDetected", "source_ap": "hosts/Server1/AVDetector.4/EventSupplier", "state": "BEGAN", "details": [] } } }, "rules": { "1": { "path": "/E:1", "action": { "timeout_ms": 0, "cancel_conditions": { "0": { "path": "/E:1/C:0", "detector": { "event_type": "MotionDetected", "source_ap": "hosts/Server1/AVDetector.4/EventSupplier", "state": "ENDED", "details": [] } } }, "action": { "raise_alert": { "zone": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", "archive": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage", "offset_ms": 0, "mode": "RAM_AlwaysIfNoActiveAlert" } } } }, "0": { "path": "/E:0", "action": { "timeout_ms": 0, "cancel_conditions": { "0": { "path": "/E:0/C:0", "detector": { "event_type": "MotionDetected", "source_ap": "hosts/Server1/AVDetector.6/EventSupplier", "state": "BEGAN", "details": [] } } }, "action": { "write_archive": { "camera": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", "archive": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage", "min_prerecord_ms": 0, "post_event_timeout_ms": 0 } } } } } } ] }- Create a macroUtwórz makro.
| Expand | |||||||
|---|---|---|---|---|---|---|---|
|

