API Reference

Development Status: This API documentation covers functionality that has been tested and is currently working. The platform is in active development with many planned features still being implemented.

API Overview

Current Working Features

The platform currently provides a basic but functional API for incident management:

  • Base URL: http://localhost:8080/api/v1 (development server)
  • Format: JSON (application/json)
  • Authentication: Not required (development mode)
  • Database: SQLite with local file storage

Core Functionality

βœ… Working:

  • Complete incident CRUD operations
  • Incident state management (ack, mitigate, resolve, close)
  • Timeline event tracking
  • Health monitoring
  • CLI integration

πŸ”„ In Development:

  • Authentication and authorization
  • Real-time WebSocket events
  • Metrics and analytics endpoints
  • Connector management API
  • Rate limiting and security

Quick Start

1. Start the Server

# Build and start the server
make build
./bin/server

# Server starts on http://localhost:8080
# Health check: curl http://localhost:8080/health

2. Create Incident

# Create new incident (no auth required in dev mode)
curl -X POST http://localhost:8080/api/v1/incidents \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Database connection issues",
    "severity": "SEV-2",
    "description": "Multiple users reporting login failures"
  }'

3. Use CLI

# CLI integrates with the API server
./bin/im declare --title "API test incident" --sev SEV-3
./bin/im timeline list

API Sections

REST API

Currently working HTTP endpoints:

  • βœ… Incident management (CRUD operations)
  • βœ… Timeline events and history
  • βœ… Health checks
  • πŸ”„ User and team management (in development)
  • πŸ”„ Configuration and settings (in development)
  • πŸ”„ Metrics and analytics (planned)

Client Configuration

Multi-platform client configuration:

  • Web, desktop, and mobile client setup
  • API server connection patterns
  • Environment-specific deployment

Current Limitations

Development Mode Constraints:

  • No authentication required (security not implemented)
  • No rate limiting (development use only)
  • SQLite storage only (no production database support yet)
  • Limited error handling (basic HTTP status codes)
  • No WebSocket API (real-time features planned)

Error Handling

The API currently returns basic HTTP status codes:

  • 200 - Success
  • 201 - Created
  • 404 - Not Found
  • 500 - Internal Server Error

Example error response:

{
  "error": "incident not found",
  "status": 404
}

Development Roadmap

Next Implementation Priorities:

  1. Authentication and authorization system
  2. Real-time WebSocket events
  3. Metrics and analytics endpoints
  4. Connector management API
  5. Production-ready error handling
  6. Rate limiting and security hardening

Getting Started

  1. Installation Guide - Build and run the platform
  2. CLI Reference - Command-line interface documentation
  3. Integration Testing - Test external service connections

Development Focus: The platform is designed API-first, so REST API functionality is prioritized over web UI development. Most features are accessible via CLI and API before being added to the web interface.