add_log_record

The add_log_record function is used to add a log record.

Copied!
svc=item/add_log_record&params={"itemId":<long>,
								"action":"<text>",
								"newValue":"<text>",
								"oldValue":"<text>"}

Parameters

Name Description
itemId Item ID.
action Action ID written to the item log. See the list of available actions below.
newValue Action-specific parameter #1 (stored as log parameter p1). Its meaning depends on action.
oldValue Action-specific parameter #2 (stored as log parameter p2). Its meaning depends on action; may be empty for many actions.

Below are available actions and the corresponding log record text.

General

Action ID Action description Action text
custom_msg Manual record Manual record: ‘%s’.
create_unit Item creation Unit ‘%s’ created.
create_user Item creation User ‘%s’ created.
create_group Item creation Unit group ‘%s’ created.
create_resource Item creation Resource ‘%s’ created.
create_account Item creation Account ‘%s’ created.
delete_item Item deletion Item ‘%s’ deleted.
delete_account Item deletion Account ‘%s’ deleted.
update_name Name change Name changed from ‘%s’ to ‘%s’.
update_access Access change Access to *** ‘%s’ changed (*** stands for user, unit, unit group, resource, route, or user access rights).

Unit properties

Action ID Action description Action text
update_unit_icon Icon change Unit icon changed.
update_unit_pass Access password change Access password changed.
update_unit_phone Phone number change Phone number changed from ‘%s’ to ‘%s’.
update_unit_phone2 Phone number change Second phone number changed from ‘%s’ to ‘%s’.
update_unit_uid Unique ID change Unique ID changed from ‘%s’ to ‘%s’.
update_unit_uid2 Unique ID change Second unique ID changed from ‘%s’ to ‘%s’.
update_unit_hw Device change Device type changed from ‘%s’ to ‘%s’.
update_unit_hw_cfg Device change Device configuration changed.

Counters

Action ID Action description Action text
update_unit_calcflags (updating the sensor calculation settings) Counters Calculation flags changed.
update_unit_milcounter Counters Mileage counter changed from %d %s to %d %s.
update_unit_bytecounter (updating the value of the GPRS traffic counter) Counters GPRS traffic counter changed from %d KB to %d KB.
update_unit_ehcounter Counters Engine hours counter changed from %.2f h to %.2f h.

Report and track settings

Action ID Action description Action text
update_unit_drat (driver activity) Report settings Driver activity source changed.
update_unit_fuel_cfg Report settings Fuel consumption settings changed.
update_unit_trip_cfg Report settings Trip detector settings changed.
update_unit_report_cfg (updating the parameters used in reports) Report settings Unit report settings changed.
update_msgs_filter_cfg (updating the filtration settings of the unit location in messages) Report settings Message filtration settings changed.
convert_measure_units Report settings
  • Measurement system changed to %s.
  • Conversion to the %s.
update_track_color_setting Tracks
  • Track colour settings changed to “By trips”.
  • Track colour settings changed to “Single”.
  • Track colour settings changed to “By speed”.
  • Track colour settings changed to “By sensor”.

Sensors

Action ID Action description Action text
create_sensor Sensors Sensor ‘%s’ created.
update_sensor Sensors Sensor ‘%s’ modified.
delete_sensor Sensors Sensor ‘%s’ deleted.

Commands

Action ID Action description Action text
create_alias Commands Command ‘%s’ created.
update_alias Commands Command ‘%s’ modified.
delete_alias Commands Command ‘%s’ deleted.

Service intervals

Action ID Action description Action text
create_service_interval Service intervals Service interval ‘%s’ created.
update_service_interval Service intervals Service interval ‘%s’ modified.
delete_service_interval Service intervals Service interval ‘%s’ deleted.

Fields

Action ID Action description Action text
create_custom_field Fields Custom field ‘%s’ created.
update_custom_field Fields Custom field ‘%s’ modified.
delete_custom_field Fields Custom field ‘%s’ deleted.
create_admin_field Fields Admin field ‘%s’ created.
update_admin_field Fields Admin field ‘%s’ modified.
delete_admin_field Fields Admin field ‘%s’ deleted.
update_profile_field Fields Profile field ‘%s’ modified.
delete_profile_field Fields Profile field ‘%s’ deleted.

Import and export

Action ID Action description Action text
import_item_cfg Import Properties imported.
import_unit_cfg Import Properties imported.
import_unit_msgs Import Messages imported.
export_unit_msgs Export Messages exported.

Messages

Action ID Action description Action text
delete_unit_msg Message deletion Deleted *** message dated %s (*** stands for SMS, command, event, or data).
delete_unit_msgs Message deletion Deleted %s *** messages (*** stands for SMS, command, event, or data).

Drivers

Action ID Action description Action text
bind_unit_driver Drivers Driver ‘%s’ was assigned at ‘%s’.
unbind_unit_driver Drivers Driver ‘%s’ was separated at ‘%s’.
create_driver Drivers Driver ‘%s’ created.
update_driver Drivers Driver ‘%s’ updated.
delete_driver Drivers Driver ‘%s’ deleted.
driver_reset_image Drivers Driver ‘%s’ updated.
delete_driver_msg Drivers Message dated %s from driver ‘%s’ deleted.
create_drivers_group Drivers Group of drivers ‘%s’ created.
update_drivers_group Drivers Group of drivers ‘%s’ updated.
delete_drivers_group Drivers Group of drivers ‘%s’ deleted.
update_driver_units (updating the list of drivers that should be assigned to units automatically) Change of group members
  • Unit attached to the resource of drivers ‘%s’.
  • Unit removed from the resource of drivers ‘%s’.
  • Automatic assignment list of drivers updated.

Trailers

Action ID Action description Action text
bind_unit_trailer Trailers Trailer ‘%s’ was assigned at ‘%s’.
unbind_unit_trailer Trailers Trailer ‘%s’ was separated at ‘%s’.
create_trailer Trailers Trailer ‘%s’ created.
update_trailer Trailers Trailer ‘%s’ updated.
delete_trailer Trailers Trailer ‘%s’ deleted.
trailer_reset_image Trailers Trailer ‘%s’ updated.
delete_trailer_msg Trailers Message dated %s from trailer ‘%s’ deleted.
create_trailers_group Trailers Group of trailers ‘%s’ created.
update_trailers_group Trailers Group of trailers ‘%s’ updated.
delete_trailers_group Trailers Group of trailers ‘%s’ deleted.
update_trailer_units (updating the list of trailers that should be assigned to units automatically) Change of group members
  • Unit attached to the resource of trailers ‘%s’.
  • Unit removed from the resource of trailers ‘%s’.
  • Automatic assignment list of trailers updated.

Passengers

Action ID Action description Action text
bind_unit_tag Passengers Passenger ‘%s’ was assigned at ‘%s’.
unbind_unit_tag Passengers Passenger ‘%s’ was separated at ‘%s’.
create_tag Tags Passenger ‘%s’ created.
update_tag Tags Passenger ‘%s’ updated.
tag_reset_image Tags Passenger ‘%s’ updated.
delete_tag Tags Passenger ‘%s’ deleted.
delete_tag_msg Tags Message dated %s from passenger ‘%s’ deleted.
update_tag_units Tags Automatic assignment list of passengers updated.

User settings

Action ID Action description Action text
update_hosts_mask User settings Host mask changed to ‘%s’.
update_user_pass User settings User password changed.
update_user_flags User settings User flags changed.
update_user_locale User settings First day of week changed.
create_user_notify User settings Notice to the user: ‘%s’.
delete_user_notify User settings User notification ‘%s’ deleted.

Unit groups

Action ID Action description Action text
units_group (adding/removing units to/from a unit group) Change of group members
  • Unit added to the group ‘%s’.
  • Unit removed from the group ‘%s’.
  • Units in group updated.

Geofences

Action ID Action description Action text
create_zone Geofences Geofence ‘%s’ created.
update_zone Geofences Geofence ‘%s’ updated.
delete_zone Geofences Geofence ‘%s’ deleted.
import_zones Geofences Geofences imported.
create_zones_group Geofences Group of geofences ‘%s’ created.
update_zones_group Geofences Group of geofences ‘%s’ updated.
delete_zones_group Geofences Group of geofences deleted.
zone_reset_image Geofences Geofence ‘%s’ updated.

Jobs

Action ID Action description Action text
create_job Jobs Job ‘%s’ created.
switch_job Jobs Job ‘%s’ switched on/off.
update_job Jobs Job ‘%s’ updated.
delete_job Jobs Job ‘%s’ deleted.

Notifications

Action ID Action description Action text
create_notify Notifications Notification ‘%s’ created.
switch_notify Notifications Notification ‘%s’ switched on/off.
update_notify Notifications Notification ‘%s’ updated.
delete_notify Notifications Notification ‘%s’ deleted.

Report templates

Action ID Action description Action text
create_report Report templates Report template ‘%s’ created.
update_report Report templates Report template ‘%s’ updated.
delete_report Report templates Report template ‘%s’ deleted.

Retranslators

Action ID Action description Action text
create_retranslator Retranslators Retranslator ‘%s’ created.
update_retranslator Retranslators Properties updated.
units_retranslator Retranslators Units updated.
switch_retranslator Retranslators Started/Stopped.
msgs_history_retranslator Retranslators Past period retranslator started/stopped.

Routes

Action ID Action description Action text
create_route Routes Route ‘%s’ created.
update_route_points Routes Check points updated.
update_route_cfg Routes Properties updated.
create_round Routes Ride ‘%s’ created.
update_round Routes Ride ‘%s’ updated.
delete_round Routes Ride ‘%s’ deleted.
create_schedule Routes Schedule ‘%s’ created.
update_schedule Routes Schedule ‘%s’ updated.
delete_schedule Routes Schedule ‘%s’ deleted.

Accounts

Action ID Action description Action text
change_account Account Account changed from ‘%s’ to ‘%s’.
switch_account Account Account blocked/unblocked.
update_dealer_rights Account Dealer rights enabled/disabled.
do_payment Account Payment or days registered.
update_account_flags Account Account flags changed.
update_account_block_balance Account Balance to block account changed.
update_account_deny_balance Account Balance to limit activity changed.
update_account_min_days Account Minimum days counter changed.
update_account_plan Account Billing plan changed to ‘%s’.
update_account_history_period Account History period changed to ‘%s’.
update_account_subplans Account List of subplans changed.
update_service Account Service ‘%s’ updated.

Orders

Action ID Action description Action text
create_order Orders Order ‘%s’ created.
update_order Orders Order ‘%s’ updated.
delete_order Orders Order ‘%s’ deleted.
create_order_route Orders Order route ‘%s’ created.
update_order_route Orders Order route ‘%s’ updated.
delete_order_route Orders Order route ‘%s’ deleted.

Criteria

Action ID Action description Action text
criteria_updated Criteria Criteria updated.

Unit deactivation and activation

Action ID Action description Action text
set_active Activation/Deactivation
  • 0: Unit was deactivated.
  • 1: Unit was activated.
  • 2: Unit was activated automatically.

set_active is written for the unit specified by itemId; the newValue parameter (log p1) stores the activation state: 0 = deactivated, 1 = activated, 2 = automatically activated.

Notices about expiring activation codes

Action ID Action description Action text
create_notice Creating a notice about the activation code expiration Notice ‘%s’ created for the user.
update_notice Updating a notice about the activation code expiration Notice ‘%s’ updated for the user.
delete_notice Deleting a notice about the activation code expiration Notice ‘%s’ deleted.

The actions with notices about the expiration of activation codes are recorded in the log of each notice recipient. For each action, the item/add_log_record request is sent with the following parameters:

action itemId newValue oldValue
create_notice Recipient user ID Notice name "" (empty)
update_notice Recipient user ID New notice name "" (empty)
delete_notice Recipient user ID Notice name "" (empty)

Returned result

If the request is successful, an empty JSON is returned.

Copied!
{ }

If not, an error code is returned. Possible error codes:

Code Description
7 Failed to fetch the resource with the desired ACL (ADF_ACL_ITEM_MANAGE_LOG).
4 Wrong input parameters.

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

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form