---
updatedAt: 2026-05-12T10:00:52.000Z
---

# Retrieve vulnerability statistics for sites

This operation returns the vulnerability (vuln) statistics per site retrieved. 

Results of this query include counts of:
* open vulns
* closed vulns
* accepted vulns
* out of scope vulns
* vulns of each risk category. 

Only the query parameters that apply to site retrieval are appropriate for this operation.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "Vuln API (Legacy)",
    "license": {
      "name": "(c) Copyright 2020 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/vuln/stats": {
      "get": {
        "tags": [
          "Vuln API v1.0"
        ],
        "summary": "Retrieve vulnerability statistics for sites",
        "description": "This operation returns the vulnerability (vuln) statistics per site retrieved. \n\nResults of this query include counts of:\n* open vulns\n* closed vulns\n* accepted vulns\n* out of scope vulns\n* vulns of each risk category. \n\nOnly the query parameters that apply to site retrieval are appropriate for this operation.",
        "operationId": "getVulnStatistics",
        "parameters": [
          {
            "name": "query_group_id",
            "in": "query",
            "description": "Retrieves vuln statistics for sites which are members of a particular group. Only one group may be specified. The format of the ID is {client_id}_{group_id}. EXAMPLE: 1066_17",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_group_name_like",
            "in": "query",
            "description": "Retrieves vuln statistics for sites that are members of particular group(s), based on a group name that contains or matches what is given.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_site",
            "in": "query",
            "description": "Retrieves vuln statistics for the given site ID(s) or site label(s). Accepts one value or multiple comma-separated values.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_site_label",
            "in": "query",
            "description": "Retrieves vuln statistics for the given site label or part of a label. Only accepts a single value. EXAMPLE: Given you have a site named 'foo' and a site named 'foobar', if you enter 'foo' for this parameter, it will return vuln statistics for both these sites. If you enter 'bar', it will only return statistics for 'foobar'.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_site_label_not_like",
            "in": "query",
            "description": "Retrieves vuln statistics for all sites EXCEPT for the given site label or part of a label. Only accepts a single value. EXAMPLE: Given you have a site named 'foo' and a site named 'foobar', if you enter 'bar' for this parameter, it will only return statistics for the 'foo' site.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_asset_status",
            "in": "query",
            "description": "Retrieves vuln statistics for all sites with the asset status given. Sites with 'active' asset status are fully approved for scans. Sites with 'inactive' status are not currently approved for scans.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "active",
              "example": "active",
              "enum": [
                "active",
                "inactive"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Requested resource format for the response.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "xml",
              "example": "json",
              "enum": [
                "xml",
                "json"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provides vulnerability (vuln) statistics per site retrieved.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VulnStatsObjJSON"
                }
              },
              "text/xml": {
                "example": "XML preview is currently not supported."
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "VulnSeverity": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "object",
            "properties": {
              "informational": {
                "type": "number"
              },
              "medium": {
                "type": "number"
              },
              "low": {
                "type": "number"
              },
              "urgent": {
                "type": "number"
              },
              "critical": {
                "type": "number"
              },
              "high": {
                "type": "number"
              }
            }
          }
        }
      },
      "Risk": {
        "type": "object",
        "properties": {
          "risk": {
            "type": "object",
            "properties": {
              "medium": {
                "type": "number"
              },
              "critical": {
                "type": "number"
              },
              "low": {
                "type": "number"
              },
              "high": {
                "type": "number"
              },
              "note": {
                "type": "number"
              }
            }
          }
        }
      },
      "LegacyOrAdvancedStats": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/VulnSeverity"
          },
          {
            "$ref": "#/components/schemas/Risk"
          }
        ]
      },
      "VulnStatsJSON": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "service_level": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "closed": {
            "type": "number"
          },
          "accepted": {
            "type": "number"
          },
          "out_of_scope": {
            "type": "number"
          },
          "risk_or_severity": {
            "$ref": "#/components/schemas/LegacyOrAdvancedStats"
          }
        }
      },
      "StatsTotalsJSON": {
        "type": "object",
        "properties": {
          "open": {
            "type": "number"
          },
          "closed": {
            "type": "number"
          },
          "accepted": {
            "type": "number"
          },
          "out_of_scope": {
            "type": "number"
          }
        }
      },
      "VulnStatsObjJSON": {
        "type": "object",
        "properties": {
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VulnStatsJSON"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/StatsTotalsJSON"
          }
        }
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true
  }
}
```