# Get deployments

URL: https://docs.hanzo.ai/docs/openapi/ai/get-ai-deployments-by-owner-by-name

> Read one application by its (owner, name) key.

`GET /v1/ai/deployments/{owner}/{name}`

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

|               |                                                         |
| ------------- | ------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/ai/deployments/{owner}/{name}` |
| **Method**    | `GET`                                                   |
| **Operation** | `get_ai_deployments_by_owner_by_name`                   |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                  |

Read one application by its (owner, name) key.

## Request

2 fields.

| Field   | In   | Type   | Required | Description |
| ------- | ---- | ------ | -------- | ----------- |
| `owner` | path | string | yes      |             |
| `name`  | path | string | yes      |             |

## Response

| Status | Body | Meaning                                             |
| ------ | ---- | --------------------------------------------------- |
| `200`  |      | Envelope.                                           |
| `401`  | —    | No credential, or one this service does not accept. |
| `403`  | —    | A valid credential that may not do this.            |

`200` body — 68 fields.

| Field                                                      | In   | Type                       | Always | Description                                             |
| ---------------------------------------------------------- | ---- | -------------------------- | ------ | ------------------------------------------------------- |
| `data`                                                     | body | any                        | —      | The operation's own result.                             |
| `data2`                                                    | body | any                        | —      | A second result the operation defines, when it has one. |
| `msg`                                                      | body | string                     | yes    | Empty on success, the reason on failure.                |
| `status`                                                   | body | string                     | yes    | One of `ok`, `error`.                                   |
| `data.basicConfigOptions`                                  | body | ApplicationConfigOption\[] | —      |                                                         |
| `data.basicConfigOptions[].parameter`                      | body | string                     | —      |                                                         |
| `data.basicConfigOptions[].setting`                        | body | string                     | —      |                                                         |
| `data.createdTime`                                         | body | string                     | —      |                                                         |
| `data.description`                                         | body | string                     | —      |                                                         |
| `data.details`                                             | body | ApplicationView            | —      |                                                         |
| `data.details.createdTime`                                 | body | string                     | —      |                                                         |
| `data.details.credentials`                                 | body | EnvVariable\[]             | —      |                                                         |
| `data.details.credentials[].name`                          | body | string                     | —      |                                                         |
| `data.details.credentials[].value`                         | body | string                     | —      |                                                         |
| `data.details.deployments`                                 | body | DeploymentDetail\[]        | —      |                                                         |
| `data.details.deployments[].containers`                    | body | ContainerDetail\[]         | —      |                                                         |
| `data.details.deployments[].containers[].image`            | body | string                     | —      |                                                         |
| `data.details.deployments[].containers[].name`             | body | string                     | —      |                                                         |
| `data.details.deployments[].containers[].resources`        | body | ResourceRequests           | —      |                                                         |
| `data.details.deployments[].containers[].resources.cpu`    | body | string                     | —      |                                                         |
| `data.details.deployments[].containers[].resources.memory` | body | string                     | —      |                                                         |
| `data.details.deployments[].createdTime`                   | body | string                     | —      |                                                         |
| `data.details.deployments[].name`                          | body | string                     | —      |                                                         |
| `data.details.deployments[].readyReplicas`                 | body | integer                    | —      |                                                         |
| `data.details.deployments[].replicas`                      | body | integer                    | —      |                                                         |
| `data.details.deployments[].status`                        | body | string                     | —      |                                                         |
| `data.details.events`                                      | body | ApplicationEvent\[]        | —      |                                                         |
| `data.details.events[].count`                              | body | integer                    | —      |                                                         |
| `data.details.events[].firstTime`                          | body | string                     | —      |                                                         |
| `data.details.events[].involvedObject`                     | body | string                     | —      |                                                         |
| `data.details.events[].lastTime`                           | body | string                     | —      |                                                         |
| `data.details.events[].message`                            | body | string                     | —      |                                                         |
| `data.details.events[].name`                               | body | string                     | —      |                                                         |
| `data.details.events[].reason`                             | body | string                     | —      |                                                         |
| `data.details.events[].source`                             | body | string                     | —      |                                                         |
| `data.details.events[].type`                               | body | string                     | —      |                                                         |
| `data.details.metrics`                                     | body | ResourceMetrics            | —      |                                                         |
| `data.details.metrics.cpuPercentage`                       | body | number                     | —      |                                                         |
| `data.details.metrics.cpuUsage`                            | body | string                     | —      |                                                         |
| `data.details.metrics.memoryPercentage`                    | body | number                     | —      |                                                         |
| `data.details.metrics.memoryUsage`                         | body | string                     | —      |                                                         |
| `data.details.metrics.podCount`                            | body | integer                    | —      |                                                         |
| `data.details.namespace`                                   | body | string                     | —      |                                                         |
| `data.details.services`                                    | body | ServiceDetail\[]           | —      |                                                         |
| `data.details.services[].clusterIP`                        | body | string                     | —      |                                                         |
| `data.details.services[].createdTime`                      | body | string                     | —      |                                                         |
| `data.details.services[].externalHost`                     | body | string                     | —      |                                                         |
| `data.details.services[].externalIP`                       | body | string                     | —      |                                                         |
| `data.details.services[].internalHost`                     | body | string                     | —      |                                                         |
| `data.details.services[].name`                             | body | string                     | —      |                                                         |
| `data.details.services[].ports`                            | body | ServicePort\[]             | —      |                                                         |
| `data.details.services[].ports[].name`                     | body | string                     | —      |                                                         |
| `data.details.services[].ports[].nodePort`                 | body | integer                    | —      |                                                         |
| `data.details.services[].ports[].port`                     | body | integer                    | —      |                                                         |
| `data.details.services[].ports[].protocol`                 | body | string                     | —      |                                                         |
| `data.details.services[].ports[].url`                      | body | string                     | —      |                                                         |
| `data.details.services[].type`                             | body | string                     | —      |                                                         |
| `data.details.status`                                      | body | string                     | —      |                                                         |
| `data.displayName`                                         | body | string                     | —      |                                                         |
| `data.manifest`                                            | body | string                     | —      |                                                         |
| `data.name`                                                | body | string                     | —      |                                                         |
| `data.namespace`                                           | body | string                     | —      |                                                         |
| `data.owner`                                               | body | string                     | —      |                                                         |
| `data.parameters`                                          | body | string                     | —      |                                                         |
| `data.status`                                              | body | string                     | —      |                                                         |
| `data.template`                                            | body | string                     | —      |                                                         |
| `data.updatedTime`                                         | body | string                     | —      |                                                         |
| `data.url`                                                 | body | string                     | —      |                                                         |

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

## Examples

**CLI**

```bash
hanzo ai deployments owner get <owner> <name>
```

**SDK**

**.ts**

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

const api = new AiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getAiDeploymentsByOwnerByName({ owner: 'owner', name: 'name' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AiApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AiApi(client).get_ai_deployments_by_owner_by_name(owner='owner', name='name')
```

**.go**

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

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

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, ai_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = ai_api::get_ai_deployments_by_owner_by_name(&cfg, Default::default()).await?;
```

**.java**

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

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

var result = new AiApi(client).getAiDeploymentsByOwnerByName();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/ai/deployments/<owner>/<name> \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP declares no tool for **ai** — `tools/list` on `https://api.hanzo.ai/v1/mcp` names the products it does reach. Use HTTP or an SDK.

---

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