{"components":{"schemas":{"ErrorResponse":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"HeartbeatResponse":{"properties":{"checks":{"properties":{"app":{"example":"ok","type":"string"},"db":{"example":"ok","type":"string"},"queue":{"example":"ok","type":"string"},"redis":{"example":"ok","type":"string"}},"required":["app","db","redis","queue"],"type":"object"},"status":{"example":"ok","type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["status","timestamp","checks"],"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"API token","scheme":"bearer","type":"http"}}},"info":{"description":"Beacon accepts authenticated webhook-style event submissions and sends email notifications.","title":"Beacon API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api-spec":{"get":{"description":"Returns a compact plain-text spec suitable for pasting into an LLM.","responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Plain-text API specification"}},"summary":"Plain-text API specification"}},"/emit":{"post":{"description":"Stores an event, then enqueues an asynchronous email notification job.","requestBody":{"content":{"application/json":{"examples":{"full":{"value":{"channel":"email","event":"completed","level":"info","message":"Resnet50 finished after 4h12m. Final val_acc = 0.927.","metadata":{"checkpoint":"s3://models/rn_8a3f9c/best.pt","duration":"4h12m","run_id":"rn_8a3f9c","val_acc":0.927},"source":"ml-training","title":"Training run finished"}},"minimal":{"value":{"title":"hello from beacon"}}},"schema":{"properties":{"channel":{"default":"email","description":"Notification channel. Only email is supported in v1.","enum":["email"],"type":"string"},"event":{"description":"Event type name, e.g. completed, failed, started.","type":"string"},"level":{"description":"Semantic level. Prefer info, warn, or danger. warning maps to warn; critical and error map to danger.","enum":["info","warn","warning","danger","critical","error"],"type":"string"},"message":{"description":"Longer free-form event detail shown in the UI and email.","type":"string"},"metadata":{"additionalProperties":true,"description":"Arbitrary JSON object with extra fields.","type":"object"},"source":{"description":"System or subsystem name, e.g. nightly-backup or ml-training.","type":"string"},"title":{"description":"Human-readable event title. Must not be blank.","type":"string"}},"required":["title"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"event_id":{"example":42,"type":"integer"},"status":{"example":"ok","type":"string"}},"type":"object"}}},"description":"Event accepted and recorded"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Invalid JSON, blank title, or unsupported channel"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Missing, malformed, or invalid bearer token"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal persistence or auth lookup failure"}},"security":[{"bearerAuth":[]}],"summary":"Create an event and enqueue email delivery"}},"/health":{"get":{"description":"Returns ok when the HTTP app is up.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"example":"ok","type":"string"}},"type":"object"}}},"description":"Service is up"}},"summary":"Lightweight liveness check"}},"/heartbeat":{"get":{"description":"Checks app, SQLite, Redis, and queue connectivity.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}},"description":"All dependency checks passed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}},"description":"One or more dependency checks failed"}},"summary":"Dependency-aware heartbeat"}},"/openapi.json":{"get":{"description":"Returns the OpenAPI 3.1 JSON document for this service.","responses":{"200":{"description":"OpenAPI JSON document"}},"summary":"OpenAPI document"}}},"servers":[{"url":"https://beacon.sijibomi.com"}]}