Returns one application's argocd ApplicationTree: the objects the operator…
Returns one application's argocd ApplicationTree: the objects the operator reconciled from its App CR, reached by ownerRef — the Deployment and, under it,…
GET /v1/deploy/applications/{name}/resource-tree
| Address | https://api.hanzo.ai/v1/deploy/applications/{name}/resource-tree |
| Method | GET |
| Operation | get_deploy_applications_by_name_resource-tree |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns one application's argocd ApplicationTree: the objects the operator reconciled from its App CR, reached by ownerRef — the Deployment and, under it, the ReplicaSet and Pods, plus the Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget and ConfigMaps it owns — each node carrying its parent edges and its health.
Secrets are DELIBERATELY not walked, so no materialized environment can ever appear in the tree. Tenant-scoped exactly like the application read: another org's name is not found, a malformed name is a 400.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Name is the application to read, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | argoTree | ok |
200 body — 47 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
hosts | body | object[] | — | Hosts is ArgoCD's per-node machine inventory. |
nodes | body | argoNode[] | — | Nodes is the FLAT node list, root first: the App CR, then the objects the operator owns, then their ReplicaSets and Pods. |
nodes[].createdAt | body | string | — | CreatedAt is the object's creationTimestamp, RFC 3339 UTC to the second. |
nodes[].group | body | string | — | |
nodes[].health | body | argoHealth | — | |
nodes[].health.message | body | string | — | Message is why the status is what it is — "Running: no replicas ready", "iam: CrashLoopBackOff". |
nodes[].health.status | body | string | — | Status is the ArgoCD health vocabulary, Capitalized: Healthy, Progressing, Degraded, Suspended, Missing or Unknown. |
nodes[].images | body | string[] | — | Images are the container images running on this node. |
nodes[].info | body | argoInfoItem[] | — | Info are the chips shown on the node. At most one: the image tag — the RUNNING tag on a Deployment, ReplicaSet or Pod, and the DECLARED tag on the App CR at… |
nodes[].info[].name | body | string | — | Name is the chip's label. |
nodes[].info[].value | body | string | — | Value is the chip's value — for "Image Tag", the tag the node runs. |
nodes[].kind | body | string | — | |
nodes[].name | body | string | — | |
nodes[].namespace | body | string | — | |
nodes[].parentRefs | body | argoResourceRef[] | — | ParentRefs are the node's edges UPWARD, which is how the SPA draws the DAG from this flat list. |
nodes[].parentRefs[].group | body | string | — | Group is the object's API group: empty for the core group (Pod, Service, ConfigMap), otherwise apps, networking.k8s.io, autoscaling or policy — and hanzo.ai… |
nodes[].parentRefs[].kind | body | string | — | Kind is the object kind. The root is the App CR; below it come Deployment, ReplicaSet, Pod, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget and… |
nodes[].parentRefs[].name | body | string | — | Name is the object's metadata.name. |
nodes[].parentRefs[].namespace | body | string | — | Namespace is the namespace the walk ran in, the same for every node of one tree. |
nodes[].parentRefs[].uid | body | string | — | UID is the object's metadata.uid. |
nodes[].parentRefs[].version | body | string | — | Version is the object's API version as the live object reports it: v1 for every kind the walk reaches except the HorizontalPodAutoscaler, which is… |
nodes[].resourceVersion | body | string | — | ResourceVersion is the k8s version a watch would resume from. |
nodes[].uid | body | string | — | |
nodes[].version | body | string | — | |
orphanedNodes | body | argoNode[] | — | OrphanedNodes are objects in the namespace belonging to no application. |
orphanedNodes[].createdAt | body | string | — | CreatedAt is the object's creationTimestamp, RFC 3339 UTC to the second. |
orphanedNodes[].group | body | string | — | |
orphanedNodes[].health | body | argoHealth | — | |
orphanedNodes[].health.message | body | string | — | Message is why the status is what it is — "Running: no replicas ready", "iam: CrashLoopBackOff". |
orphanedNodes[].health.status | body | string | — | Status is the ArgoCD health vocabulary, Capitalized: Healthy, Progressing, Degraded, Suspended, Missing or Unknown. |
orphanedNodes[].images | body | string[] | — | Images are the container images running on this node. |
orphanedNodes[].info | body | argoInfoItem[] | — | Info are the chips shown on the node. At most one: the image tag — the RUNNING tag on a Deployment, ReplicaSet or Pod, and the DECLARED tag on the App CR at… |
orphanedNodes[].info[].name | body | string | — | Name is the chip's label. |
orphanedNodes[].info[].value | body | string | — | Value is the chip's value — for "Image Tag", the tag the node runs. |
orphanedNodes[].kind | body | string | — | |
orphanedNodes[].name | body | string | — | |
orphanedNodes[].namespace | body | string | — | |
orphanedNodes[].parentRefs | body | argoResourceRef[] | — | ParentRefs are the node's edges UPWARD, which is how the SPA draws the DAG from this flat list. |
orphanedNodes[].parentRefs[].group | body | string | — | Group is the object's API group: empty for the core group (Pod, Service, ConfigMap), otherwise apps, networking.k8s.io, autoscaling or policy — and hanzo.ai… |
orphanedNodes[].parentRefs[].kind | body | string | — | Kind is the object kind. The root is the App CR; below it come Deployment, ReplicaSet, Pod, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget and… |
orphanedNodes[].parentRefs[].name | body | string | — | Name is the object's metadata.name. |
orphanedNodes[].parentRefs[].namespace | body | string | — | Namespace is the namespace the walk ran in, the same for every node of one tree. |
orphanedNodes[].parentRefs[].uid | body | string | — | UID is the object's metadata.uid. |
orphanedNodes[].parentRefs[].version | body | string | — | Version is the object's API version as the live object reports it: v1 for every kind the walk reaches except the HorizontalPodAutoscaler, which is… |
orphanedNodes[].resourceVersion | body | string | — | ResourceVersion is the k8s version a watch would resume from. |
orphanedNodes[].uid | body | string | — | |
orphanedNodes[].version | body | string | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy applications resource-tree <name>import { Configuration, DeployApi } from 'hanzoai';
const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeployApplicationsByNameResource-tree({ name: 'name' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DeployApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DeployApi(client).get_deploy_applications_by_name_resource-tree(name='name')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.GetDeployApplicationsByNameResource-tree(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, deploy_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = deploy_api::get_deploy_applications_by_name_resource-tree(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DeployApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new DeployApi(client).getDeployApplicationsByNameResource-tree();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/deploy/applications/<name>/resource-tree \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches deploy through the deploy tool, which names its 21 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_deploy_account_can_i"
}
}
}'How is this guide?