Use this to get generic data loaded into the system via the GSM interface.
Parameters such as time frame, asset target and data type may be specified.
Note: Queries should be limited to no longer than 2 weeks.
Note: This function is only available in version 2.X of the OMI.
| Required Information | |
|---|---|
| Name | Description |
| action | showopen |
| operation | gendata |
| format | xml |
| version |
|
| 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.
See the tstype parameter below.
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.
See the tstype parameter below.
May be combined with start to specify a particular time period. |
| tstype | The specific timestamp to use in connection with the start and end
parameters. Acceptable values:
|
| label | The datatype to query for. If specified only data having that label will be returned. The label is an arbitrary text string up to 32 characters long. A list of data type currently in the system may be returned with this function |
| 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:
|
DTD:
<!ELEMENT gsmgendata (count, gendata*)>
<!ATTLIST gsmgendata ver CDATA #REQUIRED>
<!ATTLIST gsmgendata count CDATA #REQUIRED>
<!ELEMENT gendata (#PCDATA)>
<!ATTLIST gendata timestamp CDATA #REQUIRED>
<!ATTLIST gendata timestamp CDATA #REQUIRED>
<!ATTLIST gendata fleet CDATA #REQUIRED>
<!ATTLIST gendata assetid CDATA #REQUIRED>
<!ATTLIST gendata assettag CDATA #REQUIRED>
<!ATTLIST gendata exsid CDATA #REQUIRED>
<!ATTLIST gendata assettype CDATA #REQUIRED>
<!ATTLIST gendata sn CDATA #REQUIRED>
<!ATTLIST gendata label CDATA #REQUIRED>
<!ATTLIST gendata type (INT | FLOAT | STRING | POSITION | UNKNOWN) #REQUIRED>
| Reply Data | |
|---|---|
| Name | Description |
| version | The version number of the OMI call and return data. |
| count | The number of results returned. |
| ctimestamp | The collection timestamp of the data. Not all data has a collection timestamp in which case this will be 0. Unix epoch timestamp (UTC). |
| ltimestamp | When the data was loaded into the system database. All data items will have this timestamp. Unix epoch timestamp (UTC). |
| fleet | The asset fleet number the data is associated with. 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 or the remote unit which collected the data has not been assigned to an asset. |
| 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 or the remote unit which collected the data has not been assigned to an asset. |
| exsid | External system identifier of the asset the data is associated with. This may be empty if the asset does not have an exsid or the remote unit which collected the data has not been assigned to an asset. Arbitrary text up to 40 characters in length. |
| assetype | The type of the asset. This may be empty if the remote unit which collected the data has not been assigned to an asset. See asset types for more details. |
| assetid | Database id of the asset the data is associated with. This may be a positive integer or zero if the remote unit which collected the data has not been assigned to an asset. |
| sn | The serial number of the GPS unit that collected the data. A positive integer. |
| label | Label used to identify the data value. String, 32 characters maximum length. |
| type | The type of data.
|
| - | The data itself. |
Example Request:
https://example.zonarsystems.net/interface.php?format=xml&action=showopen&operation=gendata&version=2