# List projects

URL: https://docs.hanzo.ai/docs/openapi/deploy/get-deploy-projects

> Returns the argocd AppProjectList this console groups and filters applications by.

`GET /v1/deploy/projects`

> [Deploy →](https://docs.hanzo.ai/docs/openapi/deploy) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                           |
| ------------- | ----------------------------------------- |
| **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`     | deploy.argoProjectList | ok      |
| `default` | problem-details        | refused |

`200` body — 23 fields.

| Field                                           | In   | Type                      | Always | Description                                                                                                                                                         |
| ----------------------------------------------- | ---- | ------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `items`                                         | body | deploy.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 | deploy.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 project. |
| `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 | deploy.argoProjectSpec    | —      |                                                                                                                                                                     |
| `items[].spec.clusterResourceWhitelist`         | body | deploy.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 | deploy.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 | deploy.argoProjectStat    | —      |                                                                                                                                                                     |
| `metadata`                                      | body | deploy.argoListMeta       | —      |                                                                                                                                                                     |
| `metadata.resourceVersion`                      | body | string                    | —      | ResourceVersion is the k8s list version a watch would resume from.                                                                                                  |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo deploy projects
```

**SDK**

**.ts**

```ts
import { Configuration, DeployApi } from 'hanzoai';

const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeployProjects();
```

**.py**

```python
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()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DeployAPI.GetDeployProjects(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::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?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DeployApi;

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

var result = new DeployApi(client).getDeployProjects();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/deploy/projects \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **deploy** through the `deploy` tool, which names its 11 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
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": "list_deploy_applications"
         }
       }
     }'
```

---

[Deploy API](https://docs.hanzo.ai/docs/openapi/deploy) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
