Use this call to query the database for inspections. It will return a list of report IDs with timestamps later than the specified time. Results may be filtered on location, inspection status and repair status.
As of Protocol version 2.00 the 'extgetnewinsp'
action is deprecated. Clients should instead use the 'showopen'
action with an operation of 'insp'
.
Request Data
Required Information | |
---|---|
Name | Description |
action | extgetnewinsp (Deprecated) new clients should use 'showopen'
|
operation | insp Use this rather than 'extgetnewinsp'
|
format | xml |
status | Return reports matching the specified status and time later than the timestamp. Acceptable values:
|
Optional Information | |
logvers | The API call version. |
timestamp | Return inspections with timestamp later than this time. Unix epoch timestamp (UTC). The same as start. New code should use start. |
location | Location to filter with. Text. If provided only inspections with an asset and or an operator assigned to that location will be returned. If location is not supplied or an empty location is specified, inspections from all locations will be returned. |
repair | Inspection repair status. Acceptable values are:
|
tstype | A flag to indicate what the timestamp variable represents. Acceptable values are:
insp ' will be assumed. |
config | Inspection configuration name. If specified only return inspections with this inspection config. Must be a valid inspection config name. This will take the form of name-version string. For example DEM0001-2.0.1. See Get Inspection Configs for details on retrieving inspection config information. |
start | A Unix epoch time stamp. Only return inspections with timestamps later than this time. May be combined with end. Replaces timestamp. |
end | A Unix epoch time stamp. Used in conjunction with start to only return inspections within a given time frame. Replaces timestamp. |
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showopen&operation=insp&format=xml×tamp=1140220882&status=all
An inspection list.
DTD:
<!ELEMENT insplist (count, insp*)>
<!ATTLIST insplist ver CDATA #REQUIRED>
<!ELEMENT count (#PCDATA)>
<!ELEMENT insp (#PCDATA)>
<!ATTLIST insp timestamp CDATA #REQUIRED>
<!ATTLIST insp stat CDATA #REQUIRED>
<!ATTLIST insp fleet CDATA #REQUIRED>
<!ATTLIST insp operator CDATA #REQUIRED>
<!ATTLIST insp optag CDATA #REQUIRED>
<!ATTLIST insp repair CDATA #REQUIRED>
<!ATTLIST insp loadlocation CDATA #REQUIRED>
<!ATTLIST insp startime CDATA #REQUIRED>
<!ATTLIST insp endtime CDATA #REQUIRED>
<!ATTLIST insp extractor CDATA #REQUIRED>
<!ATTLIST insp config CDATA #REQUIRED>
<!ATTLIST insp manual CDATA #REQUIRED>
<!ATTLIST insp verified CDATA #REQUIRED>
<!ATTLIST insp assetid CDATA #REQUIRED>
<!ATTLIST insp opid CDATA #REQUIRED>
<!ATTLIST insp defect CDATA #REQUIRED>
<!ATTLIST insp assetvalue CDATA #REQUIRED>
<!ATTLIST insp cfglabel CDATA #REQUIRED>
<!ATTLIST insp loadtime CDATA #REQUIRED>
<!ATTLIST insp sn CDATA #REQUIRED>
<!ATTLIST insp asset_exsid CDATA #REQUIRED>
<!ATTLIST insp operator_exsid CDATA #REQUIRED>
<!ATTLIST insp vin CDATA #REQUIRED>
Reply Data | |
---|---|
Name | Description |
count | The number of inspections returned. |
timestamp | The timestamp of the inspection. Specifically the timestamp of the primary asset tag read. Unix epoch timestamp (UTC). |
stat | Inspection status. Single ASCII character.
|
fleet | The primary asset fleet number. Usually displayed in the web interface as Asset No. Alphanumeric, 20 characters maximum. |
operator | Name of the operator (driver) that performed the inspection. First name, last name, 32 characters each maximum. |
optag | Tagid for the operator (driver) that performed the inspection. Numeric. |
repair | Count of the repairs for the inspection. |
loadlocation | The upload location the inspection was sent from. Alphanumeric, 32 characters maximum, may be empty. |
startime | Earliest timestamp in the inspection. Generally the operator login timestamp. Unix epoch timestamp (UTC). |
endtime | The latest timestamp in the inspection. Generally the inspection store timestamp. Unix Epoch timestamp (UTC). |
extractor | The device that extracted the inspection from the Zonar 2010 hand held device.
|
config | Inspection configuration name and version string. This is the actual name used internally in the system. For the label displayed in the web application see the cfglabel element. Example: TRUCK-2.0.1
|
manual | Flag to indicate the inspection contains one or more manually inspected zones. If the value is 1 the operator did not actually scan an RFID tag. Either 0 or 1. |
verified | Flag to indicate that the inspection is complete. If value is 1 the inspection was completed. The operator indicated good or bad for every zone. If the value is 0 then the inspection was not completed, the operator did not indicate good or bad on one or more zones. |
assetid | Primary asset id. |
opid | Operator (driver) id. |
defect | A count of the defects reported in the inspection. |
assetvalue | The numeric value reported for the primary asset. Usually, but not always the odometer reading at the time of the inspection. The specific inspection procedures will determine what this value means. |
cfglabel | Inspection configuration label. |
loadtime | When the inspection was loaded into the database. Unix epoch timestamp (UTC). |
sn | The serial number of the 2010 device used to perform the inspection. |
asset_exsid | Asset External System Identifier. An arbitrary text string of up to 40 characters in length. Used to provide compatibility with external systems. This must be unique per asset. |
operator_exsid | Operator External System Identifier. An arbitrary text string of up to 40 characters in length. Used to provide compatibility with external systems. This must be unique per operator. |
vin | (logvers >= 2) The asset's VIN. |
Inspection id number. Use as a target for the get inspection details function. |
Note: The assetvalue
, cfglabel
and loadtime
elements were added in protocol version 2.0.3 / 1.10.
Example Success Reply