---
title: "Get summary statistics"
method: POST
path: "/api/v2/stats/summary"
tags: ["Stats"]
---

# Get summary statistics

`POST /api/v2/stats/summary`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/stats/summary`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Returns aggregate security statistics for a given scope: issue counts broken down by status (open, patched, false positive, archived, patchable) and severity (critical, high, medium, low, info), plus scan activity counts (full scans, PR scans, running, failed). Use this to get a high-level security posture overview before diving into specific issues. Scope the results using optional filters: `scanId` (single scan), `repositoryId` (single repo), or `organizationId` (whole org).

## Request body

- SummaryRequest: Optional scope filters for the summary. Filters are evaluated from most specific to least: if `scanId` is provided, stats are scoped to that single scan (and `repositoryId`/`organizationId` are ignored). If only `repositoryId` is provided, stats cover all scans in that repository. If only `organizationId` is provided, stats cover all repositories in the org. If nothing is provided, stats cover everything the caller has access to.
  - `organizationId` string: Scope stats to a single organization. Ignored if `scanId` or `repositoryId` is also provided.
  - `repositoryId` string: Scope stats to a single repository. Takes precedence over `organizationId`. Ignored if `scanId` is also provided.
  - `scanId` string: Scope stats to a single scan. Takes precedence over both `repositoryId` and `organizationId`.

## Response `200`

Successful response

- SummaryResponse
  - `scans` ScansSummary, required
    - `fullScans` number, required
    - `prScans` number, required
    - `runningScans` number, required
    - `failedScans` number, required
  - `issues` IssuesByType, required
    - `open` number, required
    - `patched` number, required
    - `falsePositive` number, required
    - `archived` number, required
    - `patchable` number, required
  - `issuesByScore` IssuesByScore, required
    - `critical` number, required
    - `high` number, required
    - `medium` number, required
    - `low` number, required
    - `info` number, required

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
