update_config

To update the retranslator configuration, use the retranslator/update_config method.

The configuration is replaced completely, not updated field by field. Specify all the fields you need in the request: the fields which aren’t specified are lost. The only exception is the debug field, which is kept from the previous configuration.

Endpoint

Copied!
svc=retranslator/update_config&params={
    "itemId": <long>,
    "config": {
        "protocol": <text>,
        "server": <text>,
        "port": <ushort>
    }
}

Parameters

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

Parameter Description
itemId* Retranslator ID.
config* Configuration of the retranslator.
protocol* Protocol name (see Protocols).
server Server for retransmission. Required for all the protocols listed in the Protocols section.
port Port. Required for the wialon, wialon_ips, granit3, skaut, cyber_glx, vt300, egts, trn, and nvg protocols.
auth Authorization data. For the Nis protocol, specify the login and password separated by a colon (login:password). Required for the nis and rtti protocols.
ssl Secure connection: 1 for yes, 0 for no. Required for the nis protocol.
v6type Use protocol version 6: 1 for yes, 0 for no.
attach_sensors Retranslate the calculated values of sensors: 1 for yes, 0 for no.
scoutOpen Use the Skaut Open variant of the protocol: 1 for yes, 0 for no.
notauth Disable authorization: 1 for yes, 0 for no.
timeoutauth Time in seconds after which the authorization repeats. If the value is 0, the connection is authorized once.
didauth Use the device ID for authorization: 1 for yes, 0 for no.
fuel Retranslate the values of fuel level sensors: 1 for yes, 0 for no.
binauth Send the authorization code in binary form: 1 for yes, 0 for no.
carrier Carrier ID.
login Login. Required for the soap protocol.
password Password. Required for the soap protocol.
debug Use the debug mode: 1 for yes, 0 for no. If the parameter isn’t specified, its value is taken from the previous configuration.

The set of fields inside config depends on the protocol. The protocol and server fields are required for all the protocols listed in the Protocols section, and the rest are listed in the same section. If a required field is missing, the request returns error 4.

Protocols

The required fields are marked with an asterisk (*). The port values in parentheses are the values the interface suggests; the API doesn’t apply them automatically.

Value Protocol Fields besides protocol and server
wialon Wialon Retranslator port* (20163), attach_sensors
wialon_ips Wialon IPS port* (20332), auth, attach_sensors
nis Nis auth, ssl
granit3 Granit Navigator port* (20121), v6type
skaut Skaut port* (20117), scoutOpen
cyber_glx Cyber GLX port* (20185)
vt300 VT300 port* (20180)
egts EGTS port* (20629), notauth, timeoutauth, didauth, fuel
soap SOAP login, password
trn TRN port* (4880), auth, binauth
nvg NVG port* (8416)
rtti RTTI auth*, carrier

Response

If the request is completed successfully, the current configuration of the retranslator is returned in the following format:

Copied!
{
    "rtrc":{
        "protocol":<text>,  /* Protocol. */
        "server":<text>,    /* Server for retransmission. */
        "port":<ushort>     /* Port. */
    }
}

The set of the returned fields depends on the protocol, as in the request. For details, see the Retranslators data format page.

Otherwise, an error code is returned.

Error codes

Error code Description
4 Failed to parse the input parameters, the specified protocol isn’t supported, or failed to save the configuration.
6 Failed to generate the response.
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.