Authentication

All API requests require authentication using an API key in the header.

Authorization: Bearer YOUR_API_KEY
POST

/api/v1/analyze

Submit logs for analysis and receive a structured story.

Request Body

{
  "logs": "string | array",
  "format": "auto | json | text | syslog",
  "options": {
    "includeTimeline": true,
    "includeRootCause": true,
    "includeSuggestions": true
  }
}

Response

{
  "id": "story_abc123",
  "status": "completed",
  "summary": "Database connection failure",
  "timeline": [...],
  "rootCause": {...},
  "suggestions": [...]
}
GET

/api/v1/stories/:id

Retrieve a previously analyzed story by its ID.

Response

{
  "id": "story_abc123",
  "createdAt": "2024-01-15T14:32:01Z",
  "status": "completed",
  "data": {...}
}
POST

/api/v1/webhooks

Configure webhooks to receive notifications when analysis completes.

Request Body

{
  "url": "https://your-server.com/webhook",
  "events": ["analysis.completed", "alert.triggered"],
  "secret": "your_webhook_secret"
}