update_event_data

To specify event parameters, use the unit/update_event_data command.

Copied!
svc = unit/update_events & params = {
    {
        "itemId": <long>,
        "eventType": <text>,
        "timeFrom": <uint>,
        "timeTo": <uint>,
        "params": {
            "test1": <uint>,
            "test2": <text>
        }
    }
}

Parameters

The request must contain the following parameters:

Parameter Description
itemId Unit ID.
eventType Type of event (lls, fuel drain, fuel filling, sensors,ignition, trips, etc.)
timeFrom Event beginning.
timeTo Event end.
params Object with updated parameters.

Example

Below is an example of the unit/update_event_data request.

Copied!
svc = unit/update_events & params = {
    "events": [
        {
            "itemId": 1555,
            "resourceId": 123,
            "eventType": "lls",
            "timeFrom": 1689734883,
            "timeTo": 1689734883,
            "params": {
                "test1": 1
            }
        }
    ]
}

Response

If the request is completed successfully, a response in the following format is returned:

Copied!

{
    "msgs": 1 /* Number of updated events. */
}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
7 No ADF_ACL_AVL_RES_EDIT_REPORTS access right to the unit.

If you find a mistake in the text, please select it and press Ctrl+Enter.

Your message was sent. Thank you!

Report a mistake

An error occurred while submitting the form

Download PDF file
Download Word document

See also