Request Data
Provides the last PTO, engine hours and odometer reading for a given asset for a given time range.
Required Information | |
---|---|
Name | Description |
action | showopen |
operation | showusage |
format | xml |
target | Specific asset to report mile for, rather than entire fleet. If specified then reqtype must be specified as well. See asset target for details. |
reqtype | Flag to identify the key being used to query. Acceptable values:
|
starttime | The beginning date and time, as an epoch time, to query asset for. |
endtime | The ending date and time, as an epoch time, to query asset for.
The maximum query range is 2 weeks. |
Optional Information | |
type | When using reqtype of tag or fleet this value is required. See asset types for more details. |
enginehoursversion | The Engine Hours report version to use when querying for engine hours data. Options are:
|
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showopen&operation=showusage&format=xml&starttime=1388563200&endtime=1389168000&customer=dev0002&enginehoursversion=2&reqtype=dbid&target=1
Data Returned
<!ELEMENT showusage (asset*)> <!ATTLIST showusage ver CDATA #REQUIRED> <!ELEMENT asset> <!ATTLIST asset id CDATA #REQUIRED> <!ATTLIST asset fleet CDATA #REQUIRED> <!ELEMENT odometer> <!ATTLIST odometer lastts CDATA #REQUIRED> <!ELEMENT pto> <!ATTLIST pto lastts CDATA #REQUIRED> <!ELEMENT enginehours (accruedhours, totalhours)> <!ATTLIST enginehours lastts CDATA #REQUIRED> <!ELEMENT accruedhours> <!ELEMENT totalhours>
Reply Data | |
---|---|
Name | Description |
showusage | Root element of response. |
showusage ver | Version of showusage call. |
asset | The asset being queried. |
asset id | Internal database ID of asset. |
asset fleet | Asset's fleet name. |
odometer | The odometer value in meters. |
odometer lastts | The last time, as an epoch, this odometer reading was provided within the time range provided. |
pto | PTO hours value in seconds. |
pto lastts | The last time, as an epoch, the PTO hours reading was provided within the time range provided. |
enginehours | Root element of engine hour values. |
enginehours lastts | The last time, as an epoch, the engine hour readings were provided within the time range provided. |
accruedhours | Accrued Engine hours. |
totalhours | Total Engine hours. |
Example Reply
<showusage ver="1">
<asset id="16" fleet="AUTO 2702">
<odometer lastts="1389044558">115288922</odometer>
<pto lastts="1389046122">577</pto>
<enginehours lastts="1389089345">
<accruedhours>420</accruedhours>
<totalhours>480</totalhours>
</enginehours>
</asset>
</showusage>