Controller API¶
Django REST Framework API. Base URL: http://localhost:8000/api/v1/
Authentication: OAuth2 client credentials for external orchestrators, Token auth for operator tools.
Tasks¶
Callback¶
Receives task completion notifications from the Dispatcher.
POST /api/v1/tasks/{guid}/callback/
Authorization: Bearer {callback_token}
X-Kohakku-Signature: sha256={hmac}
{
"status": "completed",
"exit_code": 0,
"result_key": "results/guid/output.json",
"result_metadata": {},
"error_message": ""
}
See Callback Contract for the full schema and auth details.
Dispatchers¶
Check-in¶
{
"name": "local-dev",
"endpoint_url": "http://dispatcher:8080",
"cloud": "local",
"backends": ["local"],
"labels": {},
"heartbeat_interval_seconds": 60
}
Response:
The action field is created for new registrations, updated for existing dispatchers checking in again.
Heartbeat¶
Response:
Skills¶
List Skills¶
Response:
[
{
"guid": "uuid",
"name": "code-review",
"slug": "code-review",
"category": "tool",
"description": "Reviews code for quality."
}
]
Create Skill¶
Upload Package¶
POST /api/v1/skills/{slug}/upload/
Authorization: Token {token}
Content-Type: multipart/form-data
file: skill-package.zip
Response:
{
"slug": "code-review",
"storage_ref": "skills/code-review/e3b0c44..zip",
"content_hash": "e3b0c44...",
"version_number": 1,
"deduplicated": false
}
Download Package¶
Response: application/zip with X-Content-Hash: {sha256} header.
Webhooks¶
Ingest¶
POST /api/v1/webhooks/
X-Webhook-Source: github|slack|custom
X-Webhook-Event: push|pull_request|event_callback
Response:
Auto-detection
GitHub webhooks are auto-detected via the X-GitHub-Event header. Slack webhooks are auto-detected via the X-Slack-Signature header.
Health¶
| Endpoint | Purpose |
|---|---|
GET /health/ |
Liveness -- checks database connectivity |
GET /ready/ |
Readiness -- checks database + Redis + MinIO |