29. Asset Activity

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 OMI.

29.1 Request Data

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:
  • tag Key is a Zonar RFID tag number. In version 2.X a type must also be specified.
  • exsid Key is the external system id.
  • vin Key is the Vehicle Identification Number (VIN).
  • dbid Key is the internal database id number. This is the most reliable key to use.
  • fleet Key is the asset fleet number. In version 2.X a type must also be specified.
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.

29.2 Data Returned

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 OMI 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://development.zonarsystems.net/interface.php?action=showposition&operation=assetactivity&format=xml&customer=abc1234&start=1141397988&end=1141398000&vers=2

Example Success Reply

Reply