activity_settings
The default source of driver activity are assignments and trips. To set a different source, use the unit/update_activity_settings command.
svc=unit/update_activity_settings¶ms={"itemId":<long>,
"type":<int>}
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 |
---|---|
6 | Failed to set a new type. |
7 | Failed to fetch the item because the user doesn't have the required access right to it (ADF_ACL_AVL_UNIT_EDIT_REPORT_SETTINGS) |
Getting the selected source
To get the selected activity source, use the unit/get_activity_settings command.
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, the response contains error code 7: failed to fetch the report object and resource because the used doesn’t have the required access right to them (ADF_ACL_ITEM_VIEW_PROPERTIES).