cleanup_driver_interval

The cleanup_driver_interval method 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

Name Description
resourceId Resource ID.
driverId Driver ID.
timeFrom The beginning of the interval.
timeTo The 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:

Code Description
7 The resource doesn’t exist, or the user doesn’t have the Create, edit, and delete drivers and Request reports and messages access rights to it.
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.

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