cleanup_driver_interval

The cleanup_driver_interval function is used to delete the records about assigning a driver to a unit or separating it from a unit during a specified time interval.

Copied!
svc=resource/cleanup_driver_interval&params={"resourceId":<long>,
					     					 "driverId":<long>,
					     					 "timeFrom":<uint>,
				 	     					 "timeTo":<uint>
											}

Parameters

NameDescription
resourceIdResource ID.
driverIdDriver ID.
timeFromThe beginning of the interval.
timeToThe end of the interval.

Returned result

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

Copied!
{ }

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

CodeDescription
7Failed to fetch the resource with the desired ACL (ACL_RES_EDIT_DRIVERS and ACL_ITEM_EXECUTE_REPORTS).
4

One of the following errors:

  • Failed to fetch the driver with the desired driverId.
  • If the end of the interval is after the time of the last message received from the unit, all messages except the last one are deleted and the returned result contains the "forbidden delete the last message" text.
  • Wrong input parameters.
3

Failed to fetch messages.

Download PDF file
Download Word document

See also