API Reference

All endpoints are prefixed with /v1 and return JSON.

Authentication

t2e uses two authentication methods:

Bearer Token (JWT)

Used for all read endpoints. Obtain by calling POST /v1/auth/login with email and password.

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
API Key

Used for the ingest endpoint. Generated from the dashboard or admin API.

X-API-Key: t2e_key_abc123def456
POST /v1/auth/login none

Authenticate with email and password to receive a JWT.

Request body:
{
  "email": "user@example.com",
  "password": "..."
}
POST /v1/ingest/batch X-API-Key

Ingest a batch of telemetry events. Returns accepted and duplicate counts.

Request body:
{
  "events": [
    {
      "source": "kubernetes",
      "event_type": "k8s.workload.upsert",
      "dedup_key": "dep-1",
      "payload": {}
    }
  ]
}
GET /v1/assets Bearer

List all assets. Supports cursor-based pagination with the `cursor` query parameter.

GET /v1/risks Bearer

List all risk findings. Filter by severity, status, or asset_id.

GET /v1/evidence Bearer

List evidence records. Filter by source, evidence_type, or date range.

GET /v1/reports Bearer

List generated compliance reports.

GET /v1/incidents Bearer

List incidents with timeline and remediation status.

GET /v1/changes Bearer

List tracked changes (deployments, PRs, config changes).

Pagination

List endpoints use cursor-based pagination. The response includes a next_cursor field when more results are available. Pass this value as the cursor query parameter to fetch the next page.

# First page
GET /v1/assets?limit=20

# Second page
GET /v1/assets?cursor=eyJpZCI6IjE...&limit=20