# Update steps

URL: https://docs.hanzo.ai/docs/openapi/o11y/updatetracefunnelsteps

> Replaces a funnel's steps — the funnel is named in the body rather than the path — and answers the funnel as it now stands.

`PUT /v1/o11y/trace-funnels/steps/update`

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

|               |                                                           |
| ------------- | --------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/o11y/trace-funnels/steps/update` |
| **Method**    | `PUT`                                                     |
| **Operation** | `UpdateTraceFunnelSteps`                                  |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                    |

Replaces a funnel's steps — the funnel is named in the body
rather than the path — and answers the funnel as it now stands. A name or
description sent alongside is applied too; an empty one leaves it as it was.

Callers need the editor role; the runtime's own gate enforces it.

## Request

25 fields, body `application/json` (required).

| Field                                  | In   | Type               | Required | Description                                                    |
| -------------------------------------- | ---- | ------------------ | -------- | -------------------------------------------------------------- |
| `description`                          | body | string             | —        | Description replaces the funnel's description.                 |
| `funnel_id`                            | body | string             | —        | FunnelID is the funnel to update.                              |
| `funnel_name`                          | body | string             | —        | Name replaces the funnel's name.                               |
| `steps`                                | body | o11y.FunnelStep\[] | —        | Steps are the funnel's steps, in order.                        |
| `steps[].description`                  | body | string             | —        | step description                                               |
| `steps[].filters`                      | body | o11y.FilterSet     | —        |                                                                |
| `steps[].filters.items`                | body | o11y.FilterItem\[] | —        |                                                                |
| `steps[].filters.items[].key`          | body | o11y.AttributeKey  | —        |                                                                |
| `steps[].filters.items[].key.dataType` | body | string             | —        |                                                                |
| `steps[].filters.items[].key.isColumn` | body | boolean            | —        |                                                                |
| `steps[].filters.items[].key.isJSON`   | body | boolean            | —        |                                                                |
| `steps[].filters.items[].key.key`      | body | string             | —        |                                                                |
| `steps[].filters.items[].key.type`     | body | string             | —        |                                                                |
| `steps[].filters.items[].op`           | body | string             | —        |                                                                |
| `steps[].filters.items[].value`        | body | any                | —        |                                                                |
| `steps[].filters.op`                   | body | string             | —        |                                                                |
| `steps[].has_errors`                   | body | boolean            | —        |                                                                |
| `steps[].id`                           | body | any                | —        |                                                                |
| `steps[].latency_pointer`              | body | string             | —        |                                                                |
| `steps[].latency_type`                 | body | string             | —        |                                                                |
| `steps[].name`                         | body | string             | —        | step name                                                      |
| `steps[].service_name`                 | body | string             | —        |                                                                |
| `steps[].span_name`                    | body | string             | —        |                                                                |
| `steps[].step_order`                   | body | integer (int64)    | —        |                                                                |
| `timestamp`                            | body | integer (int64)    | —        | Timestamp is when the change was made, as a millisecond epoch. |

## Response

| Status    | Body               | Meaning           |
| --------- | ------------------ | ----------------- |
| `200`     | o11y.O11yFunnelOut | ok                |
| `202`     | Approval           | held for approval |
| `default` | problem-details    | refused           |

`200` body — 72 fields.

| Field                                              | In   | Type                | Always | Description          |
| -------------------------------------------------- | ---- | ------------------- | ------ | -------------------- |
| `data`                                             | body | o11y.GettableFunnel | —      |                      |
| `data.created_at`                                  | body | integer (int64)     | —      |                      |
| `data.created_by`                                  | body | string              | —      |                      |
| `data.description`                                 | body | string              | —      |                      |
| `data.funnel`                                      | body | o11y.StorableFunnel | —      |                      |
| `data.funnel.createdAt`                            | body | string (date-time)  | —      |                      |
| `data.funnel.createdBy`                            | body | string              | —      |                      |
| `data.funnel.description`                          | body | string              | —      |                      |
| `data.funnel.funnel_name`                          | body | string              | —      |                      |
| `data.funnel.id`                                   | body | any                 | —      |                      |
| `data.funnel.org_id`                               | body | any                 | —      |                      |
| `data.funnel.steps`                                | body | o11y.FunnelStep\[]  | —      |                      |
| `data.funnel.steps[].description`                  | body | string              | —      | step description     |
| `data.funnel.steps[].filters`                      | body | o11y.FilterSet      | —      |                      |
| `data.funnel.steps[].filters.items`                | body | o11y.FilterItem\[]  | —      |                      |
| `data.funnel.steps[].filters.items[].key`          | body | o11y.AttributeKey   | —      |                      |
| `data.funnel.steps[].filters.items[].key.dataType` | body | string              | —      |                      |
| `data.funnel.steps[].filters.items[].key.isColumn` | body | boolean             | —      |                      |
| `data.funnel.steps[].filters.items[].key.isJSON`   | body | boolean             | —      |                      |
| `data.funnel.steps[].filters.items[].key.key`      | body | string              | —      |                      |
| `data.funnel.steps[].filters.items[].key.type`     | body | string              | —      |                      |
| `data.funnel.steps[].filters.items[].op`           | body | string              | —      |                      |
| `data.funnel.steps[].filters.items[].value`        | body | any                 | —      |                      |
| `data.funnel.steps[].filters.op`                   | body | string              | —      |                      |
| `data.funnel.steps[].has_errors`                   | body | boolean             | —      |                      |
| `data.funnel.steps[].id`                           | body | any                 | —      |                      |
| `data.funnel.steps[].latency_pointer`              | body | string              | —      |                      |
| `data.funnel.steps[].latency_type`                 | body | string              | —      |                      |
| `data.funnel.steps[].name`                         | body | string              | —      | step name            |
| `data.funnel.steps[].service_name`                 | body | string              | —      |                      |
| `data.funnel.steps[].span_name`                    | body | string              | —      |                      |
| `data.funnel.steps[].step_order`                   | body | integer (int64)     | —      |                      |
| `data.funnel.tags`                                 | body | string              | —      |                      |
| `data.funnel.updatedAt`                            | body | string (date-time)  | —      |                      |
| `data.funnel.updatedBy`                            | body | string              | —      |                      |
| `data.funnel.user`                                 | body | o11y.User           | —      |                      |
| `data.funnel.user.createdAt`                       | body | string (date-time)  | —      |                      |
| `data.funnel.user.displayName`                     | body | string              | —      |                      |
| `data.funnel.user.email`                           | body | any                 | —      |                      |
| `data.funnel.user.id`                              | body | any                 | —      |                      |
| `data.funnel.user.isRoot`                          | body | boolean             | —      |                      |
| `data.funnel.user.orgId`                           | body | any                 | —      |                      |
| `data.funnel.user.status`                          | body | any                 | —      |                      |
| `data.funnel.user.updatedAt`                       | body | string (date-time)  | —      |                      |
| `data.funnel_id`                                   | body | string              | —      |                      |
| `data.funnel_name`                                 | body | string              | —      |                      |
| `data.org_id`                                      | body | string              | —      |                      |
| `data.steps`                                       | body | o11y.FunnelStep\[]  | —      |                      |
| `data.steps[].description`                         | body | string              | —      | step description     |
| `data.steps[].filters`                             | body | o11y.FilterSet      | —      |                      |
| `data.steps[].filters.items`                       | body | o11y.FilterItem\[]  | —      |                      |
| `data.steps[].filters.items[].key`                 | body | o11y.AttributeKey   | —      |                      |
| `data.steps[].filters.items[].key.dataType`        | body | string              | —      |                      |
| `data.steps[].filters.items[].key.isColumn`        | body | boolean             | —      |                      |
| `data.steps[].filters.items[].key.isJSON`          | body | boolean             | —      |                      |
| `data.steps[].filters.items[].key.key`             | body | string              | —      |                      |
| `data.steps[].filters.items[].key.type`            | body | string              | —      |                      |
| `data.steps[].filters.items[].op`                  | body | string              | —      |                      |
| `data.steps[].filters.items[].value`               | body | any                 | —      |                      |
| `data.steps[].filters.op`                          | body | string              | —      |                      |
| `data.steps[].has_errors`                          | body | boolean             | —      |                      |
| `data.steps[].id`                                  | body | any                 | —      |                      |
| `data.steps[].latency_pointer`                     | body | string              | —      |                      |
| `data.steps[].latency_type`                        | body | string              | —      |                      |
| `data.steps[].name`                                | body | string              | —      | step name            |
| `data.steps[].service_name`                        | body | string              | —      |                      |
| `data.steps[].span_name`                           | body | string              | —      |                      |
| `data.steps[].step_order`                          | body | integer (int64)     | —      |                      |
| `data.updated_at`                                  | body | integer (int64)     | —      |                      |
| `data.updated_by`                                  | body | string              | —      |                      |
| `data.user_email`                                  | body | string              | —      |                      |
| `status`                                           | body | string              | —      | Status is "success". |

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

## Examples

**CLI**

```bash
hanzo o11y trace-funnels steps update
```

**SDK**

**.ts**

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

const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.updateTraceFunnelSteps({ description: "<description>", funnel_id: "<funnel_id>" });
```

**.py**

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

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).update_trace_funnel_steps(description="<description>", funnel_id="<funnel_id>")
```

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new O11yApi(client).updateTraceFunnelSteps();
```

**HTTP**

```bash
curl -X PUT https://api.hanzo.ai/v1/o11y/trace-funnels/steps/update \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "description": "<description>",
       "funnel_id": "<funnel_id>"
     }'
```

**MCP**

Tool `o11y`, op `UpdateTraceFunnelSteps` — 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": "o11y",
         "arguments": {
           "op": "UpdateTraceFunnelSteps",
           "input": {
             "description": "<description>",
             "funnel_id": "<funnel_id>"
           }
         }
       }
     }'
```

---

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