---
title: "Compliance exposure summary"
method: GET
path: "/v1/trace/exposure"
tags: ["Trace"]
---

# Compliance exposure summary

`GET /v1/trace/exposure`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/trace/exposure`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

The dashboard headline / Exposure Scan: interactions scanned, the share with a compliance gap, a per-rule exposure ranking, and the verdict mix over a trailing window. Requires the `trace:read` scope.

## Query parameters

- `window_days` integer

## Response `200`

Exposure summary

- TraceExposure
  - `object` string
  - `window_days` integer
  - `interactions_scanned` integer
  - `with_a_gap` integer: Interactions whose verdict is not PASS.
  - `gap_rate` number: with_a_gap / interactions_scanned (0..1).
  - `by_rule` object[]
    - `rule_id` string
    - `pack_id` string, nullable
    - `count` integer: Distinct scored calls with at least one finding for this rule.
    - `rate` number: Distinct affected calls divided by interactions_scanned.
  - `by_verdict` object
    - `PASS` integer
    - `WARN` integer
    - `FAIL` integer
  - `top_exposure` string, nullable: The rule_id affecting the most distinct scored calls.

## Other responses

- `401`: Missing or invalid API key (`code: unauthorized`)

---

[API](https://skmtc.dev/pyai/apis/pyai-api.md) · [All operations](https://skmtc.dev/pyai/apis/pyai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pyai/apis/pyai-api/revisions/271a1539185b?raw)
