update_config
To update the route configuration, use the update_config method:
svc=route/update_config
params={
"itemId": <long>,
"config": {
"color": <uint>,
"descr": <text>,
"units": [<long>]
}
}
You can create a route using the core/create_route method.
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
itemID | Route ID. |
config | Configuration. |
color | Color (ARGB). |
descr | Description. |
units | Array of unit IDs. |
Response
If the request is completed successfully, the response is returned in the following format:
{
"rcfg": { // Route configuration.
"color": <uint>, // Color (ARGB).
"descr": <text>, // Description.
"units": [<long>] // Array of unit IDs.
}
}
If the request fails, an error code is returned.
Error codes
Error Code | Description |
---|---|
4 | Invalid input parameters, or failed to update the configuration. |
6 | Internal server error. |
7 | Internal error or missing ADF_ACL_AVL_ROUTE_EDIT_SETTINGS access right to the route. |