create_route

To create a new route, use the core/create_route method.

Endpoint

Copied!
svc=core/create_route&params={
  "creatorId": <long>,
  "name": "<text>",
  "dataFlags": <uint>
}

Parameters

The request must contain the following parameters:

Parameter Description
creatorId The ID of the user that should be the creator of the new route. You must have the Act on behalf of this user access right to this user.
name Route name (4–50 characters).
dataFlags Flags with the route properties for the response (see the Routes page).

Response

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

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

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

If the request fails, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
6 One of the following errors:
  • Failed to fetch the route creator, or you have no Act on behalf of this user access right to the creator.
  • The current user has no permission to create items.
  • Failed to create the route.
  • Failed to check the access rights of the current user to the route.
7 Route library not loaded.

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