load_interval

To load messages for a certain interval, use the method messages/load_interval:

Copied!
svc=messages/load_interval&params={
  "itemId": <long>,
  "timeFrom": <uint>,
  "timeTo": <uint>,
  "flags": <uint>,
  "flagsMask": <uint>,
  "loadCount": <uint>
}

This request can’t be executed simultaneously with the following requests:

Parameters

The required parameters are marked with an asterisk (*).

Name Description
itemId* Unit or resource ID (depends on the type of message you want to get).
timeFrom* Interval beginning.
timeTo* Interval end.
flags* Flags for loading messages. See the description below.
flagsMask* Mask. See the description below.
loadCount* Number of messages to return (0xffffffff means all the found ones).

Examples of using masks and flags

Mask Flag Result
0xFF00 0x0000 All data messages.
0xFF10 0x0010 Data messages which contain the alarm bit (0x10).
0xFFF0 0x0010 Data messages which contain the alarm bit (0x10), but don’t contain information about the driver code (0x20).
0xFFF2 0x0022 Data messages which contain information about the driver code (0x20) and input data information (0x02), but don’t contain the alarm bit (0x10).
0xFF01 0x0601 Events regarded as violations.
0x4000 0x4000 Data messages which contain information about triggered notifications.

Response

If the request is completed successfully, the response is as follows:

Copied!
{
  "count": <uint>,              /* number of messages */
  "messages": [                 /* array of messages */
    {
      ...
    }
  ]
}

You can find message formats, masks and flags here.

If the request is not completed successfully, an error code is returned.

Error codes

Error code Description
7 Failed to fetch the message manager.
6 Failed to fetch messages for the interval.
4 Failed to get the current user.
1003 Accept-encoding is not gzip.

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

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form