Skip to main content

List Events

Retrieve security and audit events for your organization.
curl -H "X-API-Key: sk_live_your_key_here" \
  "https://api.turen.dev/api/v1/events?limit=50"

Query Parameters

ParameterTypeDefaultDescription
limitnumber50Number of events to return
offsetnumber0Pagination offset
typestringallFilter by event type: install, audit
outcomestringallFilter by outcome: allow, review, block
ecosystemstring-Filter by ecosystem: npm, pip, go, cargo
packagestring-Filter by package name
sincestring-ISO 8601 timestamp — only events after this time
untilstring-ISO 8601 timestamp — only events before this time

Response

{
  "events": [
    {
      "id": "evt_abc123",
      "client_id": "a1b2c3d4e5f67890",
      "timestamp": "2026-02-17T10:30:00Z",
      "type": "install",
      "outcome": "block",
      "actor": {
        "command": "npm install",
        "args": ["malicious-pkg"],
        "version": "1.2.0"
      },
      "subject": {
        "ecosystem": "npm",
        "package": "malicious-pkg",
        "version": "1.0.0"
      },
      "metadata": {},
      "payload": {
        "reasons": ["Scorecard below minimum threshold (2.1 < 5.0)"]
      }
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1284,
    "has_more": true
  }
}

Response Fields

FieldTypeDescription
idstringUnique event identifier
client_idstringAgent that generated the event
timestampstringWhen the event occurred
typestringEvent type (install, audit)
outcomestringallow, review, or block
actorobjectWhat initiated the event (command, args, version)
subjectobjectWhat the event is about (ecosystem, package, version)
metadataobjectAdditional key-value metadata
payloadobjectType-specific payload (e.g., reasons for block)

Get Summary Stats

Retrieve aggregate statistics.
curl -H "X-API-Key: sk_live_your_key_here" \
  https://api.turen.dev/api/v1/stats/summary

Response

{
  "total_events": 1284,
  "outcomes": {
    "allow": 980,
    "review": 215,
    "block": 89
  },
  "ecosystems": {
    "npm": 850,
    "pip": 300,
    "go": 120,
    "cargo": 14
  },
  "period": "30d"
}

Query LLM Events

Retrieve LLM API call events (stored in ClickHouse).
curl -H "X-API-Key: sk_live_your_key_here" \
  "https://api.turen.dev/api/v1/events/llm?limit=50"
LLM events include provider, model, token counts, latency, and cost data.