Skip to content

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_HERE

See 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/health
json
{
  "status": "ok",
  "time": "2025-12-20T10:00:00Z",
  "version": "x.y.z"
}

Metrics

Prometheus metrics at /v1/metrics - no authentication required.

API Sections

SectionDescription
KVKey-value store operations
WatchLive change notifications
NamespacesNamespace management
AuthToken management
RolesRole definitions
AuditAudit log access
EndpointsFull endpoint reference table

Client SDKs

Official clients are available for PHP and Dart.

Apache License 2.0