Constellation OverwatchConstellation Overwatch
Platform

API Reference

Complete API documentation for Constellation Overwatch

Complete API documentation for Constellation Overwatch.

Overview

Constellation Overwatch provides a RESTful API with bearer token authentication for managing organizations, entities, and telemetry data.

Authentication

All API requests require authentication using a bearer token in the Authorization header:

curl -H "Authorization: Bearer <your-token>" \
  http://localhost:8080/api/v1/organizations

Base URL

http://localhost:8080/api/v1

Configuration Variables

These environment variables configure the API server:

VariableDefaultDescription
OVERWATCH_TOKENreindustrialize-dev-tokenUnified token for API and NATS authentication
PORT8080HTTP server port
DB_PATH./db/constellation.dblibSQL database path
NATS_PORT4222NATS server port
NATS_DATA_DIR./data/overwatchNATS data directory
WEB_UI_PASSWORD(empty)Password for Web UI access (leave empty to disable)

Endpoints

Organizations

MethodEndpointDescription
GET/organizationsList all organizations
POST/organizationsCreate a new organization
GET/organizations?org_id=xxxGet organization by ID

Create Organization:

curl -s -X POST http://localhost:8080/api/v1/organizations \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Fleet",
    "org_type": "civilian",
    "description": "Test drone fleet"
  }'

Allowed org_type values: military, civilian, commercial, ngo

Entities

MethodEndpointDescription
GET/entities?org_id=xxxList all entities in organization
POST/entities?org_id=xxxCreate a new entity
GET/entities?org_id=xxx&entity_id=yyyGet entity by ID
PUT/entities?org_id=xxx&entity_id=yyyUpdate an entity
DELETE/entities?org_id=xxx&entity_id=yyyDelete an entity

Create Entity:

curl -s -X POST "http://localhost:8080/api/v1/entities?org_id=$ORG_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Drone-001",
    "entity_type": "aircraft_multirotor",
    "description": "Primary vegetation inspection drone",
    "metadata": {
      "model": "DJI-M300",
      "serial": "ABC123456"
    }
  }'

Health Check

MethodEndpointDescription
GET/healthService health status

NATS Subjects

Entity Events

  • constellation.entities.{org_id}.created
  • constellation.entities.{org_id}.updated
  • constellation.entities.{org_id}.deleted
  • constellation.entities.{org_id}.status

Telemetry

  • constellation.telemetry.{org_id}.{entity_id}

Commands

  • constellation.commands.{org_id}.{entity_id}
  • constellation.commands.{org_id}.broadcast

Response Format

All responses are returned in JSON format:

{
  "success": true,
  "data": {
    "entity_id": "5458eec0-b0e3-4290-8db5-17936dbbfc64",
    "org_id": "ae9c65d0-b5f3-4cec-8ffa-68ff1173e050",
    "entity_type": "aircraft_multirotor",
    "status": "unknown",
    "priority": "normal",
    "is_live": false
  }
}

Error Handling

Errors are returned with appropriate HTTP status codes:

Status CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
404Not Found - Resource not found
500Internal Server Error

Full API documentation with interactive examples coming soon.

On this page