37. GPS Schedule Report

Returns a schedule report of what locations of interest have been intersected by assets. Data is returned in either CSV or XML format.

37.1 Request Data

Required Information
Name Description
action showposition
operation schedule
format The format to return results in. Acceptable values:
  • xml Results are returned in an XML format.
  • csv Results are returned as a series of comma separated values.
starttime Unix epoch timestamp.
endtime Unix epoch timestamp.
reporttype The type of report to create. Acceptable values:
  • 1 Report for a single asset, the report will consist of each location of interest* the asset visited in the specified time period.
  • 2 Report for a single location of interest. The report will consist of every asset that visited the specified location in the requested time period.
If reporttype is not specified, or is blank a value of '1' will be assumed.
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:
  • tag Key is a Zonar RFID tag number. A type must also be specified.
  • exsid Key is the external system id.
  • vin Key is the Vehicle Identification Number (VIN).
  • dbid Key is the internal database id number. This is the most reliable key to use.
  • fleet Key is the asset fleet number. A type must also be specified.
When reportype is 2, this value represents the key for a location of interest. Acceptable values:
  • dbid Key is the internal database id number. This is the most reliable key to use.
  • name Key is the location of interest name.
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:
  • xml Results are returned in an XML format.
  • csv Results are returned as a series of comma separated 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.

37.2 Data Returned

The data returned can be either a CSV or XML file.

The XML returned can be 2 different structures depending on the reporttype specified.

With a format of XML and a reporttype of 1, the data returned will be a list of locations of interest* 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)>

With a format of XML and a reporttype of 2, the data returned will be a list of assets intersected by the given location of interest*, 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://development.zonarsystems.net/interface.php?action=showposition&operation=schedule&format=xml&customer=abc1234&starttime=1141397988&endtime=1167258900&reporttype=1&target=22&reqtype=dbid

Reply (XML):

Reply

Example Request, reporttype 2 format XML:

https://development.zonarsystems.net/interface.php?action=showposition&operation=schedule&format=xml&customer=abc1234&starttime=1141397988&endtime=1141398000&reporttype=2&target=7&reqtype=dbid

Reply (XML):

Reply


*LOI means Location of Interest; called "Zone" in GPS tools and reports in Ground Traffic Control web application.

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

Log version 2 XML example
Log version 2 CSV example