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. The type of value used here must be specified in reqtype . |
reqtype | Flag to identify the value in target . 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. |
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://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&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
<?xml version="1.0"?>
<auditreport>
<asset tagid="1000" fleet="GSM_8305" id="191" type="Standard">
<event type="out" date="2007-09-04 10:57:04-07" zone="Acme HQ">
<distance unit="Miles">95.0</distance>
<idle>00:00:00</idle>
<stop>00:00:00</stop>
<travel>00:00:00</travel>
<average_speed unit="Mile/Hour">0.0</average_speed>
<max_speed unit="Mile/Hour">0.0</max_speed>
<duration>-</duration>
<elapsed></elapsed>
<odometer unit="Miles">2614.2</odometer>
</event>
<event type="in" date="2007-09-04 10:57:04-07" zone="Acme HQ Garage">
<distance unit="Miles">95.0</distance>
<idle>00:00:00</idle>
<stop>00:00:00</stop>
<travel>00:00:00</travel>
<average_speed unit="Mile/Hour">7.3</average_speed>
<max_speed unit="Mile/Hour">7.3</max_speed>
<duration>00:00:00</duration>
<elapsed>00:00:00</elapsed>
<odometer unit="Miles">2614.2</odometer>
</event>
<event type="out" date="2007-09-04 10:57:04-07" zone="Acme HQ Garage">
<distance unit="Miles">95.0</distance>
<idle>00:00:00</idle>
<stop>00:00:00</stop>
<travel>00:00:00</travel>
<average_speed unit="Mile/Hour">7.3</average_speed>
<max_speed unit="Mile/Hour">7.3</max_speed>
<duration>00:00:00</duration>
<elapsed>00:00:00</elapsed>
<odometer unit="Miles">2614.2</odometer>
</event>
<event type="in" date="2007-09-04 11:02:16-07" zone="Acme HQ">
<distance unit="Miles">95.9</distance>
<idle>00:02:14</idle>
<stop>00:00:00</stop>
<travel>00:02:58</travel>
<average_speed unit="Mile/Hour">13.9</average_speed>
<max_speed unit="Mile/Hour">39.9</max_speed>
<duration>00:05:12</duration>
<elapsed>00:05:12</elapsed>
<odometer unit="Miles">2710.1</odometer>
</event>
<event type="out" date="2007-09-04 18:06:02-07" zone="Acme HQ">
<distance unit="Miles">96.0</distance>
<idle>00:00:00</idle>
<stop>07:03:00</stop>
<travel>00:00:46</travel>
<average_speed unit="Mile/Hour">7.3</average_speed>
<max_speed unit="Mile/Hour">18.1</max_speed>
<duration>07:03:46</duration>
<elapsed>07:08:58</elapsed>
<odometer unit="Miles">2710.2</odometer>
</event>
<event type="in" date="2007-09-05 04:51:39-07" zone="Acme HQ">
<distance unit="Miles">126.3</distance>
<idle>00:01:08</idle>
<stop>09:57:09</stop>
<travel>00:47:20</travel>
<average_speed unit="Mile/Hour">35.3</average_speed>
<max_speed unit="Mile/Hour">66.4</max_speed>
<duration>10:45:37</duration>
<elapsed>17:54:35</elapsed>
<odometer unit="Miles">2740.5</odometer>
</event>
<event type="out" date="2007-09-05 04:54:42-07" zone="Acme HQ">
<distance unit="Miles">126.5</distance>
<idle>00:00:00</idle>
<stop>00:02:27</stop>
<travel>00:00:36</travel>
<average_speed unit="Mile/Hour">11.1</average_speed>
<max_speed unit="Mile/Hour">32.5</max_speed>
<duration>00:03:03</duration>
<elapsed>17:57:38</elapsed>
<odometer unit="Miles">2740.6</odometer>
</event>
<event type="in" date="2007-09-05T23:59:00-07:00" zone="">
<distance unit="Miles">127.8</distance>
<idle>00:00:00</idle>
<stop>00:00:00</stop>
<travel>00:00:00</travel>
<average_speed unit="Mile/Hour">0.0</average_speed>
<max_speed unit="Mile/Hour">0.0</max_speed>
<duration></duration>
<elapsed></elapsed>
<odometer unit="Miles">0.0</odometer>
</event>
</asset></auditreport>
*LOI means Location of Interest; called "Zone" in GPS tools and reports in Ground Traffic Control web application.