Export data

Export logs

Deprecated

This endpoint is deprecated and may be removed in a future version. Avoid it for new integrations.

Returns paginated interaction logs (one row per evaluated request) with the messages and per-detector eval results.

GET/v1/logs

Query Parameters

pageinteger

1-based page number. Default 1.

page_sizeinteger

Rows per page (1–1000). Default 100.

applicationstring

Filter by application name.

sessionstring

Filter by session ID.

fromdatetime

Start (ISO 8601, e.g. 2025-09-26T10:00:00Z).

todatetime

End (ISO 8601).

laststring

Relative window (1h, 24h, 7d). Cannot be combined with from/to.

Response

logsLogItem[]

Page of log rows: { log_id, session, application, flagged, evals[], messages[], created_at, updated_at }.

totalinteger

Total matching rows.

pageinteger

Current page.

page_sizeinteger

Page size.

total_pagesinteger

Total pages.

curl "https://api.guardion.ai/v1/logs?last=24h&page=1&page_size=100" \
  -H "Authorization: Bearer $GUARDION_API_KEY"
Response
{
  "logs": [
    {
      "log_id": "log_123",
      "session": "customer_101",
      "application": "support-bot",
      "flagged": true,
      "evals": [
        {
          "eval_id": "ev_1",
          "policy": "guardion-policy-default",
          "detector": "prompt-attack",
          "threshold": 0.5,
          "target": "input",
          "detected": true,
          "threat_score": 0.98,
          "threat_type": "PROMPT_INJECTION"
        }
      ],
      "messages": [{ "role": "user", "content": "Ignore all previous instructions..." }],
      "created_at": "2026-06-24T10:00:00Z",
      "updated_at": "2026-06-24T10:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 100,
  "total_pages": 1
}