API Overview
Keyraft exposes a RESTful HTTP/JSON API under the /v1 prefix.
Base URL: http://localhost:7200/v1 (default)
Authentication
All endpoints except /v1/health and /v1/metrics require Bearer token authentication:
http
Authorization: Bearer YOUR_TOKEN_HERESee Authentication for details.
Content Type
Request bodies use Content-Type: application/json.
Response Format
Successful responses return JSON. Error responses include an error message and appropriate HTTP status code.
Health Check
No authentication required:
bash
curl http://localhost:7200/v1/healthjson
{
"status": "ok",
"time": "2025-12-20T10:00:00Z",
"version": "x.y.z"
}Metrics
Prometheus metrics at /v1/metrics - no authentication required.
API Sections
| Section | Description |
|---|---|
| KV | Key-value store operations |
| Watch | Live change notifications |
| Namespaces | Namespace management |
| Auth | Token management |
| Roles | Role definitions |
| Audit | Audit log access |
| Endpoints | Full endpoint reference table |
