Returns the argocd AppProjectList this console groups and filters applications…
Returns the argocd AppProjectList this console groups and filters applications by.
GET /v1/deploy/projects
| Address | https://api.hanzo.ai/v1/deploy/projects |
| Method | GET |
| Operation | get_deploy_projects |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the argocd AppProjectList this console groups and filters applications by. Projects are owned by Hanzo IAM rather than by argocd, so they are REFLECTED read-only from the IAM project store and nothing is persisted here: a validated org member gets its own organization's projects and a platform SuperAdmin gets every organization's.
A SuperAdmin whose IAM store is not reachable falls back to the real argoproj.io AppProject CRs when that CRD is served, and otherwise to one permissive synthesized project per distinct project name the App CRs declare. A project named "default" is always present, because that is what an App CR carrying no project label projects to.
Request
GET /v1/deploy/projects takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | argoProjectList | ok |
200 body — 23 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
items | body | argoProject[] | — | Items is the projects visible to the caller — its own organization's, or every organization's for a SuperAdmin. |
items[].apiVersion | body | string | — | APIVersion is the constant "argoproj.io/v1alpha1". |
items[].kind | body | string | — | Kind is the constant "AppProject". |
items[].metadata | body | argoMeta | — | |
items[].metadata.creationTimestamp | body | string | — | CreationTimestamp is when the source object was created, RFC 3339 to the second. |
items[].metadata.labels | body | object | — | Labels are the labels this projection puts on the row, not the source object's full label set. |
items[].metadata.labels.* | body | string | — | |
items[].metadata.name | body | string | — | Name is the projected object's name: the App CR's metadata.name for an application, the CD Application's name for a CD row, and the IAM project name for a… |
items[].metadata.namespace | body | string | — | Namespace is the namespace the source object was read from — the tenant or platform namespace for an App CR, CD's controller namespace for a CD row. |
items[].metadata.uid | body | string | — | UID is the k8s metadata.uid of the source object, which is what the SPA keys a row on across refreshes. |
items[].spec | body | argoProjectSpec | — | |
items[].spec.clusterResourceWhitelist | body | argoGroupKind[] | — | ClusterResourceWhitelist are the cluster-scoped kinds it may create — [{group:"", kind:""}] on a synthesized project. |
items[].spec.clusterResourceWhitelist[].group | body | string | — | Group is the API group a project admits, "*" for any. |
items[].spec.clusterResourceWhitelist[].kind | body | string | — | Kind is the kind it admits, "*" for any. |
items[].spec.description | body | string | — | Description is the project's human label: the IAM project's display name, or its description when it has no display name. |
items[].spec.destinations | body | argoDestination[] | — | Destinations are the cluster/namespace pairs it may write to — a single {server:"", namespace:""} on a synthesized project, for the same reason. |
items[].spec.destinations[].name | body | string | — | ArgoCD allows a destination by cluster name; omitted for the in-cluster projection. |
items[].spec.destinations[].namespace | body | string | — | Namespace is where in that cluster the workload lands. |
items[].spec.destinations[].server | body | string | — | Server is the cluster API URL the application reconciles into. |
items[].spec.sourceRepos | body | string[] | — | SourceRepos are the git repos applications in this project may pull from. |
items[].status | body | argoProjectStat | — | |
metadata | body | argoListMeta | — | |
metadata.resourceVersion | body | string | — | ResourceVersion is the k8s list version a watch would resume from. |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy projectsimport { Configuration, DeployApi } from 'hanzoai';
const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeployProjects();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_projects()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.GetDeployProjects(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_projects(&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).getDeployProjects();curl https://api.hanzo.ai/v1/deploy/projects \
-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?