43. Personnel Events
This function retrieves personnel events from the system.
Note: This function is only available in version 2.X of the OMI.
43.1 Request Data
| Required Information | |
|---|---|
| Name | Description |
| action | showevents |
| operation | list |
| format | xml |
| Optional Information | |
| location | Location to filter with. Text. If provided only data associated with assets assigned to this location will be returned. |
| start | Epoch timestamp. If specified only data with a timestamp after this time will be returned.
May be combined with end to specify a particular time period. |
| end | Epoch timestamp. If specified only data with a timestamp before this time will be returned.
May be combined with start to specify a particular time period. |
| target | Specific asset to report data for, rather than entire fleet. If specified then reqtype must be specified as well. See asset target for details. |
| 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. See asset types for more details. |
| perstarget | Specific individual to report data for. This is the tagid number for the desired person to report for. |
| tstype | Determines which time stamp to filter by, valid options are:
|
43.2 Data Returned
DTD:
<!ELEMENT persevents (count, event*)>
<!ATTLIST persevents ver CDATA #REQUIRED>
<!ATTLIST persevents count CDATA #REQUIRED>
<!ELEMENT event (asset?, personnel)>
<!ATTLIST event timestamp CDATA #REQUIRED>
<!ATTLIST event sn CDATA #REQUIRED>
<!ATTLIST event type CDATA #REQUIRED>
<!ATTLIST event latlong CDATA #REQUIRED>
<!ATTLIST event loiname CDATA #REQUIRED>
<!ELEMENT asset (fleet, assetid, assettag, exsid, assettype)>
<!ELEMENT asset fleet CDATA #REQUIRED>
<!ELEMENT asset assetid CDATA #REQUIRED>
<!ELEMENT asset assettag CDATA #REQUIRED>
<!ELEMENT asset exsid CDATA #REQUIRED>
<!ELEMENT asset assettype CDATA #REQUIRED>
<!ELEMENT personnel (tagid, ptype)>
<!ELEMENT personnel tagid CDATA #REQUIRED>
<!ELEMENT personnel ptype CDATA #REQUIRED>
Personnel Event Reply:
| Reply Data | |
|---|---|
| Name | Description |
| version | The version number of the OMI call and return data. |
| count | The number of results returned. |
| timestamp | The time the event occurred. Unix epoch timestamp (UTC). |
| sn | The serial number of the GPS unit that collected the event. A positive integer. |
| type | The type of event that occurred. A short text label identifying the event type. Text, 24 characters maximum length. |
| latlong | The latitude and longitude position of where the event occurred (format: lat,long). |
| loiname | The name of the Location of Interest* that the vehicle was in when the event was logged. This will be either the smallest of the LOIs that the event position is contained within, or in the case of multiple LOIs the most recently added one. Text, 100 characters maximum length. |
| Asset | The asset that was associated with the GPS unit collecting the event data. If the GPS unit question was not assigned to an asset this element will not be present. |
| fleet | The asset fleet number. Usually displayed in the web interface as Asset No. Alphanumeric, 20 characters maximum. This may be empty if the asset does not have a fleet number. |
| assettag | The Zonar RFID tag number of the asset the data is associated with. Numeric either a positive integer or zero. This may be zero if the asset does not have a tag number. |
| exsid | External system identifier of the asset the data is associated with. This may be empty if the asset does not have an exsid. Arbitrary text up to 40 characters in length. |
| assetype | The type of the asset. See asset types for more details. |
| assetid | Database id of the asset the data is associated with. This will be a positive integer. |
| Personnel | The individual who created the event. |
| tagid | The RFID tag number used by the individual. |
| ptype | The type of personnel that the individual is. Text 24 characters maximum length. |
Example Request:
http://development.zonarsystems.net/interface.php?format=xml&action=showevents&operation=list&version=2