Get fleet

Returns one platform service, resolved to production by default.

GET /v1/platform/fleet/{app}

Addresshttps://api.hanzo.ai/v1/platform/fleet/{app}
MethodGET
Operationget_platform_fleet_by_app
AuthAuthorization: Bearer $HANZO_API_KEY

Returns one platform service, resolved to production by default.

It returns a single platform service by its CR name, with the same declared-versus-running and drift facts the board carries. The name must be a DNS-1123 label; anything else is 400.

Namespaces are scanned in lifecycle order — main, then test, then dev — and the first match wins, so a bare name resolves to PRODUCTION. The scan covers only the namespaces the caller is authorized for, so an org admin can never read a service outside their own org, and a name found in none of them is 404 rather than a leak.

Request

2 fields.

FieldInTypeRequiredDescription
apppathstringyesApp is the service's CR name, from the path.
envquerystring—Env narrows the scan to one lifecycle env: main, test or dev.

Response

StatusBodyMeaning
200platform.AppViewok
defaultproblem-detailsrefused

200 body — 21 fields.

FieldInTypeAlwaysDescription
appbodystring—service / CR name, e.g. iam
clusterbodystring—always "hanzo-k8s"; cross-cluster federation is a follow-up phase
declaredTagbodystring—spec.image.tag — the tag the CR SAYS to run; anything but vX.Y.Z is red drift
driftbodyplatform.Verdict—
drift.flagsbodyplatform.DriftFlag[]—Flags are the findings behind the severity, in detection order: floating-declared, floating-running, stale, un-rolled, then the release-artifact ones.
drift.flags[].kindbodystring—Kind is which finding this is, one of stale, un-rolled, floating-declared, floating-running, no-release or zero-assets.
drift.flags[].messagebodystring—Message is the finding in words, naming the tags that produced it ("running v1.2.3 has not rolled to declared v1.2.4").
drift.flags[].severitybodystring—Severity is this ONE finding's weight — yellow for stale and un-rolled, red for the other four.
drift.severitybodystring—Severity is the roll-up over Flags — red if any flag is red, else yellow if any is yellow, else ok.
endpointsbodystring[]—status.endpoints the operator published for this service; empty until it reconciles
envbodystring—main|test|dev
healthbodystring—green|yellow|red|"" (unknown)
idbodystring—<org>/<app>/<env>, e.g. hanzoai/iam/main
latestTagbodystring—newest released tag; "" until the GH release reader lands, so "stale" cannot fire yet
namespacebodystring—namespace the row was scanned from: a platform one (hanzo, hanzo-testnet, …) or a tenant-<org>
orgbodystring—image namespace, e.g. hanzoai
phasebodystring—operator status.phase (Running/…)
registrybodystring—spec.image.repository verbatim (ghcr.io/hanzoai/iam); Org and Repo are read off it
repobodystring—owner/repo, e.g. hanzoai/iam
rolebodystring—operator spec.role (sql|kv|generic|ingress|…) or "" — the one declared class field
runningTagbodystring—the tag the live Deployment actually runs; "" when unreadable — unknown, not a guess

Failure carries the platform error shape — see Errors.

Examples

hanzo platform fleet get <app>
import { Configuration, PlatformApi } from 'hanzoai';

const api = new PlatformApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPlatformFleetByApp({ app: 'app' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PlatformApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PlatformApi(client).get_platform_fleet_by_app(app='app')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.PlatformAPI.GetPlatformFleetByApp(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, platform_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = platform_api::get_platform_fleet_by_app(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PlatformApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new PlatformApi(client).getPlatformFleetByApp();
curl https://api.hanzo.ai/v1/platform/fleet/<app> \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool platform, op get_platform_fleet_by_app — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "platform",
         "arguments": {
           "op": "get_platform_fleet_by_app",
           "input": {
             "app": "<app>"
           }
         }
       }
     }'

Platform API · All Hanzo APIs · Interactive reference

Was this page useful?