registry_custom_event
To register a custom event, use the unit/registry_custom_event command.
svc=unit/registry_custom_event¶ms={
"date":<uint>,
"x":<double>,
"y":<double>,
"description":<text>,
"violation":<uint>,
"itemId":<long>,
"nt":<text>,
"nct":<text>
}
Parameters
The required parameters are marked with an asterisk (*):
Parameter | Description |
---|---|
date* | Date. |
x* | Longitude. |
y* | Latitude. |
description* | Description. |
violation* | Violation: 0 - common event, 1 - violation. |
itemId* | Unit ID. |
nt | Notification text. |
nct | Notification creation time. |
The nt and nct parameters must be used simultaneously.
These parameters are passed when registering an event for an online notification, and the triggered notification text is assigned to them.
Response
If the request is completed successfully, an empty response is returned.
{ }
Otherwise, an error code is returned.
Error codes
Error code | Description |
---|---|
4 | This user can't execute the request. |
6 | Failed to register the event. |
7 | The user doesn't have the required access right to the unit (ADF_ACL_AVL_UNIT_REG_EVENTS). |