Returns a schedule report of what locations of interest have been intersected by assets. Data is returned in either CSV or XML format.
Request Data
Required Information | |
---|---|
Name | Description |
action | showposition |
operation | schedule |
format | The format to return results in. Acceptable values:
|
starttime | Unix epoch timestamp. |
endtime | Unix epoch timestamp. |
reporttype | The type of report to create. Acceptable values:
|
target | When reporttype is 1, this value represents the asset. When reportype is 2, this value represents the location of interest. If specified a reqtype (request type) must be specified as well. |
reqtype | Flag to identify the key being used to identify the asset or location of interest target. When reporttype is 1, this value represents the key for an asset. Acceptable values:
|
type | When using reqtype of tag or fleet this must also be specified. See asset types for more details.
Note: type is only evaluated when passed with version=2 |
Request Data for log version 2
Required Information | |
---|---|
Name | Description |
action | showposition |
operation | schedule |
format | The format to return results in. Acceptable values:
|
starttime | Unix epoch timestamp. |
endtime | Unix epoch timestamp. |
Note: Time limit is limited to 15 minutes for this version of the call |
|
logvers | 2 - This will run the report for all assets against all zones. |
1 Location of Interest; called "Zone" in the GPS tools and reports found within the Ground Traffic Control web application.
Data Returned
The data returned can be a CSV or XML file. The XML returned can be two different structures depending on the specified report type.
DTD (reporttype=1)
With a format of XML and reporttype parameter = 1, the data returned will be a list of locations of interest1 intersected by the given asset, with this DTD:
<!ELEMENT schedulelist1 (loiintersect*)> <!ATTLIST schedulelist1 assetid CDATA #REQUIRED> <!ATTLIST schedulelist1 fleet CDATA #REQUIRED>
<!ELEMENT loiintersect (loiid, name, timestamp, inout, duration)> <!ELEMENT loiid (#PCDATA)> <!ELEMENT name (#PCDATA)> <!ELEMENT timestamp (#PCDATA)> <!ELEMENT inout (#PCDATA)> <!ELEMENT duration (#PCDATA)>
DTD (reporttype=2)
With a format of XML and reporttype parameter = 2, the data returned will be a list of assets intersected by the given location of interest1, with this DTD:
<!ELEMENT schedulelist2 (assetintersect*)> <!ATTLIST schedulelist2 loiid CDATA #REQUIRED> <!ATTLIST schedulelist2 name CDATA #REQUIRED>
<!ELEMENT assetintersect (assetid, fleet, timestamp, inout)> <!ELEMENT assetid (#PCDATA)> <!ELEMENT fleet (#PCDATA)> <!ELEMENT timestamp (#PCDATA)> <!ELEMENT inout (#PCDATA)>
Example Request, reporttype 1 format XML:
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showposition&operation=schedule&format=xml&customer=abc1234&starttime=1141397988&endtime=1167258900&reporttype=1&target=22&reqtype=dbid
Example Success Reply (XML)
<?xml version="1.0"?>
<schedulelist1 assetid="22" fleet="gsm_Default_Ryan">
<loiintersect>
<loiid>2</loiid>
<name>Zonar HQ</name>
<timestamp>2006-12-27 14:32:51-08</timestamp>
<inout>IN</inout>
<duration>-</duration>
</loiintersect>
<loiintersect>
<loiid>2</loiid>
<name>Zonar HQ</name>
<timestamp>2006-12-27 14:33:35-08</timestamp>
<inout>OUT</inout>
<duration>00:00:44</duration>
</loiintersect>
<loiintersect>
<loiid>2</loiid>
<name>Zonar HQ</name>
<timestamp>2006-12-27 14:33:35-08</timestamp>
<inout>IN</inout>
<duration>00:00:00</duration>
</loiintersect>
<loiintersect>
<loiid>2</loiid>
<name>Zonar HQ</name>
<timestamp>2006-12-27 14:35:26-08</timestamp>
<inout>OUT</inout>
<duration>00:01:51</duration>
</loiintersect>
</schedulelist1>
Example Request, reporttype 2 format XML
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showposition&operation=schedule&format=xml&customer=abc1234&starttime=1141397988&endtime=1141398000&reporttype=2&target=7&reqtype=dbid
Example Success Reply (XML)
<?xml version="1.0"?>
<schedulelist2 loiid="130" name="Home Yard">
<assetintersect>
<assetid>46</assetid>
<fleet>568</fleet>
<timestamp>2020-01-27 03:39:32-07</timestamp>
<inout>OUT</inout>
</assetintersect>
<assetintersect>
<assetid>61</assetid>
<fleet>604</fleet>
<timestamp>2020-01-27 03:34:52-07</timestamp>
<inout>IN</inout>
</assetintersect>
<assetintersect>
<assetid>61</assetid>
<fleet>604</fleet>
<timestamp>2020-01-27 04:45:03-07</timestamp>
<inout>OUT</inout>
</assetintersect>
<assetintersect>
<assetid>61</assetid>
<fleet>604</fleet>
<timestamp>2020-01-27 07:42:45-07</timestamp>
<inout>IN</inout>
</assetintersect>
</schedulelist2>
Data Returned for log version 2
XML DTD
<!ELEMENT schedulelist (loiintersect*)>
<!ELEMENT loiintersect (asset, loi, in, out)>
<!ELEMENT asset (#PCDATA)>
<!ATTLIST asset id CDATA #REQUIRED>
<!ATTLIST asset tagid CDATA #REQUIRED>
<!ATTLIST asset exsid CDATA #REQUIRED>
<!ELEMENT loi (#PCDATA)>
<!ATTLIST loi id CDATA #REQUIRED>
<!ELEMENT in (#PCDATA)>
<!ELEMENT out (#PCDATA)>
CSV Column Format
Asset ID,Asset,Time,IN/OUT,Zone,Time In Zone,Duration,Duration Total,Distance
Example Log version 2 (XML)
<?xml version="1.0" encoding="UTF-8"?>
<schedulelist>
<loiintersect>
<asset id="7" tagid="138065896" exsid="065896">Asset 1</asset>
<loi id="557">Zone 1</loi>
<in/>
<out>2011-05-02 17:02:40-04</out>
</loiintersect>
<loiintersect>
<asset id="7" tagid="138065896" exsid="065896">Asset 1</asset>
<loi id="844">Zone 2</loi>
<in>2011-05-02 17:02:56-04</in>
<out/>
</loiintersect>
<loiintersect>
<asset id="7" tagid="138065896" exsid="065896">Asset 1</asset>
<loi id="844">Zone 2</loi>
<in/>
<out>2011-05-02 17:03:21-04</out>
</loiintersect>
<loiintersect>
<asset id="7" tagid="138065896" exsid="065896">Asset 1</asset>
<loi id="992">Zone 3</loi>
<in>2011-05-02 17:04:02-04</in>
<out/>
</loiintersect>
</schedulelist>
Example Log version 2 (CSV)
Date Created,Timezone Used
18 May 2011 19:10,EDT
Asset ID,Asset,Time,IN/OUT,"Zone",Time In Zone,Duration,Duration Total,Distance (Miles)
7,Asset 1,2011-05-02 17:02:40,OUT,"'Zone 1'",,00:00:00,00:00:00,0.0
7,Asset 1,2011-05-02 17:02:56,IN,"'Zone 2'",,00:00:16,00:00:16,0.0
7,Asset 1,2011-05-02 17:03:21,OUT,"'Zone 2'",00:00:25,00:00:25,00:00:41,0.1
7,Asset 1,2011-05-02 17:04:02,IN,"'Zone 3'",,00:00:41,00:01:22,0.3
1 Location of Interest; called "Zone" in the GPS tools and reports found within the Ground Traffic Control web application.