get_stats

To get the state of the retransmission of messages for a past period, use the retranslator/get_stats method. The period is set with the update_operating method.

Endpoint

Copied!
svc=retranslator/get_stats&params={
    "itemId": <long>
}

Parameters

The request must contain the itemId parameter specifying the retranslator ID.

Response

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

Copied!
{
    "au": <long>,   /* Number of units added to the retranslator. */
    "ru": <long>,   /* Number of units whose messages are still to be retranslated. */
    "hf": <long>,   /* Beginning of the period for which the messages are retranslated (Unix timestamp). */
    "hc": <uint>,   /* Time of the messages that are being retranslated now (Unix timestamp). */
    "ht": <long>,   /* End of the period for which the messages are retranslated (Unix timestamp). */
    "hms": <uint>,  /* Number of messages in the queue. */
    "hp": <uint>    /* Progress of the retransmission, in percent. */
}

If the retransmission for a past period isn’t started, the time values and the progress are 0.

Otherwise, an error code is returned.

Error codes

Error code Description
4 Failed to parse the input parameters.
7 The specified item isn’t a retranslator, or the user has no access right to edit the retranslator settings including its start and stop (ACL bit 0x100000, see Tokens).

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