Returns JBus trip report data and accumulated totals over a given period of time.
Request Data
Required Information | |
---|---|
Name | Description |
action | showopen |
operation | jbustrip |
format | xml |
start | Epoch timestamp for start of report.
This selects the starting date. The generated report returns any trips from 0:00:00 of the selected date. |
end | Epoch timestamp for end of report.
This selects the ending date. The generated report returns any trips until 23:59:59 of the selected date. |
Optional Information | |
target | Specific asset to report data 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:
|
type | When using reqtype of tag or fleet this must also be specified in version 2. In version 1.x type Standard (0) is assumed. See asset types for more details.
Note: Value should be a string e.g. Standard or TRAILER |
logvers | Determines the format of the reply.
Note: If no value is passed, 1 is assumed. |
Returned XML DTD for logvers=1
<!ELEMENT jbustrip(trip*) >
<!ATTLIST jbustrip count CDATA>
<!ATTLIST jbustrip ver CDATA>
<!ELEMENT trip(asset, start, end, fuel, pto_fuel, idle_fuel, fuel_units, miles, mpg, engine_hours, pto_hours, totals)>
<!ELEMENT asset >
<!ATTLIST asset id CDATA>
<!ATTLIST asset fleet CDATA>
<!ATTLIST asset exsid CDATA>
<!ELEMENT start (#PCDATA) #REQUIRED>
<!ELEMENT end (#PCDATA) #REQUIRED>
<!ELEMENT fuel (#PCDATA) #REQUIRED>
<!ELEMENT pto_fuel (#PCDATA) #REQUIRED>
<!ELEMENT idle_fuel (#PCDATA) #REQUIRED>
<!ELEMENT fuel_units (#PCDATA) #REQUIRED>
<!ELEMENT miles (#PCDATA) #REQUIRED>
<!ELEMENT mpg (#PCDATA) #REQUIRED>
<!ELEMENT engine_hours (#PCDATA) #REQUIRED>
<!ELEMENT pto_hours (#PCDATA) #REQUIRED>
<!ELEMENT totals(fuel_total, idle_fuel_total, pto_fuel_total, odometer, odometer_units, engine_hours_total, pto_hours_total)>
<!ELEMENT fuel_total (#PCDATA) #REQUIRED>
<!ELEMENT idle_fuel_total (#PCDATA) #REQUIRED>
<!ELEMENT pto_fuel_total (#PCDATA) #REQUIRED>
<!ELEMENT odometer (#PCDATA) #REQUIRED>
<!ELEMENT odometer_units (#PCDATA) #REQUIRED>
<!ELEMENT engine_hours_total (#PCDATA) #REQUIRED>
<!ELEMENT pto_hours_total (#PCDATA) #REQUIRED>
Returned XML DTD for logvers=2
<!ELEMENT jbustrip(trip*) >
<!ATTLIST jbustrip count CDATA>
<!ATTLIST jbustrip ver CDATA>
<!ELEMENT trip(asset, start, end, fuel, pto_fuel, idle_fuel, fuel_units, miles, mpg, engine_hours, pto_hours, totals)>
<!ATTLIST trip id CDATA>
<!ELEMENT asset >
<!ATTLIST asset id CDATA>
<!ATTLIST asset fleet CDATA>
<!ATTLIST asset exsid CDATA>
<!ELEMENT start (#PCDATA) #REQUIRED>
<!ELEMENT end (#PCDATA) #REQUIRED>
<!ELEMENT fuel (#PCDATA) #REQUIRED>
<!ELEMENT pto_fuel (#PCDATA) #REQUIRED>
<!ELEMENT idle_fuel (#PCDATA) #REQUIRED>
<!ELEMENT fuel_units (#PCDATA) #REQUIRED>
<!ELEMENT miles (#PCDATA) #REQUIRED>
<!ELEMENT mpg (#PCDATA) #REQUIRED>
<!ELEMENT engine_hours (#PCDATA) #REQUIRED>
<!ELEMENT pto_hours (#PCDATA) #REQUIRED>
<!ELEMENT totals(fuel_total, idle_fuel_total, pto_fuel_total, odometer, odometer_units, engine_hours_total, pto_hours_total)>
<!ELEMENT fuel_total (#PCDATA) #REQUIRED>
<!ELEMENT idle_fuel_total (#PCDATA) #REQUIRED>
<!ELEMENT pto_fuel_total (#PCDATA) #REQUIRED>
<!ELEMENT odometer (#PCDATA) #REQUIRED>
<!ELEMENT odometer_units (#PCDATA) #REQUIRED>
<!ELEMENT engine_hours_total (#PCDATA) #REQUIRED>
<!ELEMENT pto_hours_total (#PCDATA) #REQUIRED>
Reply Data | |
---|---|
Name | Description |
jbustrip count | Number of JBus trips queried from system, given filters |
jbustrip ver | API version used to query data |
trip id | Microtrip ID |
asset id | Internal asset ID |
asset fleet | Asset fleet name |
asset exsid | Asset external ID |
start | Start of the event |
end | End of the event |
fuel | Amount of fuel consumed during the event |
pto_fuel | Amount of fuel consumed during power take off |
idle_fuel | Amount of fuel used while idling during the event |
fuel_units | Fuel units (Gallons, Liters) used to convert values in the GTC report |
miles | Distance travelled during the event in meters |
mpg | Fuel economy during the event in meters per liter |
engine_hours | The number of engine hours that occurred during the event |
pto_hours | Power take off hours that occurred during the event |
totals fuel_total | Total fuel |
totals idle_fuel_total | Total idle fuel |
totals pto_fuel_total | The total fuel consumed during power take off |
totals odometer | The total miles on odometer |
totals odometer_units | The total odometer units |
totals engine_hours_total | The total engine hours |
totals pto_hours_total | The total PTO hours |
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showopen&operation=jbustrip&format=xml&start=1288942257&end=1289374257
Example Reply XML (logvers 1)
<?xml version="1.0" encoding="UTF-8"?>
<jbustrip count="1" ver="1"><trip><asset exsid="8" fleet="TEST_0000" id="5"><start>2010-07-30 05:13:31</start><end>2010-07-30 05:18:33</end><fuel>0.132</fuel><pto_fuel>0</pto_fuel><idle_fuel>0</idle_fuel><fuel_units>Gallon</fuel_units><miles/><mpg>0</mpg><engine_hours>0.1</engine_hours><pto_hours>0.1</pto_hours><totals><fuel_total>154.805</fuel_total><idle_fuel_total>7.661</idle_fuel_total><pto_fuel_total>113461032.359</pto_fuel_total><odometer>1187.47</odometer><odometer_units>Miles</odometer_units><engine_hours_total>30</engine_hours_total><pto_hours_total>1.6</pto_hours_total></totals></asset></trip></jbustrip>
Example Reply XML (logvers 2)
<?xml version="1.0" encoding="UTF-8"?>
<jbustrip count="1" ver="1"><trip id="5325"><asset exsid="8" fleet="TEST_0000" id="5"><start>2010-07-30 05:13:31</start><end>2010-07-30 05:18:33</end><fuel>0.132</fuel><pto_fuel>0</pto_fuel><idle_fuel>0</idle_fuel><fuel_units>Gallon</fuel_units><miles/><mpg>0</mpg><engine_hours>0.1</engine_hours><pto_hours>0.1</pto_hours><totals><fuel_total>154.805</fuel_total><idle_fuel_total>7.661</idle_fuel_total><pto_fuel_total>113461032.359</pto_fuel_total><odometer>1187.47</odometer><odometer_units>Miles</odometer_units><engine_hours_total>30</engine_hours_total><pto_hours_total>1.6</pto_hours_total></totals></asset></trip></jbustrip>