Use this to get information on assets that have moved within a specified time period. For example to find assets that have been used over a weekend.
Note: This function is only available in version 2.X of the API.
Asset Activity Request
Required Information | |
---|---|
Name | Description |
action | showposition |
operation | assetactivity |
format | xml |
start | Epoch timestamp. Earliest time to get data from. |
end | Epoch timestamp. Latest time to get data from. |
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. |
DTD
<!ELEMENT assetactivity (activity*)>
<!ATTLIST assetactivity ver CDATA #REQUIRED>
<!ATTLIST assetactivity count CDATA #REQUIRED>
<!ATTLIST assetactivity start CDATA #REQUIRED>
<!ATTLIST assetactivity end CDATA #REQUIRED>
<!ELEMENT activity (#PCDATA)>
<!ATTLIST activity tag CDATA #REQUIRED>
<!ATTLIST activity fleet CDATA #REQUIRED>
<!ATTLIST activity type CDATA #REQUIRED>
<!ATTLIST activity assetid CDATA #REQUIRED>
<!ATTLIST activity unit CDATA #REQUIRED>
<!ATTLIST activity actstart CDATA #REQUIRED>
<!ATTLIST activity actend CDATA #REQUIRED>
<!ATTLIST activity distance CDATA #REQUIRED>
Asset Activity Report 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 start time. |
end | The request epoch end time . |
tag | Asset Zonar RFID tag number. Numeric, may be zero. |
fleet | The asset fleet number. Usually displayed in the web interface as Asset No. Alphanumeric, 20 characters maximum. |
type | The asset type identifier combine with tag or fleet to uniquely identify an asset. Numeric. |
assetid | The asset database id. Numeric, non zero, always positive. |
unit | The unit the asset distance traveled is reported in. |
actstart | Epoch timestamp. When the asset movement began. |
actend | Epoch timestamp. Then the asset movement ended. |
distance | The distance traveled by the asset. |
Example Request (Get assets that moved)
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showposition&operation=assetactivity&format=xml&customer=abc1234&start=1141397988&end=1141398000&vers=2
Example Success Reply
<?xml version="1.0"?>
<assetactivity ver="1" count="348" start="1245664800" end="1245729600">
<activity tag="0" fleet="AA-4027" type="0" assetid="123" unit="Miles" actstart="2009-06-22 09:20 PDT" actend="2009-06-22 11:15 PDT" distance="0.1"></activity>
<activity tag="34700121" fleet="TT-3055" type="0" assetid="456" unit="Miles" actstart="2009-06-22 06:28 PDT" actend="2009-06-22 16:12 PDT" distance="7.2"></activity>
<activity tag="34700126" fleet="AA-1635" type="0" assetid="789" unit="Miles" actstart="2009-06-22 05:50 PDT" actend="2009-06-22 16:09 PDT" distance="155.9"></activity>
<activity tag="34700087" fleet="TT-5037" type="0" assetid="135" unit="Miles" actstart="2009-06-22 06:12 PDT" actend="2009-06-22 16:08 PDT" distance="60.2"></activity>
<activity tag="34700310" fleet="AA-3000" type="0" assetid="246" unit="Miles" actstart="2009-06-22 03:02 PDT" actend="2009-06-22 04:48 PDT" distance="11.0"></activity>
<activity tag="34700212" fleet="AA-351L" type="0" assetid="790" unit="Miles" actstart="2009-06-22 04:08 PDT" actend="2009-06-22 11:17 PDT" distance="15.6"></activity>
</assetactivity>