Request Data
Required Information | |
---|---|
Name | Description |
action | showstats |
operation | yardlog |
format | xml |
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 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. |
start | A Unix epoch time stamp. Only return yard state events later than this time. May be combined with end. |
end | A Unix epoch time stamp. Only return yard state events earlier than this time. May be combined with start. |
location | Location to filter with. Text. If provided only events for assets assigned to that location will be returned. |
Data Returned
DTD
<!ELEMENT yardlog (count, event*)>
<!ATTLIST yardlog ver CDATA #REQUIRED>
<!ELEMENT count (#PCDATA)>
<!ELEMENT event (#EMPTY)>
<!ATTLIST event assetid CDATA #REQUIRED>
<!ATTLIST event tag CDATA #REQUIRED>
<!ATTLIST event fleet CDATA #REQUIRED>
<!ATTLIST event state CDATA #REQUIRED>
<!ATTLIST event timestamp CDATA #REQUIRED>
<!ATTLIST event uploadlocation CDATA #IMPLIED>
<!ATTLIST event opstatus CDATA #IMPLIED>
<!ATTLIST event inspid CDATA #IMPLIED>
<!ATTLIST event inspdate CDATA #IMPLIED>
The opstatus
, inspid
and inspdate
attributes refer to the asset's current operational status, last inspection id number and last inspection date respectively. See the get assets function for a detailed explanations of the operational status.
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showstats&operation=yardlog&format=xml
Example Success Reply
<yardlog ver="1.08">
<count>15</count>
<event assetid="4" tag="157" fleet="0157" state="IN" timestamp="1112875670" uploadlocation="" opstatus="good" inspid="2112" inspdate="1112871200"/>
<event assetid="4" tag="157" fleet="0157" state="OUT" timestamp="1112879299" uploadlocation="" opstatus="good" inspid="2112" inspdate="1112871200"/>
<event assetid="55" tag="14" fleet="0014" state="IN" timestamp="1099772183" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="OUT" timestamp="1099772331" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="IN" timestamp="1099772333" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="OUT" timestamp="1099772362" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="IN" timestamp="1099772412" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="OUT" timestamp="1099772454" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="IN" timestamp="1099772524" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="OUT" timestamp="1099772566" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="IN" timestamp="1099772582" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="OUT" timestamp="1099772789" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="IN" timestamp="1099773182" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="55" tag="14" fleet="0014" state="OUT" timestamp="1099779176" uploadlocation="seattle" opstatus="unsat" inspid="2412" inspdate="1099775182"/>
<event assetid="39" tag="121" fleet="0121" state="IN" timestamp="1097641160" uploadlocation="issaquah" opstatus="crit" inspid="3456" inspdate="1097642160"/>
</yardlog>