Skip to content

Latest commit

 

History

History
199 lines (150 loc) · 3.53 KB

File metadata and controls

199 lines (150 loc) · 3.53 KB
title API Reference
description REST API endpoints for traces, incidents, services, and more.

The Wraith API is a REST API. All endpoints are under your Wraith instance URL.

Authentication

``` Authorization: Bearer ``` Get your key from **Settings > API Keys** in the dashboard. Alert endpoints use a different header: ``` x-wraith-webhook-secret: ```

MCP endpoint

POST /api/mcp

Model Context Protocol endpoint for IDE integrations (Cursor, Claude Code). See Introduction for setup.

Traces

Ingest a trace

POST /api/traces/ingest

Accepts trace bundles generated by the SDK. Authenticated with API key.

List traces

GET /api/traces

Query parameters: serviceName, environment, limit (default 50), offset

Get trace detail

GET /api/traces/<id>

Get bug signals

GET /api/traces/<id>/bug-signals

Download trace

GET /api/traces/<id>/download

Incidents

List incidents

GET /api/incidents/list

Query parameters: status, service, limit (default 50), offset

Example response:

{
  "incidents": [
    {
      "id": "inc_abc123",
      "title": "High Error Rate on user-api",
      "status": "ESCALATED",
      "service": "user-api",
      "confidence": 0.92,
      "createdAt": "2026-03-29T12:00:00Z"
    }
  ],
  "total": 45
}

Get incident detail

GET /api/incidents/<id>

Provide feedback

POST /api/incidents/<id>/feedback
{
  "verdictCorrect": true,
  "comment": "Root cause was correctly identified"
}

Analyze commits

POST /api/incidents/<id>/analyze-commits

Pipeline progress

GET /api/incidents/<id>/pipeline-progress

Multi-service root cause

GET /api/incidents/<id>/multi-service-rca

Services

GET /api/services/health        # Service health status
GET /api/services/inventory     # All discovered services
GET /api/services/graph         # Dependency graph
GET /api/services/graph/health  # Graph with health overlay

Runbooks

GET    /api/runbooks               # List
POST   /api/runbooks               # Create
GET    /api/runbooks/<id>          # Get
PATCH  /api/runbooks/<id>          # Update
POST   /api/runbooks/<id>/execute  # Execute
POST   /api/runbooks/match         # Match to incident

Organization

GET    /api/org                    # Get org
PATCH  /api/org                    # Update org
GET    /api/org/api-keys           # List API keys
POST   /api/org/api-keys           # Create API key
DELETE /api/org/api-keys/<id>      # Revoke
GET    /api/org/members            # List members
POST   /api/org/members            # Invite
DELETE /api/org/members/<id>       # Remove

Integrations

GET    /api/integrations           # List all
POST   /api/integrations           # Create
POST   /api/integrations/<id>/test # Test connection

Utility

GET /api/health                    # Health check (no auth)
GET /api/user                      # Current user

Errors

All endpoints return errors in this format:

{
  "error": "Error message",
  "code": "ERROR_CODE"
}
Code Meaning
400 Bad request
401 Unauthorized — missing or invalid API key
403 Forbidden
404 Not found
429 Rate limited — check Retry-After header
500 Internal error