Skip to main content

Endpoint

curl http://localhost:3000/audit/stats \
  -H "Authorization: Bearer $PARMANA_API_KEY" | jq .

Response

{
  "total_decisions": "12847",
  "decisions_today": "342",
  "total_verifications": "12831",
  "valid_verifications": "12831",
  "invalid_verifications": "0",
  "total_security_events": "3",
  "total_api_calls": "38291"
}
All values are strings — PostgreSQL returns bigint counts as strings over JSON.
FieldDescription
total_decisionsTotal decisions ever recorded
decisions_todayDecisions recorded today (UTC)
total_verificationsTotal verification calls recorded
valid_verificationsVerifications that returned valid: true
invalid_verificationsVerifications that returned valid: false — investigate immediately if non-zero
total_security_eventsTotal security events recorded
total_api_callsTotal API calls recorded across all endpoints

SDK

const stats = await client.audit.stats();

const invalidVerifications = parseInt(stats.invalid_verifications, 10);
if (invalidVerifications > 0) {
  // Alert immediately — invalid verifications require investigation
  console.error(`WARNING: ${invalidVerifications} invalid verification(s) detected`);
}

Dashboard

The Statistics view in the audit dashboard (http://localhost:8081) displays these counts alongside a decision timeline chart.

Troubleshooting

All counts show “0” — Postgres is connected but no decisions have been recorded. Verify that executions are actually being made and that audit_db: true in /health. total_decisions matches but total_verifications is much lower — Verification is not being called after each execution. Call client.verify() immediately after every POST /execute in your application. invalid_verifications > 0 — This is a critical signal. Pull the security events to identify which executions are failing verification, retrieve the full attestations, and investigate immediately.