load_last

To load a few latest messages for a specified point in time, use the command messages/load_last:

Copied!
svc=messages/load_last&params={"itemId":<long>,
			       "lastTime":<uint>,
			       "lastCount":<uint>,
			       "flags":<uint>,
			       "flagsMask":<uint>,
			       "loadCount":<uint>}

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).

lastTime*

Time for which messages are requested.

lastCount*

Number of messages which should be loaded.

flags*

Message flags. Used for loading messages with the specified flags only. See more.

flagsMask*

Mask. See load_interval.

loadCount*

Number of messages to return.

Response

If the request is executed successfully, the following result is returned:

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

You can find message formats here.

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

Error codes

Error codeDescription
7Failed to fetch the message manager with the required ACL (ADF_ACL_ITEM_EXECUTE_REPORTS).
6Failed to fetch unit messages.
4No messages found for the specified interval, or the number of messages exceeds the limit (10000).
Download PDF file
Download Word document

See also