This call returns a list of idle/stop times for assets that meet the given filter restrictions. There are two types of requests for the idle and stop times. These requests match the two different types of result tables displayed on the GPS Idle/Stop Report in Ground Traffic Control.
- The first request type displays the idle/stop totals, which is a summary of all the idle and stop times.
- The second request type displays a list of all the idle or stop times for a single asset.
In version 2, the long/lat output values are swapped.
Request Data
The following are parameters that are required and optional for these requests.
Note: LOI means Location of Interest, called a "Zone" in the GPS tools and reports found within the Ground Traffic Control web application.
Idle/Stop "Totals" Request
Required Information | |
---|---|
Name | Description |
action | showposition |
operation | idlestoptotals |
format | xml |
fromdate | epoch time. Results will be from events that occurred during or after this time. |
todate | epoch time. Results will be from events the occurred during or before this time. |
Optional Information | |
target | Query for a specific asset and only return information for that asset. If specified a reqtype (request type) must be specified as well. |
reqtype | Flag to identify the key being used to identify the asset. 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. |
loiinclude | Flag to notate if the results should only be inside or outside of the given location of interest. Acceptable values:
|
loilocation | When using loiinclude, query for results that only occurred within or outside a specific location of interest. Value must be a location of interest name. |
idletimecomp | Component to notate if idle/stop times must be shorter than or longer than the given time length. Acceptable values:
|
idletime | When using idletimecomp, only show idle/stop times shorter than or longer than this time length. Valid format is:
|
tstype | A flag to indicate what the starttime/endtime variables represent. If nothing is passed log is assumed. Acceptable values are:
|
Example "Totals" Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showposition&operation=idlestoptotals&fromdate=1151737200&todate=1154156340&loiinclude=exclude&loilocation=Zonar_HQ&idletimecomp=%3C&idletime=1:00:00&target=58&reqtype=dbid
Idle/Stop "All" Request
Required Information | |
---|---|
Name | Description |
action | showposition |
operation | idlestopallidle or idlestopallstop. idlestopallidle shows all idle times and idlestopallstop shows all stop times. |
format | xml |
fromdate | epoch time. Results will be from events that occurred during or after this time. |
todate | epoch time. Results will be from events the occurred during or before this time. |
Optional Information | |
target | Query for a specific asset and only return information for that asset. If specified a reqtype (request type) must be specified as well.
If not specified, then all assets will be shown in the specified date range. |
reqtype | Flag to identify the key being used to identify the asset. 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. |
loiinclude | Flag to notate if the results should only be inside or outside of the given location of interest. Acceptable values:
|
loilocation | When using loiinclude, query for results that only occurred within or outside a specific location of interest. Value must be a location of interest name. |
idletimecomp | Component to notate if idle/stop times must be shorter than or longer than the given time length. Acceptable values:
|
idletime | When using idletimecomp, only show idle/stop times shorter than or longer than this time length. Valid format is:
|
tstype | A flag to indicate what the starttime/endtime variables represent. If nothing is passed log is assumed. Acceptable values are:
|
Example "All" Request (If no asset is specified)
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showposition&operation=idlestopallidle&fromdate=1151737200&todate=1154156340&loiinclude=exclude&loilocation=Zonar_HQ&idletimecomp=%3C&idletime=1:00:00
Specifying a Particular Asset (Asset Target)
The target parameter may be used to request data for a specific asset. If used the type of target must be specified as described above. When using Version 2.X if the target type is tag or fleet the asset type must also be specified. See the Asset Types API call for more details.
Example "All" Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showposition&operation=idlestopallidle&fromdate=1151737200&todate=1154156340&target=58&reqtype=dbid&loiinclude=exclude&loilocation=Zonar_HQ&idletimecomp=%3C&idletime=1:00:00
Data Returned
The returned information is similar to the two different results of the GPS Idle/Stop Report in Ground Traffic Control.
Idle/Stop "Totals" Results
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. |
exsid (asset) | The external identifier for the asset object. |
idlecount | The number of times the asset was idle. |
time | The length of time that the longest idle lasted (format: HH:MM:SS). |
longlat | The longitude and latitude position of where the longest idle occurred (format: long,lat). * Version 2 (format: lat,long) |
totalidle | The total length of time all idles lasted (format: HH:MM:SS). |
stopcount | The number of times the asset was stopped. |
time | The length of time that the longest stop lasted (format: HH:MM:SS). |
latlong | The longitude and latitude position of where the longest stop occurred (format: long,lat). * Version 2 (format: lat,long) |
totalstop | The total length of time all stops lasted (format: HH:MM:SS). |
Example "Totals" Success Reply (XML)
<idlestoplist ver="1" count="1" start="1151737200" end="1154156340">
<assetidle tag="333" fleet="0003" type="0" id="58" exsid="325">
<idlecount>3</idlecount>
<maxidle time="00:00:13" longlat="-122.2949977,47.4285626"/>
<totalidle>00:00:17</totalidle>
<stopcount>0</stopcount>
<maxstop time="" longlat=""/>
<totalstop/>
</assetidle>
</idlestoplist>
Idle/Stop "All" Results
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). |
If No Asset is Specified | |
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. |
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. |
exsid (asset) | The external identifier for the asset object. |
type |
The type of event. Valid values are:
|
from | The epoch start time for the returned distance (may not be equal to start). |
to | The epoch end time for the returned distance (may not be equal to end). |
length | The length of time that the idle/stop lasted (format: HH:MM:SS). |
longlat | The longitude and latitude position of where the idle/stop occurred (format: long,lat). * Version 2 (format: lat,long) |
Example "All" Success Reply (XML)
<eventlist ver="1" count="3" start="1151737200" end="1154156340">
<assetidle tag="333" fleet="0003" id="58" exsid="325">
<event type="idle">
<from>1153497364</from>
<to>1153497377</to>
<length>00:00:13</length>
<longlat>-122.2949977,47.4285626</longlat>
</event>
</assetidle>
<assetidle tag="333" fleet="0003" id="58" exsid="325">
<event type="idle">
<from>1153497323</from>
<to>1153497326</to>
<length>00:00:03</length>
<longlat>-122.2961075,47.4296844</longlat>
</event>
</assetidle>
<assetidle tag="333" fleet="0003" id="58" exsid="325">
<event type="idle">
<from>1153497312</from>
<to>1153497313</to>
<length>00:00:01</length>
<longlat>-122.2962001,47.4298112</longlat>
</event>
</assetidle>
</eventlist>
Example Success Reply (asset 58 is specified)
<eventlist ver="1" count="3" start="1151737200" end="1154156340">
<event type="idle">
<from>1153497364</from>
<to>1153497377</to>
<length>00:00:13</length>
<longlat>-122.2949977,47.4285626</longlat>
</event>
<event type="idle">
<from>1153497323</from>
<to>1153497326</to>
<length>00:00:03</length>
<longlat>-122.2961075,47.4296844</longlat>
</event>
<event type="idle">
<from>1153497312</from>
<to>1153497313</to>
<length>00:00:01</length>
<longlat>-122.2962001,47.4298112</longlat>
</event>
</eventlist>