OpenapiVisor
Removes a BYO cluster from the caller org's fleet.
Removes a BYO cluster from the caller org's fleet.
DELETE /v1/visor/clusters/{id}
| Address | https://api.hanzo.ai/v1/visor/clusters/{id} |
| Method | DELETE |
| Operation | detachCluster |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Removes a BYO cluster from the caller org's fleet. It only ever touches BYO clusters — a managed cluster's nodes are removed through the node-pool routes — and answers 404 when the name is not in this org's fleet.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the cluster's fleet name (the name it was attached under), matched lower-cased. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | clusterDetached | ok |
200 body — 1 field.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
detached | body | string | — | Detached is the lower-cased fleet name that was removed. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, VisorApi } from 'hanzoai';
const api = new VisorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.detachCluster({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import VisorApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = VisorApi(client).detach_cluster(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.VisorAPI.DetachCluster(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, visor_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = visor_api::detach_cluster(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.VisorApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new VisorApi(client).detachCluster();curl -X DELETE https://api.hanzo.ai/v1/visor/clusters/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"Tool visor, op detachCluster — 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": "visor",
"arguments": {
"op": "detachCluster",
"input": {
"id": "<id>"
}
}
}
}'How is this guide?