Logging

To add a log record, use the command item/add_log_record:

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

Parameters

Name Description
itemId item ID
action action (see the list below)
newValue new value
oldValue old value

List of available actions:

  • custom_msg;
  • create_unit;
  • update_name;
  • update_access;
  • update_unit_icon;
  • update_unit_pass;
  • update_unit_phone;
  • update_unit_calcflags (update sensor calculation settings);
  • update_unit_milcounter (update mileage counter value);
  • update_unit_bytecounter (update GPRS traffic counter value);
  • update_unit_ehcounter (update engine hours counter value);
  • update_unit_uid;
  • update_unit_hw (update device type);
  • update_unit_hw_cfg (update device configuration);
  • update_unit_fuel_cfg (update fuel consumption configuration);
  • update_unit_trip_cfg (update trip detection configuration);
  • create_sensor;
  • update_sensor;
  • delete_sensor;
  • create_alias (create command);
  • update_alias (update command);
  • delete_alias (delete command);
  • create_service_interval;
  • update_service_interval;
  • delete_service_interval;
  • create_custom_field;
  • update_custom_field;
  • delete_custom_field;
  • import_item_cfg;
  • import_unit_cfg;
  • export_unit_msgs;
  • import_unit_msgs;
  • delete_unit_msg;
  • delete_unit_msgs;
  • bind_unit_driver;
  • unbind_unit_driver;
  • bind_unit_trailer;
  • unbind_unit_trailer;
  • update_unit_report_cfg (update parameters used in reports);
  • update_msgs_filter_cfg (update filtration of unit position information in messages);
  • delete_item;
  • create_user;
  • update_hosts_mask;
  • update_user_pass;
  • update_user_flags;
  • create_user_notify;
  • delete_user_notify;
  • create_group;
  • units_group (add/remove units to/from unit group);
  • update_driver_units (update the list of auto attachable units for drivers);
  • update_trailer_units (update the list of auto attachable units for trailers);
  • create_resource;
  • create_zone;
  • update_zone;
  • delete_zone;
  • create_poi;
  • update_poi;
  • delete_poi;
  • create_job;
  • switch_job;
  • update_job;
  • delete_job;
  • create_notify;
  • switch_notify;
  • update_notify;
  • delete_notify;
  • create_driver;
  • update_driver;
  • delete_driver;
  • create_trailer;
  • update_trailer;
  • delete_trailer;
  • create_drivers_group;
  • update_drivers_group;
  • delete_drivers_group;
  • create_trailers_group;
  • update_trailers_group;
  • delete_trailers_group;
  • create_report (create report template);
  • update_report (update report template);
  • delete_report (delete report template);
  • import_pois;
  • import_zones;
  • create_retranslator;
  • update_retranslator;
  • units_retranslator (add units for retranslation);
  • switch_retranslator;
  • create_route;
  • update_route_points;
  • update_route_cfg;
  • create_round;
  • update_round;
  • delete_round;
  • create_schedule;
  • update_schedule;
  • delete_schedule;
  • create_account;
  • delete_account;
  • switch_account;
  • update_dealer_rights;
  • do_payment;
  • update_account_flags;
  • update_account_min_days;
  • update_account_plan;
  • update_account_history_period;
  • update_account_subplans;
  • create_service;
  • update_service;
  • delete_service.

Response

{}	/* empty object if execution successful, if not - error code */