42. Export Audit Report
Exports a GPS audit report for a specified target. Data is returned as XML.
42.1 Request Data
| Required Information | ||
|---|---|---|
| Name | Description | |
| action | showposition | |
| operation | audit | |
| format | xml | |
| starttime | Unix epoch timestamp | |
| endtime | Unix epoch timestamp | |
| target | The asset to query. If specified a reqtype (request type) must be specified as well. |
|
| reqtype | Flag to identify the key being used to identify the asset. Acceptable values:
|
|
| Optional Information | ||
| filter | Allows filtering results by minimum or maximum idle/stop time. If supplied, filtertime must be also. Set to 'under' or 'over' to return only results with an idle/stop time of less than or greater than filtertime respectively.
Note: If no filter is supplied, under is assumed. |
|
| filtertime | Used in conjunction with filter to return only results with an idle/stop time of less than or greater than filtertime, depending on filter value. Number of seconds. | |
| loilocations[]* | One or more Zones/LOI Locations to filter against. Only results in specified location(s) are returned. Eg 'Microsoft' .. Listed in Audit report multi-select list. | |
42.2 Data Returned
Returned information:
A XML response or error message.
DTD:
<!ELEMENT auditreport (asset*)>
<!ELEMENT asset (event*)>
<!ATTLIST asset tagid CDATA #REQUIRED>
<!ATTLIST asset fleet CDATA #REQUIRED>
<!ATTLIST asset id ID #REQUIRED>
<!ATTLIST asset type CDATA #REQUIRED>
<!ELEMENT event (distance, idle, stop, travel, average_speed, max_speed, duration, elapsed, odometer)>
<!ATTLIST event type CDATA #REQUIRED>
<!ATTLIST event date CDATA #REQUIRED>
<!ATTLIST event zone CDATA #REQUIRED>
<!ELEMENT distance (#PCDATA)>
<!ATTLIST distance unit CDATA #REQUIRED>
<!ELEMENT idle (#PCDATA)>
<!ELEMENT stop (#PCDATA)>
<!ELEMENT travel (#PCDATA)>
<!ELEMENT average_speed (#PCDATA)>
<!ATTLIST average_speed unit CDATA #REQUIRED>
<!ELEMENT max_speed (#PCDATA)>
<!ATTLIST max_speed unit CDATA #REQUIRED>
<!ELEMENT duration (#PCDATA)>
<!ELEMENT elapsed (#PCDATA)>
<!ELEMENT odometer (#PCDATA)>
<!ATTLIST odometer unit CDATA #REQUIRED>
| Reply Data | |
|---|---|
| Name | Description |
| tagid (asset) | The Zonar RFID tag number assigned to the asset. |
| fleet (asset) | Fleet number. An arbitrary text string of up to 20 characters in length. |
| id (asset) | Database ID corresponding to the asset. |
| type (asset) | The asset type identifier. |
| type (event) | The event type name. |
| date (event) | The date of the event. |
| zone | The name of the Zone in which the data is returned. |
| distance | The total distance this asset has traveled between the requested start time and the current segment. |
| unit (distance) | The unit distance is given in. |
| idle | Time spend idle in this segment. |
| stop | Time spend stopped in this segment. |
| travel | Time spend not idle or stopped in this segment. |
| average_speed | Average speed during this segment. |
| unit (average_speed) | The unit average_speed is given in. |
| max_speed | Maximum speed for this segment. |
| unit (max_speed) | The unit max_speed is given in. |
| duration | Duration of this segment in HH:MM:SS. |
| elapsed | Total time elapsed since the first log segment. |
| odometer | Current odometer reading of this asset. |
| unit (odometer) | The unit odometer is given in. |
Example Request:
https://development.zonarsystems.net/interface.php?action=showposition&operation=audit&format=xml&starttime=1188889200&endtime=1189061940&reqtype=dbid&target=191&loilocations[]=Acme%20HQ&loilocations[]=Acme%20Garage&filter=over&filtertime=60
Example Success Reply
*LOI means Location of Interest; called "Zone" in GPS tools and reports in Ground Traffic Control web application.