# List live

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

> Answers, for each service, what it is running and whether that is what universe says it should run.

`GET /v1/deploy/live`

> [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/live`  |
| **Method**    | `GET`                                  |
| **Operation** | `get_deploy_live`                      |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Answers, for each service, what it is running and whether that is what
universe says it should run.

For every Hanzo CD Application the caller may see: the images its live pods run
(tag, digest, and the source commit and repository each was built from where
the registry answers it), the universe commit CD last applied, CD's sync and
health verdicts, when it last synced, the image its values files pin at that
commit, whether the two agree and which of them does not, and the image CD
deployed before this one.

`service` lists one service. `commit` — at least seven hex characters of a sha
— adds a top-level `live`: whether any listed service runs an image built from
that commit. Together they answer "is commit X live for service Y", and a
service's `previous` is where to roll back to.

It reads CD's own state and derives nothing CD already says. The declared image
is read from the universe files the Application names, at the commits CD
names. A value the registry or the repository has not yet answered is left out
of this answer and read again on the next. Read-only, and scoped exactly as
/v1/deploy/gitops is: a SuperAdmin sees every Application, a validated org
member only its own org's, anyone else 403s.

installed is false — with a reason and an empty list — when the CD CRD is not
served in this cluster.

## Request

2 fields.

| Field     | In    | Type   | Required | Description                                                                                                                                        |
| --------- | ----- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `service` | query | string | —        | Service lists one service, by the name it is listed under.                                                                                         |
| `commit`  | query | string | —        | Commit asks whether the listed services run an image built from this source commit: at least seven hex characters of its sha, matched as a prefix. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | deploy.Live     | ok      |
| `default` | problem-details | refused |

`200` body — 34 fields.

| Field                            | In   | Type              | Always | Description                                                                                                                                                                                                                          |
| -------------------------------- | ---- | ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `installed`                      | body | boolean           | —      | Installed is whether this cluster serves the CD Application CRD at all.                                                                                                                                                              |
| `live`                           | body | boolean           | —      | Live answers the commit query: whether any listed service runs an image built from that commit.                                                                                                                                      |
| `reason`                         | body | string            | —      | Reason says why the plane is absent.                                                                                                                                                                                                 |
| `services`                       | body | deploy.Running\[] | —      | Services is every visible Application the query keeps, ordered by namespace then name.                                                                                                                                               |
| `services[].converged`           | body | boolean           | —      | Converged is whether nothing disagrees: Drift is empty.                                                                                                                                                                              |
| `services[].declared`            | body | deploy.Image      | —      |                                                                                                                                                                                                                                      |
| `services[].declared.commit`     | body | string            | —      | Commit is the source commit the image was built from — its org.opencontainers.image.revision label — where the registry answers it: a digest-pinned image in one of our registries that this deployment can read.                    |
| `services[].declared.digest`     | body | string            | —      | Digest is the sha256 of the bytes, when the reference is pinned by one.                                                                                                                                                              |
| `services[].declared.ref`        | body | string            | —      | Ref is the reference exactly as the pods run it.                                                                                                                                                                                     |
| `services[].declared.repo`       | body | string            | —      | Repo is the repository that commit is in — the image's org.opencontainers.image.source label, as the build wrote it — where the registry answers it.                                                                                 |
| `services[].declared.repository` | body | string            | —      | Repository is the reference without its tag or digest.                                                                                                                                                                               |
| `services[].declared.tag`        | body | string            | —      | Tag is the release name, when the reference carries one.                                                                                                                                                                             |
| `services[].drift`               | body | string\[]         | —      | Drift names what disagrees, from: image, the pods do not run the declared tag and digest; sync, CD's verdict is not Synced; health, CD's verdict is not Healthy; unread, the declaration could not be read so agreement is unproven. |
| `services[].health`              | body | string            | —      | Health is CD's verdict on the objects it manages: Healthy, Progressing, Degraded, Suspended, Missing or Unknown.                                                                                                                     |
| `services[].images`              | body | deploy.Image\[]   | —      | Images are the images the service's pods are running now, as CD collected them from the live pods.                                                                                                                                   |
| `services[].images[].commit`     | body | string            | —      | Commit is the source commit the image was built from — its org.opencontainers.image.revision label — where the registry answers it: a digest-pinned image in one of our registries that this deployment can read.                    |
| `services[].images[].digest`     | body | string            | —      | Digest is the sha256 of the bytes, when the reference is pinned by one.                                                                                                                                                              |
| `services[].images[].ref`        | body | string            | —      | Ref is the reference exactly as the pods run it.                                                                                                                                                                                     |
| `services[].images[].repo`       | body | string            | —      | Repo is the repository that commit is in — the image's org.opencontainers.image.source label, as the build wrote it — where the registry answers it.                                                                                 |
| `services[].images[].repository` | body | string            | —      | Repository is the reference without its tag or digest.                                                                                                                                                                               |
| `services[].images[].tag`        | body | string            | —      | Tag is the release name, when the reference carries one.                                                                                                                                                                             |
| `services[].name`                | body | string            | —      | Name is the CD Application's name, which the fleet mints as \<namespace>-\<app>.                                                                                                                                                     |
| `services[].namespace`           | body | string            | —      | Namespace is where the service's workloads run (spec.destination.namespace).                                                                                                                                                         |
| `services[].previous`            | body | deploy.Image      | —      |                                                                                                                                                                                                                                      |
| `services[].previous.commit`     | body | string            | —      | Commit is the source commit the image was built from — its org.opencontainers.image.revision label — where the registry answers it: a digest-pinned image in one of our registries that this deployment can read.                    |
| `services[].previous.digest`     | body | string            | —      | Digest is the sha256 of the bytes, when the reference is pinned by one.                                                                                                                                                              |
| `services[].previous.ref`        | body | string            | —      | Ref is the reference exactly as the pods run it.                                                                                                                                                                                     |
| `services[].previous.repo`       | body | string            | —      | Repo is the repository that commit is in — the image's org.opencontainers.image.source label, as the build wrote it — where the registry answers it.                                                                                 |
| `services[].previous.repository` | body | string            | —      | Repository is the reference without its tag or digest.                                                                                                                                                                               |
| `services[].previous.tag`        | body | string            | —      | Tag is the release name, when the reference carries one.                                                                                                                                                                             |
| `services[].repoURL`             | body | string            | —      | RepoURL is the git repository CD applies this service from, usually universe.                                                                                                                                                        |
| `services[].revision`            | body | string            | —      | Revision is the commit of that repository CD last applied.                                                                                                                                                                           |
| `services[].sync`                | body | string            | —      | Sync is CD's verdict on git against the cluster: Synced, OutOfSync or Unknown.                                                                                                                                                       |
| `services[].syncedAt`            | body | string            | —      | SyncedAt is when CD last finished applying a revision, RFC 3339.                                                                                                                                                                     |

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

## Examples

**CLI**

```bash
hanzo deploy live
```

**SDK**

**.ts**

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

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

**.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_live()
```

**.go**

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

resp, _, err := client.DeployAPI.GetDeployLive(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_live(&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).getDeployLive();
```

The method above is the one at the current release of the document. `hanzoai@8.5.914` (npm) and `hanzoai@8.5.914` (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 →](https://docs.hanzo.ai/docs/sdks)

**HTTP**

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

**MCP**

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

```bash
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": "deploy",
         "arguments": {
           "op": "get_deploy_live",
           "input": {}
         }
       }
     }'
```

---

[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)
