Use this call to return inspection statistics information from the system. Counts of inspections, defects and asset operational status is included.
This function was added in version 1.08/2.01.
Request Data
Required Information | |
---|---|
Name | Description |
action | showstats |
operation | insp |
format | xml |
Optional Information | |
Name | Description |
start | A Unix epoch time stamp. Compute statistics based on inspections performed later than this time. May be combined with end. |
end | A Unix epoch time stamp. Compute statistics based on inspections performed earlier than this time. May be combined with start. |
location | Location to filter with. Text. If provided only inspections performed on assets for this location will be used. |
config | Inspection configuration name. If specified only inspections with this inspection config will be used to compute statistics. 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. |
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showstats&operation=insp&format=xml
Data Returned
DTD
<!ELEMENT inspstats (insp, assets, defects, assetdefects) >
<!ATTLIST inspstats ver CDATA #REQUIRED >
<!ELEMENT insp (count, unverified, incomplete)>
<!ELEMENT count (#PCDATA)>
<!ELEMENT unverified (#PCDATA)>
<!ELEMENT incomplete (#PCDATA)>
<!ELEMENT assets (count, inspected, red, yellow)>
<!ELEMENT count (#PCDATA)>
<!ELEMENT inspected (#PCDATA)>
<!ELEMENT red (#PCDATA)>
<!ELEMENT yellow (#PCDATA)>
<!ELEMENT defects (count, critical, noncritical, unrepaired, unrepairedcritical, unrepairednoncritical)>
<!ELEMENT count (#PCDATA)>
<!ELEMENT critical (#PCDATA)>
<!ELEMENT noncritical (#PCDATA)>
<!ELEMENT unrepaired (#PCDATA)>
<!ELEMENT unrepairedcritical (#PCDATA)>
<!ELEMENT unrepairednoncritical (#PCDATA)>
<!ELEMENT assetdefects (critical, noncritical)>
<!ELEMENT critical (#PCDATA)>
<!ELEMENT noncritical (#PCDATA)>
Explanation of Returned Data | |
---|---|
Name | Description |
insp |
|
assets |
|
defects |
|
assetdefects |
|
Example Success Reply
<?xml version="1.0"?>
<inspstats ver="1.08">
<insp>
<count>48</count>
<unverified>0</unverified>
<incomplete>2</incomplete>
</insp>
<assets>
<count>65</count>
<inspected>3</inspected>
<red>0</red>
<yellow>1</yellow>
</assets>
<defects>
<count>29</count>
<critical>15</critical>
<noncritical>14</noncritical>
<unrepaired>9</unrepaired>
<unrepairedcritical>0</unrepairedcritical>
<unrepairednoncritical>9</unrepairednoncritical>
</defects>
<assetdefects>
<count>3</count>
<critical>2</critical>
<noncritical>1</noncritical>
</assetdefects>
</inspstats>