---

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

orphan: true
---

# 查询智能体工作流绑定列表

查询工作区中将工作流节点关联到智能体任务模板的绑定。

```text
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/agent-workflow-bindings
```

## 调用前准备

准备个人访问令牌和目标工作区 ID。

## 请求参数

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} 调用示例

```bash
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/agent-workflow-bindings?limit=20&offset=0" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} 参数说明

### 查询参数

| 参数 | 类型 | 是否必填 | 说明 |
| --- | --- | --- | --- |
| `workflow_id` | string | 否 | 工作流 ID。 |
| `workflow_version_id` | string | 否 | 工作流版本 ID。 |
| `node_id` | string | 否 | 工作流节点 ID。 |
| `agent_task_template_id` | string | 否 | 智能体任务模板 ID。 |
| `status` | string | 否 | 绑定状态。 |
| `limit` | integer | 否 | 返回数量。 |
| `offset` | integer | 否 | 返回起始位置。 |

:::::
::::::
:::::::

## 成功响应

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} 响应示例

```json
{"code": 0, "data": {"items": [{"id": "binding_01", "workflow_id": "wf_01", "node_id": "node_01", "agent_task_template_id": "template_01"}], "total": 1, "limit": 20, "offset": 0}}
```

:::::
:::::{tab-item} 字段说明

成功时返回 `200` 和当前页的绑定。



响应字段如下。

本文中，字段路径中的 `[]` 表示数组中的每一项。例如，`items[].name` 表示 `items` 数组中每一项的 `name` 字段。

::::{tab-set}
:::{tab-item} 通用字段

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `code` | integer | 成功时为 `0`。 |

:::

:::{tab-item} 基本信息

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `items` | array | 当前页的绑定。 |
| `total` | integer | 匹配总数。 |

:::

:::{tab-item} 列表项

下面表格展开响应示例中的 `items` 数据；每一行是该对象或数组项的一个字段。

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `id` | string | 绑定 ID。 |
| `workflow_id` | string | 工作流 ID。 |
| `node_id` | string | 节点 ID。 |
| `agent_task_template_id` | string | 关联模板 ID。 |

:::
::::

:::::
::::::
:::::::

## 错误响应

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} 响应示例

```json
{"code": 2, "message": "invalid workflow binding filter"}
```

:::::
:::::{tab-item} 字段说明

### 常见 HTTP 错误

::::{tab-set}
:::{tab-item} 通用字段

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `400` | `2` | **常见原因：**查询参数无效。**建议操作：**检查筛选条件。 |

:::
::::

:::::
::::::
:::::::
