activity_settings
By default, the driver activity source isn’t selected (0). To set a source, use the unit/update_activity_settings method. For the description of the sources, see Driver activity by online data.
svc=unit/update_activity_settings¶ms={"itemId":<long>,
"type":<uint>}
Parameters
| Parameter | Description |
|---|---|
| itemId | Unit ID |
| type | Source type. The following types can be used:
|
Response
If the request is completed successfully, the response is empty.
{ }
Otherwise, an error code is returned.
Error codes
| Code | Description |
|---|---|
| 4 | Invalid input parameters. |
| 6 | Failed to set a new type. |
| 7 | The unit doesn’t exist, or the user doesn’t have the Edit trip, driving and health check settings access right to it. |
Getting the selected source
To get the selected activity source, use the unit/get_activity_settings method.
svc=unit/get_activity_settings¶ms={"itemId":<long>}
Response
If the request is completed successfully, the response contains the source type.
{
"type": <int> /* selected source */
}
Otherwise, an error code is returned:
| Code | Description |
|---|---|
| 4 | Invalid input parameters. |
| 7 | The unit doesn’t exist, or the user doesn’t have the View detailed object properties access right to it. |