# List deployments

URL: https://docs.hanzo.ai/docs/openapi/function/get-function-deployments

> What is live right now — each function's current record IS its live deployment, so this is the deployment inventory.

`GET /v1/function/deployments`

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

|               |                                                |
| ------------- | ---------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/function/deployments` |
| **Method**    | `GET`                                          |
| **Operation** | `get_function_deployments`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`         |

What is live right now — each function's current record IS its
live deployment, so this is the deployment inventory.

There is no deployment history behind it: a function has one record, and
publishing replaces it. The 7-day rollup is deliberately absent here, because
this read is about what is deployed rather than about how it has performed.

## Request

`GET /v1/function/deployments` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | function.fnList | ok      |
| `default` | problem-details | refused |

`200` body — 17 fields.

| Field                        | In   | Type                     | Always | Description                                                           |
| ---------------------------- | ---- | ------------------------ | ------ | --------------------------------------------------------------------- |
| `functions`                  | body | function.functionView\[] | —      | Functions is one row per published function.                          |
| `functions[].avgDurationMs`  | body | number (double)          | —      | mean wall-clock of those runs                                         |
| `functions[].createdAt`      | body | string                   | —      | when it was first published                                           |
| `functions[].endpoint`       | body | string                   | —      | the path that invokes it                                              |
| `functions[].envCount`       | body | integer (int64)          | —      | how many secret NAMES it mounts; values are never carried             |
| `functions[].environment`    | body | string                   | —      | the language it runs under                                            |
| `functions[].errors7d`       | body | integer (int64)          | —      | how many of those runs failed                                         |
| `functions[].image`          | body | string                   | —      | the prebuilt image it runs, when it runs one instead of source        |
| `functions[].invocations7d`  | body | integer (int64)          | —      | runs in the last 7 days; ABSENT, never 0, when it has not run         |
| `functions[].lastDeployedAt` | body | string                   | —      | when its code last changed                                            |
| `functions[].memoryLimit`    | body | string                   | —      | the memory it runs with, and the multiplier on its compute charge     |
| `functions[].name`           | body | string                   | —      | the function's org-unique handle                                      |
| `functions[].namespace`      | body | string                   | —      | the display group it belongs to; the org is the isolation key         |
| `functions[].status`         | body | string                   | —      | whether it is ready to serve                                          |
| `functions[].successRate`    | body | number (double)          | —      | share of those runs that succeeded, 0..1                              |
| `functions[].target`         | body | string                   | —      | where it runs: empty for the sandbox, "fleet" for the org's GPU fleet |
| `functions[].timeoutSec`     | body | integer (int64)          | —      | its per-invocation deadline                                           |

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

## Examples

**CLI**

```bash
hanzo function deployments
```

**SDK**

**.ts**

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

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

**.py**

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

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = FunctionApi(client).get_function_deployments()
```

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new FunctionApi(client).getFunctionDeployments();
```

**HTTP**

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

**MCP**

MCP reaches **function** through the `function` tool, which names its 10 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_functions"
         }
       }
     }'
```

---

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