garden/static/api/openapi.json

1 line
No EOL
16 KiB
JSON

{"openapi":"3.1.0","info":{"title":"Trentuna Estate API","description":"Operational API for the Trentuna estate — trends, health, disk, stats, providers, builds, state, repos, events.","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Root","description":"Root endpoint with API metadata.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"summary":"Healthz","description":"Kubernetes-style health check — always 200 while running.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","description":"Live system health — status, uptime, version, disk usage.\n\nUnauthenticated — suitable for monitoring and load balancers.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Status Page","description":"Simple HTML status page for the Trentuna Estate API.","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/trends":{"get":{"tags":["trends"],"summary":"Get Trends","description":"Get the latest N trend data points from the trends JSONL file.","operationId":"get_trends_trends_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Max trend points","default":100,"title":"Limit"},"description":"Max trend points"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/trends/latest":{"get":{"tags":["trends"],"summary":"Get Latest Trend","description":"Get the single most recent trend data point.","operationId":"get_latest_trend_trends_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/disk":{"get":{"tags":["disk"],"summary":"Get Disk","description":"Get disk snapshot data from disk-snapshot.log.","operationId":"get_disk_disk_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/disk/latest":{"get":{"tags":["disk"],"summary":"Get Latest Disk","description":"Get the most recent disk snapshot.","operationId":"get_latest_disk_disk_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/health/pulse":{"get":{"tags":["health"],"summary":"Get Health","description":"Get health pulse entries from health-pulse.log.","operationId":"get_health_health_pulse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/health/pulse/status":{"get":{"tags":["health"],"summary":"Get Health Status","description":"Get overall health status string.","operationId":"get_health_status_health_pulse_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/stats":{"get":{"tags":["stats"],"summary":"Get Stats","description":"Get site statistics from update-site-stats.sh.","operationId":"get_stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/providers":{"get":{"tags":["providers"],"summary":"Get Providers","description":"Get LLM provider reachability status.","operationId":"get_providers_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/builds":{"get":{"tags":["builds"],"summary":"Get Builds","description":"Get build digest for the last N days.","operationId":"get_builds_builds_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Days to look back","default":7,"title":"Days"},"description":"Days to look back"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/builds/recent":{"get":{"tags":["builds"],"summary":"Get Recent Builds","description":"Get recent build digest (last 7 days).","operationId":"get_recent_builds_builds_recent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/state":{"get":{"tags":["state"],"summary":"Get State","description":"Get all estate state files.","operationId":"get_state_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/state/{file_name}":{"get":{"tags":["state"],"summary":"Get State File","description":"Get a specific state file by name (scoreboard, heartbeat, estate_map).","operationId":"get_state_file_state__file_name__get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}],"parameters":[{"name":"file_name","in":"path","required":true,"schema":{"type":"string","title":"File Name"}},{"name":"max_chars","in":"query","required":false,"schema":{"type":"integer","maximum":20000,"minimum":100,"description":"Max content chars","default":5000,"title":"Max Chars"},"description":"Max content chars"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/repos":{"get":{"tags":["repos"],"summary":"Get Repos","description":"Get repos from Forgejo and REPO_LEDGER.md.","operationId":"get_repos_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/events":{"get":{"tags":["events"],"summary":"Get Events","description":"Get recent estate events from heartbeat and scoreboard files.","operationId":"get_events_events_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max events","default":50,"title":"Limit"},"description":"Max events"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/summary":{"get":{"tags":["summary"],"summary":"Get Summary","description":"Aggregate summary across all data sources.","operationId":"get_summary_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/forgejo-proxy/repos":{"get":{"tags":["forgejo-proxy"],"summary":"Proxy Repos","description":"Proxy: list all Forgejo repos (enriched).","operationId":"proxy_repos_forgejo_proxy_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/forgejo-proxy/issues/{owner}/{repo}":{"get":{"tags":["forgejo-proxy"],"summary":"Proxy Issues","description":"Proxy: get issues for a specific Forgejo repo.","operationId":"proxy_issues_forgejo_proxy_issues__owner___repo__get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}],"parameters":[{"name":"owner","in":"path","required":true,"schema":{"type":"string","title":"Owner"}},{"name":"repo","in":"path","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","description":"Issue state: open, closed, all","default":"open","title":"State"},"description":"Issue state: open, closed, all"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max issues","default":20,"title":"Limit"},"description":"Max issues"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/estate/status":{"get":{"tags":["estate"],"summary":"Estate Status","description":"System status + uptime for the garden estate node card.","operationId":"estate_status_estate_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/estate/logs":{"get":{"tags":["estate"],"summary":"Estate Logs","description":"Recent activity log — sourced from the kanban work completion feed.\n\nEach entry is mapped to a log shape the garden page expects:\n{timestamp, message, source}.","operationId":"estate_logs_estate_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max entries","default":20,"title":"Limit"},"description":"Max entries"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/estate/agents":{"get":{"tags":["estate"],"summary":"Estate Agents","description":"Known agent nodes with live telemetry.\n\nAgent nodes are discovered from the work feed (agents that have\ncompleted tasks recently) and enriched with estimated telemetry\nfrom the runtime environment.","operationId":"estate_agents_estate_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/garden":{"get":{"tags":["garden"],"summary":"Get Garden Feed","description":"Main garden feed — writings, expressive forms, estate pulse, identity.","operationId":"get_garden_feed_api_garden_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/publishing/register":{"post":{"tags":["publishing"],"summary":"Register","description":"Register a newly published piece of content.\n\nRequired fields: title, slug, content_type, target_site.","operationId":"register_publishing_register_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/publishing/latest":{"get":{"tags":["publishing"],"summary":"Latest","description":"Public feed — latest published pieces, newest first.","operationId":"latest_publishing_latest_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max entries","default":10,"title":"Limit"},"description":"Max entries"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publishing/by-type/{content_type}":{"get":{"tags":["publishing"],"summary":"By Type","description":"Filter published entries by content type.","operationId":"by_type_publishing_by_type__content_type__get","parameters":[{"name":"content_type","in":"path","required":true,"schema":{"type":"string","title":"Content Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publishing/by-site/{site}":{"get":{"tags":["publishing"],"summary":"By Site","description":"Filter published entries by target site.","operationId":"by_site_publishing_by_site__site__get","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","title":"Site"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publishing/{entry_id}":{"get":{"tags":["publishing"],"summary":"Entry","description":"Get a single published entry by ID.","operationId":"entry_publishing__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/work/complete":{"post":{"tags":["work"],"summary":"Complete","description":"Record a kanban task completion.\n\nCalled by the orchestrator (or any agent) when a task finishes.\n\nRequired fields: task_id, board, assignee, title\nOptional fields: commit_sha, output_url, summary, board","operationId":"complete_work_complete_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]},{"APIKeyQuery":[]}]}},"/work/feed":{"get":{"tags":["work"],"summary":"Feed","description":"Public feed — recent kanban task completions, newest first.","operationId":"feed_work_feed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max entries","default":20,"title":"Limit"},"description":"Max entries"},{"name":"board","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by board slug","title":"Board"},"description":"Filter by board slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/hq/work":{"get":{"tags":["work"],"summary":"Work Page","description":"Public HTML page showing the live kanban completion feed.","operationId":"work_page_hq_work_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyQuery":{"type":"apiKey","in":"query","name":"api_key"}}}}