Request Data
Returns a list of assets in the system.This action was added to protocol version 1.01.
Required Information | |
---|---|
Name | Description |
action | showopen |
operation | showassets |
format | xml |
Optional Information | |
logvers | Available versions are 1, 2, 3, and 4. |
location | Location to filter with. Text. If provided only assets assigned to that location will be returned. If location is not supplied or an empty location is specified, assets from all locations will be returned. |
modifytime | Only return assets that have been modified on or later than this time. A Unix epoch time stamp. A change to any of the name, tag, vin, fleet, exsid, location, mileoffset, radioaddress, mfg or inservice attributes will change the modify timestamp.
Note: modifytime and yardstat are mutually exclusive, only one or the other may be specified. |
status | Only return assets with the specified asset status. Possible values are 1 active or 2 inactive.
|
yardstat | Only return assets with the specified yard status. Possible values are ‘in’, ‘out’ and ‘unknown’.
Note: modifytime and yardstat are mutually exclusive, only one or the other may be specified. |
opstatus | Only return assets with the specified operational status. Possible values are 'good' , 'unsat' , 'crit' and 'defect' .
Note: This was added in protocol version 1.0.6. |
target | Query for a specific asset and only return information for that asset. If specified a reqtype (request type) must be specified as well. This option may not be used in combination with modifytime, location or yardstat. |
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.
Note: In version 1.x type is passed as the DBID of the asset type |
Specifying a Particular Asset (Asset Target)
Thetarget
parameter may be used to request data 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 asset types for more details.Data Returned
Returns a list of assets.
DTD
<!ELEMENT assetlist (asset*)> <!ATTLIST assetlist ver CDATA #REQUIRED>
<!ELEMENT asset (name, tag, vin, fleet, exsid, type, subtype, mileage, location,
mileoffset, radioaddress, mfg, inservice, inspdate, yardstat, opstatus, homeloi, zid, customdata*)>
<!ATTLIST asset id CDATA #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT tag (#PCDATA)>
<!ELEMENT vin (#PCDATA)>
<!ELEMENT fleet (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ATTLIST type id CDATA #REQUIRED>
<!ELEMENT subtype (#PCDATA)>
<!ATTLIST subtype id CDATA #REQUIRED>
<!ELEMENT exsid (#PCDATA)>
<!ELEMENT mileage (#PCDATA)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT mileoffset (#PCDATA)>
<!ELEMENT enginehouroffset (#PCDATA)>
<!ELEMENT radioaddress (#PCDATA)>
<!ELEMENT mfg (#PCDATA)>
<!ELEMENT inservice (#PCDATA)>
<!ELEMENT inspdate (#PCDATA)>
<!ATTLIST inspdate id CDATA #IMPLIED>
<!ATTLIST inspdate type CDATA #IMPLIED>
<!ELEMENT yardstat (yard, stat)>
<!ELEMENT yard (#PCDATA)>
<!ELEMENT stat (#PCDATA)>
<!ATTLIST stat timestamp CDATA #REQUIRED>
<!ELEMENT status (#PCDATA)>
<!ELEMENT opstatus (#PCDATA)>
<!ATTLIST opstatus timestamp CDATA #IMPLIED>
<!ELEMENT gps (#PCDATA)>
<!ELEMENT homeloi (#PCDATA)>
<!ELEMENT zid (#PCDATA)>
<!ELEMENT ecuvin (#PCDATA)>
<!ELEMENT customdata (label*)>
<!ELEMENT label>
<!ATTLIST label id CDATA #REQUIRED>
<!ATTLIST label name CDATA #REQUIRED>
<!ATTLIST label value CDATA #REQUIRED>
Reply Data | |
---|---|
Name | Description |
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. |
name | An arbitrary text string of up to 20 characters in length. Usually labeled as 'License Plate Number:' in the web interface. It is not required to be unique. |
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. May be zero. |
vin | An arbitrary text string of up to 40 characters in length. If the asset is a vehicle this is intended to be the VIN (Vehicle Identification Number) for the asset. Each asset must have a unique VIN. |
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 (type) | The numeric type value. |
subtype | An arbitrary user assigned label for the kind asset. Used to help organize and group assets. Text, 32 characters maximum length, may be empty. |
id (subtype) | The internal database id for the subtype. |
exsid | External System Identifier (EXSID). An arbitrary text string of up to 40 characters in length. Intended for use a unique asset identifier by external systems. The EXSID must be unique for each asset. May be empty. |
mileage | Current (mileage) value. The last reported value for the asset. Taken from the latest inspection. Although labeled 'mileage' it may refer to hours of operation, or any other numeric value for the asset. |
location | The location the asset is assigned to. |
mileoffset |
A numeric value to be applied to incoming mileage values from inspections if the value comes from a hubometer or similar device. These devices are typically programmed with an initial value which may or may not agree with the value for the vehicle it is attached to. This offset is used to correct the hubometer value to the correct reading when the inspection report is loaded into the system. This is the only time the offset is used. A signed integer quantity, may be zero. Note: Although labeled 'mileage' this value may relate to any other unit such as kilometers or hours of operation. |
radioaddress | Numeric. Evirnet radio address assigned to this asset. If used, must be unique. May be zero. |
mfg | Manufacturer. An arbitrary text string of up to 20 characters in length identifying the maker of the asset. May be empty. |
inservice | Inservice date. The date the asset entered service. |
inspdate | The timestamp of the last reported inspection for this asset. May be an empty element if the asset has no inspections. Unix epoch timestamp (UTC) if present. |
id (inspdate) | The inspection id number for the last reported inspection. |
type (inspdate) | The inspection type label for the last reported inspection. Text, 32 characters maximum length. |
yard (yardstat) | The label of the last radio base station location that reported the asset as in or out of range. Text, 32 characters maximum length, may be empty if the asset yard status has not been reported. |
stat (yardstat) |
The yard (radio) status of the asset. Indicates whether the asset is in range of a radio base station or not. Possible values are:
|
timestamp (stat) | Timestamp of when the asset yard status last changed. Unix epoch timestamp (UTC) if present. |
status |
Shows whether the asset is in an active/inactive status.
|
opstatus | Operational status. The assets fitness for duty, as determined by inspection. Possible values:
|
timestamp (opstatus) | Timestamp of when the asset operational status last changed. Unix epoch timestamp (UTC) if present. Will be zero if the operational status is unknown. |
gps | The GPS unit serial number if the asset has one. A 32 bit unsigned numeric value. |
homeloi | home LOI1 for this asset. |
zid | Available in version 2. The ID of the ZCon truck board device installed in the asset. |
ecuvin | Available in version 4. The VIN of the asset, if available, as communicated to the TCU from the engine. |
customdata | Available in version 3. Arbitrary custom data labels that are associated to the asset. |
1 LOI means Location of Interest; called “Zone” in the GPS tools and reports found within the Ground Traffic Control web application.
Note: The <inspdate>
element contains the Unix epoch timestamp of the latest inspection for this asset. The id
attribute is the inspection id. If the asset has no inspections, then the element is empty, like this: <inspdate/>
This element was added in API protocol version 1.03.
The <inservice>
date element and <mfg>
element were added in API protocol version 1.03.
The <yardstat>
element and inspection config information were added in API protocol version 1.05.
The <opstatus>
element was added was added in protocol version 1.06. See the request data for an explanation of the different values.
The id
attribute was added was added in protocol version 1.06. This is the internal system id of the asset object.
The <type>
and <subtype>
elements were added in protocol version 1.07.
The <mileage>
element is the last reported mileage value for that asset. To determine elapsed mileage for an asset use the mileage reporting function.
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showopen&operation=showassets&format=xml
Example Success Reply
<assetlist ver="1.07">
<asset id="64">
<name>W668329X</name>
<tag>2000</tag>
<vin>VINEU3329445W</vin>
<fleet>2000</fleet>
<type id="0">Standard</type>
<subtype/>
<exsid/>
<mileage>51010</mileage>
<location>Home</location>
<mileoffset>0</mileoffset>
<radioaddress/>
<mfg>FORD</mfg>
<inservice>18 Mar 1994</inservice>
<inspdate id="2005" type="TRU0001A-3.0.2">1108756851</inspdate>
<yardstat>
<yard/>
<stat timestamp="0">unknown</stat>
</yardstat>
<status>t</status>
<opstatus timestamp="1108767169">good</opstatus>
<homeloi>Seattle</homeloi>
</asset>
<asset id="42">
<name>DW4523</name>
<tag>150</tag>
<vin>VIN289290D82</vin>
<fleet>1009</fleet>
<type id="0">Standard</type>
<subtype/>
<exsid/>
<mileage>3183228</mileage>
<location>Home</location>
<mileoffset>0</mileoffset>
<radioaddress/>
<mfg>GMC</mfg>
<inservice>01 Jan 1980</inservice>
<inspdate id="1356" type="TRUCK-2.0.1">1085856281</inspdate>
<yardstat>
<yard/>
<stat timestamp="0">unknown</stat>
</yardstat>
<status>t</status>
<opstatus timestamp="0">unknown</opstatus>
<homeloi>Seattle</homeloi>
</asset>
<asset id="60">
<name>VELDK43</name>
<tag>1000086</tag>
<vin>129094DL392H2N</vin>
<fleet>1086</fleet>
<type id="0">Standard</type>
<subtype/>
<exsid/>
<mileage>20697</mileage>
<location>Home</location>
<mileoffset>20000</mileoffset>
<radioaddress/>
<mfg>FORD</mfg>
<inservice>09 Feb 2005</inservice>
<inspdate id="1976" type="TRU0001A-3.0.2">1107967243</inspdate>
<yardstat>
<yard/>
<stat timestamp="0">unknown</stat>
</yardstat>
<status>t</status>
<opstatus timestamp="1107967250">good</opstatus>
<homeloi>Seattle</homeloi>
</asset>
<asset id="53">
<name>DDD456</name>
<tag>57</tag>
<vin>VIN12456789258641</vin>
<fleet>0057</fleet>
<type id="0">Standard</type>
<subtype/>
<exsid/>
<mileage>5</mileage>
<location>Home</location>
<mileoffset>0</mileoffset>
<radioaddress/>
<mfg>FRHT</mfg>
<inservice>22 Oct 2004</inservice>
<inspdate/>
<yardstat>
<yard/>
<stat timestamp="0">unknown</stat>
</yardstat>
<status>f</status>
<opstatus timestamp="1108497996">good</opstatus>
<homeloi>Seattle</homeloi>
</asset>
</assetlist>