PgBeam
PgBeam Docs
Agents

Export agent audit logs as CSV

GET
/v1/projects/{project_id}/audit-logs/export

Streams the project's agent audit entries as a CSV file, newest first, honoring the same credential, event, decision, source and date-range filters as the list endpoint. The full filtered set is streamed (no pagination); the result is suitable for spreadsheets, SIEM ingestion, and compliance archives.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

project_id*string

Unique project identifier (prefixed, e.g. prj_xxx).

Match^[a-zA-Z0-9_.-]+$

Query Parameters

credential_id?string

Filter to a single agent credential.

Match^[a-zA-Z0-9_.-]+$
event?string

Filter to a single event type (e.g. blocked, masked, query).

Match^[a-z_]+$
decision?string

Coarse outcome filter that groups events. allow = query; block = blocked, budget_exhausted, auth_failed, credential_expired; mask = masked; truncate = truncated.

Value in

  • "allow"
  • "block"
  • "mask"
  • "truncate"
source?string

Filter by statement origin (wire, mcp, rest, or control).

Value in

  • "wire"
  • "mcp"
  • "rest"
  • "control"
start?string

Return entries at or after this timestamp (inclusive lower bound).

Formatdate-time
end?string

Return entries strictly older than this timestamp (cursor / upper bound).

Formatdate-time

Response Body

text/csv

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/string/audit-logs/export"
"string"
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}