update_operating

To start or stop a retranslator, or to retranslate messages for a past period, use the retranslator/update_operating method.

Endpoint

Copied!
svc=retranslator/update_operating&params={
    "itemId": <long>,
    "operate": <bool>,
    "callMode": <text>,
    "stopTime": <uint>,
    "timeFrom": <uint>,
    "timeTo": <uint>
}

Parameters

The request can contain the following parameters. The required parameters are marked with an asterisk (*).

Parameter Description
itemId* Retranslator ID.
operate* Start or stop the retransmission: true to start and false to stop. The values 1 and 0 are also accepted.
callMode Mode of the request:
  • switch: starts or stops the retranslator;
  • history: starts or stops the retransmission of messages for a past period.
If the parameter isn’t specified, the switch value is used. Any other value returns error 4.
stopTime Time (Unix timestamp) when the retranslator stops automatically. Used only if callMode is switch and operate is true. If the parameter isn’t specified, the retranslator isn’t stopped automatically.
timeFrom Beginning of the period for which the messages are retranslated (Unix timestamp). Required if callMode is history and operate is true.
timeTo End of the period for which the messages are retranslated (Unix timestamp). Required if callMode is history and operate is true.

Response

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

Copied!
{
    "rtro":<int>,   /* State of the retranslator: 0 for stopped, 1 for started. */
    "rtrst":<uint>  /* Time (Unix timestamp) when the retranslator stops automatically. 0 if the time isn't set. */
}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Failed to parse the input parameters, the callMode value isn’t supported, or the retranslator failed to start or stop.
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.