Skip to main content
GET
/
v1
/
trace
/
exposure
Compliance exposure summary
curl --request GET \
  --url https://api.pyai.com/v1/trace/exposure \
  --header 'Authorization: Bearer <token>'
{
  "object": "trace.exposure",
  "window_days": 123,
  "interactions_scanned": 123,
  "with_a_gap": 123,
  "gap_rate": 123,
  "by_rule": [
    {
      "rule_id": "<string>",
      "pack_id": "<string>",
      "count": 123,
      "rate": 123
    }
  ],
  "by_verdict": {
    "PASS": 123,
    "WARN": 123,
    "FAIL": 123
  },
  "top_exposure": "<string>"
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Query Parameters

window_days
integer
default:30

Trailing window in days.

Required range: 1 <= x <= 365

Response

Exposure summary

object
string
Example:

"trace.exposure"

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[]
by_verdict
object
top_exposure
string | null

The rule_id with the most occurrences.