activity_settings

The default source of driver activity are assignments and trips. To set a different source, use the unit/update_activity_settings command.

Copied!
svc=unit/update_activity_settings&params={"itemId":<long>,
					  "type":<int>}

Parameters

Parameter

Description

itemId

Unit ID

type

Source type. The following types can be used:

  • 0 - none
  • 1 - assignments
  • 2 - tachograph

Response

If the request is completed successfully, the response is empty.

Copied!
{ } 

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.

Copied!
svc=unit/get_activity_settings&params={"itemId":<long>}

Response

If the request is completed successfully, the response contains the source type.

Copied!
{
"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).

Download PDF file
Download Word document

See also