REST API Overview
Introduction to the Kubeadapt REST API for Kubernetes cost data. Covers base URL, versioning, rate limiting, CORS, health endpoints, and request format.
The Kubeadapt REST API gives you programmatic access to cluster metrics, cost data, workload details, and optimization recommendations. All data is scoped to your organization automatically. For terminal-based access, see the CLI.
Base URL
https://public-api.kubeadapt.io/v1/All endpoints are prefixed with /v1/.
Versioning
The current API version is v1. The version prefix is part of every endpoint path. Breaking changes will be introduced under a new version prefix rather than modifying existing endpoints.
Request Format
All requests use JSON. The API is read-only, so every endpoint uses the GET HTTP method. You don't need to set Content-Type for requests without a body, but responses always return application/json.
Rate Limiting
The API enforces rate limits per API key. The current default is 100 requests per minute per key. Every authenticated response includes these headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
When the limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.
If you need higher limits for a production integration, contact support.
Health endpoints
These endpoints don't require authentication. Use them for uptime monitoring or readiness checks.
| Endpoint | Response | Description |
|---|---|---|
GET /health | {"status": "healthy", "version": "<semver>"} | Returns API status and version |
GET /health/live | {"status": "alive"} | Liveness probe |
GET /health/ready | {"status": "ready", "checks": {"postgres": "ok"}} | Readiness probe, verifies PostgreSQL connectivity. Returns 503 with {"status": "not_ready", ...} on failure. |
Example:
curl https://public-api.kubeadapt.io/health{
"status": "healthy",
"version": "0.1.0"
}OpenAPI Specification
Interactive API documentation (Swagger UI at /docs and ReDoc at /redoc) is available in development environments only.
Request Headers
Every response includes an X-Request-Id header (UUID). You can pass your own X-Request-Id in the request to trace calls through your systems.
Related
- Authentication - API key setup and Bearer tokens
- Pagination and Filtering - Query parameters for list endpoints
- Error Handling - Status codes and error responses
- CLI - Terminal-based access to the same data