27.0 Speed Report

27.2 Data Returned

Back to Index

The XML information returned is similar to the GPS Speed Report from the web application:

logvers=1 Speed Report Results – DTD

<!ELEMENT speedlist (assetspeed*)>
<!ATTLIST speedlist ver CDATA #REQUIRED>
<!ATTLIST speedlist count CDATA #REQUIRED>
<!ATTLIST speedlist start CDATA #REQUIRED>
<!ATTLIST speedlist end CDATA #REQUIRED>

<!ELEMENT assetspeed (speed)>
<!ATTLIST assetspeed tag CDATA #REQUIRED>
<!ATTLIST assetspeed fleet CDATA #REQUIRED>
<!ATTLIST assetspeed type CDATA #REQUIRED>
<!ATTLIST assetspeed id CDATA #REQUIRED>
<!ATTLIST assetspeed latlong CDATA>
<!ATTLIST assetspeed unit CDATA>
<!ATTLIST assetspeed timestamp CDATA>

<!ELEMENT speed (#PCDATA)>

logvers=2 Speed Report Results – DTD

<!ELEMENT speedlist (assetspeed*)>
<!ATTLIST speedlist ver CDATA #REQUIRED>
<!ATTLIST speedlist count CDATA #REQUIRED>
<!ATTLIST speedlist start CDATA #REQUIRED>
<!ATTLIST speedlist end CDATA #REQUIRED>

<!ELEMENT assetspeed (speed)>
<!ATTLIST assetspeed tag CDATA #REQUIRED>
<!ATTLIST assetspeed fleet CDATA #REQUIRED>
<!ATTLIST assetspeed type CDATA #REQUIRED>
<!ATTLIST assetspeed id CDATA #REQUIRED>
<!ATTLIST assetspeed latlong CDATA>
<!ATTLIST assetspeed unit CDATA>
<!ATTLIST assetspeed timestamp CDATA>
<!ATTLIST assetspeed location CDATA>

<!ELEMENT speed (#PCDATA)>

 

Reply Data
Name Description
version The version number of the API call and return data.
count The number of results returned.
start The request epoch time (fromdate).
end The request epoch time (todate).
tag The Zonar RFID tag number assigned to the asset. Coupled with the Type, this is usually the means by which an asset is identified in an inspection. The combination of tag number and type must be unique for each asset.
fleet Fleet number. An arbitrary text string of up to 20 characters in length. If the asset is a vehicle this is intended to be the user assigned identification for the vehicle.
This is usually labeled ‘Asset No.’ in the web interface. The combination of fleet number and type must be unique for each asset. All assets must have a fleet number.
type The asset type identifier. The combination of tag number and type or fleet number and type is used to uniquely identify the asset. Text, 32 characters maximum length. All assets have a type.
id (asset) The internal database identifier for the asset object. This is the primary means of identifying an asset and how the asset is linked to other objects.
timestamp The timestamp when the speed event occurred. An epoch timestamp.
latlong The latitude and longitude position of where the longest idle occurred (format: lat,long).
unit The measurement unit the speed is reported in.
speed The maximum reported speed for the asset. A floating point number.

 

Example Request Get the maximum speeds for all assets

https://development.zonarsystems.net/interface.php?action=showposition
&operation=speed&format=xml&customer=abc1234&fromdate=1141397988
&todate=1141398000&vers=2

Example Success Reply XML

Example Request Get the maximum speed for a specific asset

https://development.zonarsystems.net/interface.php?action=showposition
&operation=speed&format=xml&customer=abc1234&target=138021074&reqtype=tag
&fromdate=1141220175&todate=1149551361&vers=2

Example Success Reply XML

JSON Get Five Speed Report Results – DTD

<!ELEMENT eventlist (ver, count, start, end, maxts, assetevents*)>
<!ATTLIST ver CDATA #REQUIRED>
<!ATTLIST count CDATA #REQUIRED>
<!ATTLIST start CDATA #REQUIRED>
<!ATTLIST end CDATA #REQUIRED>
<!ATTLIST maxts CDATA #REQUIRED>

<!ELEMENT assetevents (fleet, id, lat, lng, heading, unit, dt, speed, power)>
<!ATTLIST fleet CDATA #REQUIRED>
<!ATTLIST id CDATA #REQUIRED>
<!ATTLIST lat CDATA #REQUIRED>
<!ATTLIST lng CDATA #REQUIRED>
<!ATTLIST heading CDATA #REQUIRED>
<!ATTLIST unit CDATA #REQUIRED>
<!ATTLIST dt CDATA>
<!ATTLIST speed CDATA>
<!ATTLIST power CDATA>

Reply Data
Name Description
version The version number of the API call and return data.
count The number of results returned.
start The ‘start’ epoch time (fromdate – 10 minutes).
end The ‘end’ epoch time (fromdate + 10 minutes).
maxts The time epoch of the max speed event (fromdate)
assetevents Returns null if no events or the grouped values listed below:
fleet Fleet number. An arbitrary text string of up to 20 characters in length. If the asset is a vehicle this is intended to be the user assigned identification for the vehicle.
This is usually labeled ‘Asset No.’ in the web interface. The combination of fleet number and type must be unique for each asset. All assets must have a fleet number.
id (asset) The internal database identifier for the asset object. This is the primary means of identifying an asset and how the asset is linked to other objects.
lat The latitude of the point being returned. A floating point number.
lng The longitude of the point being returned. A floating point number.
heading A representation of the assets heading in degrees for the point being returned. A floating point number.
unit The measurement unit the speed is reported in. (“MPH” or “KPH”)
dt The date/time String for the point being returned. ex. “Mon 27 Sep 2010 08:44”
speed The speed for the point being returned. A floating point number representing MPH or KPH.
power Boolean value representing the assets power state (true for on and false for off) for the point being returned.

 

Example Request

https://development.zonarsystems.net/interface.php?action=showposition
&operation=speed&format=json&getfive=t&customer=abc1234
&fromdate=1141397988&vers=2&reqtype=dbid

Example Success Reply JSON