21.0 Inspection Statistics

Use this function 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.

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

Data Returned

Returned information:
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
  • count : Total count of all inspections meeting criteria.
  • unverified : Count of inspections with unverified zones (inspection performed manually).
  • incomplete : Count of inspections with skipped (unvisted) zones.
assets
  • count : Count of all assets. If location is specified, assets for that location.
  • inspected : Count of assets with inspections.
  • red : Count of assets with operational status Red. Assets with unrepaired critical defects. Important:This will be the current status, start and end does not affect this count.
  • yellow : Count of assets with operational status Yellow. Assets with unrepaired non-critical defects. Important:This will be the current status, start and end does not affect this count.
defects
  • count : Count of defects for inspections meeting criteria.
  • critical : Count of critical defects.
  • noncritical : Count of non-critical defects.
  • unrepaired : Count of unrepaired (open) defects.
  • unrepairedcritical : Count of unrepaired (open) critical defects.
  • unrepairednoncritical : Count of unrepaired (open) non-critical defects.
assetdefects
  • count : Count of assets with reported defects. Includes both repaired and unrepaired defects.
  • critical : Count of assets with reported critical defects. Includes both repaired and unrepaired defects.
  • noncritical : Count of assets with reported non-critical defects. Includes both repaired and unrepaired defects.

Example Request:
http://development.zonarsystems.net/interface.php?action=showstats&operation=insp&format=xml


Example Success Reply