This document provides detailed information about the HyperFleet API resources, including endpoints, request/response formats, and usage patterns.
GET /api/hyperfleet/v1/clusters
POST /api/hyperfleet/v1/clusters
GET /api/hyperfleet/v1/clusters/{cluster_id}
GET /api/hyperfleet/v1/clusters/{cluster_id}/statuses
POST /api/hyperfleet/v1/clusters/{cluster_id}/statuses
POST /api/hyperfleet/v1/clusters
Request Body:
{
"kind": "Cluster",
"name": "my-cluster",
"spec": {},
"labels": {
"environment": "production"
}
}Response (201 Created):
{
"kind": "Cluster",
"id": "2abc123...",
"href": "/api/hyperfleet/v1/clusters/2abc123...",
"name": "my-cluster",
"generation": 1,
"spec": {},
"labels": {
"environment": "production"
},
"created_time": "2025-01-01T00:00:00Z",
"updated_time": "2025-01-01T00:00:00Z",
"created_by": "user@example.com",
"updated_by": "user@example.com",
"status": {
"conditions": [
{
"type": "Available",
"status": "False",
"reason": "AwaitingAdapters",
"message": "Waiting for adapters to report status",
"observed_generation": 0,
"created_time": "2025-01-01T00:00:00Z",
"last_updated_time": "2025-01-01T00:00:00Z",
"last_transition_time": "2025-01-01T00:00:00Z"
},
{
"type": "Ready",
"status": "False",
"reason": "AwaitingAdapters",
"message": "Waiting for adapters to report status",
"observed_generation": 0,
"created_time": "2025-01-01T00:00:00Z",
"last_updated_time": "2025-01-01T00:00:00Z",
"last_transition_time": "2025-01-01T00:00:00Z"
}
]
}
}Note: Status initially has Available=False and Ready=False conditions until adapters report status.
GET /api/hyperfleet/v1/clusters/{cluster_id}
Response (200 OK):
{
"kind": "Cluster",
"id": "2abc123...",
"href": "/api/hyperfleet/v1/clusters/2abc123...",
"name": "my-cluster",
"generation": 1,
"spec": {},
"labels": {
"environment": "production"
},
"created_time": "2025-01-01T00:00:00Z",
"updated_time": "2025-01-01T00:00:00Z",
"created_by": "user@example.com",
"updated_by": "user@example.com",
"status": {
"conditions": [
{
"type": "Available",
"status": "True",
"reason": "ResourceAvailable",
"message": "Cluster is accessible",
"observed_generation": 1,
"created_time": "2025-01-01T00:00:00Z",
"last_updated_time": "2025-01-01T00:00:00Z",
"last_transition_time": "2025-01-01T00:00:00Z"
},
{
"type": "Ready",
"status": "True",
"reason": "ResourceReady",
"message": "All adapters report ready at current generation",
"observed_generation": 1,
"created_time": "2025-01-01T00:00:00Z",
"last_updated_time": "2025-01-01T00:00:00Z",
"last_transition_time": "2025-01-01T00:00:00Z"
}
]
}
}GET /api/hyperfleet/v1/clusters?page=1&pageSize=10
Response (200 OK):
{
"kind": "ClusterList",
"page": 1,
"size": 10,
"total": 100,
"items": [
{
"kind": "Cluster",
"id": "2abc123...",
"name": "my-cluster",
...
}
]
}POST /api/hyperfleet/v1/clusters/{cluster_id}/statuses
Adapters use this endpoint to report their status.
Request Body:
{
"adapter": "validator",
"observed_generation": 1,
"observed_time": "2025-01-01T10:00:00Z",
"conditions": [
{
"type": "Available",
"status": "True",
"reason": "AllValidationsPassed",
"message": "All validations passed"
},
{
"type": "Applied",
"status": "True",
"reason": "ValidationJobApplied",
"message": "Validation job applied successfully"
},
{
"type": "Health",
"status": "True",
"reason": "OperationsCompleted",
"message": "All adapter operations completed successfully"
}
],
"data": {
"job_name": "validator-job-abc123",
"attempt": 1
}
}Response (201 Created):
{
"adapter": "validator",
"observed_generation": 1,
"conditions": [
{
"type": "Available",
"status": "True",
"reason": "AllValidationsPassed",
"message": "All validations passed",
"last_transition_time": "2025-01-01T10:00:00Z"
},
{
"type": "Applied",
"status": "True",
"reason": "ValidationJobApplied",
"message": "Validation job applied successfully",
"last_transition_time": "2025-01-01T10:00:00Z"
},
{
"type": "Health",
"status": "True",
"reason": "OperationsCompleted",
"message": "All adapter operations completed successfully",
"last_transition_time": "2025-01-01T10:00:00Z"
}
],
"data": {
"job_name": "validator-job-abc123",
"attempt": 1
},
"created_time": "2025-01-01T10:00:00Z",
"last_report_time": "2025-01-01T10:00:00Z"
}Note: The API automatically sets created_time, last_report_time, and last_transition_time fields.
The status uses Kubernetes-style conditions instead of a single phase field:
-
Ready - Whether all adapters report successfully at the current generation
True: All required adapters reportAvailable=Trueat current spec generationFalse: One or more adapters report Available=False at current generation- After every spec change,
ReadybecomesFalsesince adapters take some time to report at current spec generation - Default value when creating the cluster, when no adapters have reported yet any value
- After every spec change,
-
Available - Aggregated adapter result for a common
observed_generationTrue: All required adapters report Available=True for the same observed_generationFalse: At least one adapter reports Available=False when all adapters report the same observed_generation- Default value when creating the cluster, when no adapters have reported yet any value
Available keeps its value unchanged in case adapters report from a different observed_generation or there is already a mix of observed_generation statuses
- e.g.
Available=Trueforobserved_generation==1- One adapter reports
Available=Falseforobserved_generation=1Availabletransitions toFalse - One adapter reports
Available=Falseforobserved_generation=2Availablekeeps itsTruestatus
- One adapter reports
GET /api/hyperfleet/v1/nodepools
GET /api/hyperfleet/v1/clusters/{cluster_id}/nodepools
POST /api/hyperfleet/v1/clusters/{cluster_id}/nodepools
GET /api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}
GET /api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}/statuses
POST /api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}/statuses
POST /api/hyperfleet/v1/clusters/{cluster_id}/nodepools
Request Body:
{
"kind": "NodePool",
"name": "worker-pool",
"spec": {},
"labels": {
"role": "worker"
}
}Response (201 Created):
{
"kind": "NodePool",
"id": "2def456...",
"href": "/api/hyperfleet/v1/nodepools/2def456...",
"name": "worker-pool",
"owner_references": {
"kind": "Cluster",
"id": "2abc123..."
},
"generation": 1,
"spec": {},
"labels": {
"role": "worker"
},
"created_time": "2025-01-01T00:00:00Z",
"updated_time": "2025-01-01T00:00:00Z",
"created_by": "user@example.com",
"updated_by": "user@example.com",
"status": {
"conditions": [
{
"type": "Available",
"status": "False",
"reason": "AwaitingAdapters",
"message": "Waiting for adapters to report status",
"observed_generation": 0,
"created_time": "2025-01-01T00:00:00Z",
"last_updated_time": "2025-01-01T00:00:00Z",
"last_transition_time": "2025-01-01T00:00:00Z"
},
{
"type": "Ready",
"status": "False",
"reason": "AwaitingAdapters",
"message": "Waiting for adapters to report status",
"observed_generation": 0,
"created_time": "2025-01-01T00:00:00Z",
"last_updated_time": "2025-01-01T00:00:00Z",
"last_transition_time": "2025-01-01T00:00:00Z"
}
]
}
}GET /api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}
Response (200 OK):
{
"kind": "NodePool",
"id": "2def456...",
"href": "/api/hyperfleet/v1/nodepools/2def456...",
"name": "worker-pool",
"owner_references": {
"kind": "Cluster",
"id": "2abc123..."
},
"generation": 1,
"spec": {},
"labels": {
"role": "worker"
},
"created_time": "2025-01-01T00:00:00Z",
"updated_time": "2025-01-01T00:00:00Z",
"created_by": "user@example.com",
"updated_by": "user@example.com",
"status": {
"conditions": [
{
"type": "Available",
"status": "True",
"reason": "ResourceAvailable",
"message": "NodePool is accessible",
"observed_generation": 1
},
{
"type": "Ready",
"status": "True",
"reason": "ResourceReady",
"message": "All adapters report ready at current generation",
"observed_generation": 1
}
]
}
}POST /api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}/statuses
Same format as cluster status reporting (see above).
All list endpoints support pagination:
GET /api/hyperfleet/v1/clusters?page=1&pageSize=10
Parameters:
page- Page number (default: 1)pageSize- Items per page (default: 100)
Response:
{
"kind": "ClusterList",
"page": 1,
"size": 10,
"total": 100,
"items": [...]
}Search using TSL (Tree Search Language) query syntax:
# Simple equality
curl -G http://localhost:8000/api/hyperfleet/v1/clusters \
--data-urlencode "search=name='my-cluster'"
# AND query with condition-based status
curl -G http://localhost:8000/api/hyperfleet/v1/clusters \
--data-urlencode "search=status.conditions.Ready='True' and labels.environment='production'"
# OR query
curl -G http://localhost:8000/api/hyperfleet/v1/clusters \
--data-urlencode "search=labels.environment='dev' or labels.environment='staging'"
# Query for available resources
curl -G http://localhost:8000/api/hyperfleet/v1/clusters \
--data-urlencode "search=status.conditions.Available='True'"Supported fields:
name- Resource namestatus.conditions.<Type>- Condition status (True, False). Examples:status.conditions.Ready='True'- Resources that are readystatus.conditions.Available='True'- Resources that are available
labels.<key>- Label values
Supported operators:
=- Equalityin- In listand- Logical ANDor- Logical OR
kind- Resource type (Cluster, NodePool)id- Unique resource identifier (auto-generated, format:2<base62>)href- Resource URIname- Resource name (user-defined)generation- Spec version counter (incremented on spec updates)spec- Provider-specific configuration (JSONB, validated against OpenAPI schema)labels- Key-value pairs for categorization and searchcreated_time- When resource was created (API-managed)updated_time- When resource was last updated (API-managed)created_by- User who created the resource (email)updated_by- User who last updated the resource (email)
The status object contains synthesized conditions computed from adapter reports:
conditions- Array of resource conditions, including:- Available - Whether resource is running at any known good configuration
- Ready - Whether all adapters have processed current spec generation
- Additional conditions from adapters (with
observed_generation, timestamps)
In AdapterStatus POST request (ConditionRequest):
type- Condition type (Available, Applied, Health)status- Condition status (True, False)reason- Machine-readable reason codemessage- Human-readable message
In Cluster/NodePool status (ResourceCondition):
- All above fields plus:
observed_generation- Generation this condition reflectscreated_time- When condition was first created (API-managed)last_updated_time- When adapter last reported (API-managed, from AdapterStatus.last_report_time)last_transition_time- When status last changed (API-managed)
All list endpoints accept the following query parameters:
| Parameter | Type | Required | Default | Constraints |
|---|---|---|---|---|
search |
string | No | - | TSL query syntax |
page |
integer (int32) | No | 1 |
- |
pageSize |
integer (int32) | No | 20 |
- |
orderBy |
string | No | created_time |
- |
order |
string | No | - | Must be asc or desc |
| Parameter | Type | Required |
|---|---|---|
cluster_id |
string | Yes |
nodepool_id |
string | Yes |
| Constraint | Value |
|---|---|
| Required | Yes |
| Type | string |
| Min length | 3 |
| Max length | 53 |
| Pattern | ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
Must be lowercase alphanumeric, may contain hyphens, and must start and end with an alphanumeric character.
| Constraint | Value |
|---|---|
| Required | Yes |
| Type | string |
| Min length | 3 |
| Max length | 15 |
| Pattern | ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
Same naming rules as cluster, but with a shorter maximum length.
| Field | Type | Required |
|---|---|---|
adapter |
string | Yes |
observed_generation |
integer (int32) | Yes |
observed_time |
string (date-time) | Yes |
conditions |
array of ConditionRequest |
Yes |
metadata |
object | No |
data |
object | No |
| Field | Type | Required | Constraints |
|---|---|---|---|
type |
string | Yes | - |
status |
string | Yes | Must be True, False, or Unknown |
reason |
string | No | - |
message |
string | No | - |
- AdapterConditionStatus (used in adapter status reports):
True,False,Unknown - ResourceConditionStatus (used in cluster/nodepool conditions):
True,False - OrderDirection:
asc,desc
- Example Usage - Practical examples
- Authentication - API authentication
- Database - Database schema