create_retranslator

To create a new retranslator, use the core/create_retranslator method.

Copied!
svc=core/create_retranslator&params={
  "creatorId": <long>,
  "name": "<text>",
  "config": {
    "protocol": "<text>",
    "server": "<text>",
    "port": <ushort>,
    "auth": "<text>",
    "ssl": <int>,
    "debug": <int>,
    "v6type": <int>
  },
  "dataFlags": <uint>
}

Parameters

Parameter Description
creatorId The ID of the user that should be the creator of the retranslator.
name The name of the retranslator (4–50 characters).
config Retranslator configuration.
protocol Protocol ID (see update_config).
server Retranslation server.
port Port (for all protocols, except NIS).
auth Authorization (only for NIS and Wialon IPS protocols).
ssl Using SSL (for NIS):
  • 0: no;
  • 1: yes.
debug Using the debug mode:
  • 0: no;
  • 1: yes.
v6type Using the protocol version 6 (only for Granit Navigator):
  • 0: no;
  • 1: yes.
dataFlags Flags with the retranslator properties for the response (see Retranslators).

Response

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

Copied!
{
  "item": {         /* Created retranslator. */
    ...
  },
  "flags": <uint>   /* Applied flags with properties. */
}

The format of the item parameter is described on the Retranslators page.

If the request fails, an error code is returned.

Error codes

Error code Description
4 One of the following errors:
  • Wrong input parameters.
  • Failed to validate the configuration.
  • Failed to create the retranslator with the specified protocol (see the reason field for details).
6 One of the following errors:
  • Failed to fetch the creator, or you have no Act on behalf of this user access right to the creator.
  • The current user doesn’t have the Can create items flag (0x04).
  • Failed to create the retranslator.

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