Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Get Agent Cluster

Return cluster-level Flink info for the agent runtime - slots + version.

Powers the agentic dashboard header (total/available task slots, Flink version). Sourced from Flink REST /overview; kebab-case keys are translated to the camelCase response contract.

Agents and transforms share the same tenant Flink cluster, so this probe accepts either read:agents or read:transforms (OR semantics) and backs the cluster-availability note on both deploy surfaces.

When the tenant’s cluster is not provisioned the upstream REST call 404s; that is reported as available=False with zeroed fields (HTTP 200) so the dashboard can render a “cluster not available” note instead of erroring. A tenant with no k8s_infras row (BadRequestException from get_k8s_infra inside FlinkClusterClient.create) means the same thing for this probe — no cluster to reach — so it takes the same available=False path rather than surfacing a 400. Deploy paths keep their loud 400: the mapping applies only here.

GET/agents/cluster
Authorization
AuthorizationBearer token · headerrequired
Responses
200

Successful Response

availableboolean

False when the tenant's Flink cluster is not provisioned or unreachable; other fields are zeroed.

default: true
taskmanagersinteger

Registered TaskManagers

default: 0
slotsTotalinteger

Total task slots across all TaskManagers

default: 0
slotsAvailableinteger

Idle task slots available for new deployments

default: 0
flinkVersionstring

Flink runtime version

default: "unknown"
Request
curl -X GET 'https://api.streamkap.com/agents/cluster' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "available": true,
  "taskmanagers": 0,
  "slotsTotal": 0,
  "slotsAvailable": 0,
  "flinkVersion": "unknown"
}