Skip to content

Engine REST API Reference

All Triage Engine endpoints are served on port :8080.

Returns the operational health of the Triage engine and PostgreSQL connection.

Response:

{
"status": "healthy",
"version": "1.0.0",
"database": "connected"
}

Receives panic telemetry payloads from Go SDK middleware.

Headers:

  • Content-Type: application/json

Request Body:

{
"api_key": "tr_live_key_9042",
"trace_id": "tr_7f9c2d1e8a4b0c3d9a1f",
"repo": "myorg/myrepo",
"commit_sha": "7f8b9e1a2c3d4e5f60718293",
"file": "handlers/payment.go",
"line": 28,
"function_name": "ProcessTransaction",
"panic_message": "runtime error: invalid memory address or nil pointer dereference",
"raw_stack_trace": "goroutine 42 [running]:\n...",
"goroutine_id": "goroutine 42 [running]"
}

Response (200 OK):

{
"incident_id": "inc_9f8a7b6c5d4e",
"status": "PROCESSED",
"root_cause": "Attempted to evaluate req.Amount on an uninitialized nil pointer (*PaymentPayload) on line 28.",
"suggested_fix": "Allocate memory before assignment.",
"latency_ms": 14
}

Lists recent incidents (requires authentication token).

Headers:

  • Authorization: Bearer <session_token>

Response:

[
{
"id": "inc_9f8a7b6c5d4e",
"repo": "myorg/myrepo",
"file": "handlers/payment.go",
"line": 28,
"panic_message": "runtime error: invalid memory address or nil pointer dereference",
"severity": "CRITICAL",
"root_cause": "Attempted to evaluate req.Amount on an uninitialized nil pointer (*PaymentPayload) on line 28.",
"created_at": "2026-08-15T10:30:00Z"
}
]

Triggers synchronous pre-indexing of a repository’s AST into PostgreSQL.

Headers:

  • Authorization: Bearer <session_token>
  • Content-Type: application/json

Request Body:

{
"repo": "myorg/myrepo",
"commit_sha": "main"
}

Response:

{
"status": "INDEXED",
"functions_indexed": 142,
"files_processed": 18
}