<span id="查询目标消息接收连接"></span>

# List target ingress connections

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

List ingress connections for a target.

```text
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/ingress-connections
```

<span id="调用前准备"></span>

## Before you call this API

Prepare a personal access token with access to the target workspace and the required action privileges. The path workspace must match X-Workspace-ID. Examples use jq. See [Common information](objects.md) for variables, objects, and states.

<span id="查询参数"></span>

## Query parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl -X GET "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/ingress-connections" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --get \
  --data-urlencode "target_kind=agent" \
  --data-urlencode "target_workspace_id=$AGENT_WORKSPACE_ID" \
  --data-urlencode "target_id=$AGENT_ID"
```

:::::
:::::{tab-item} Parameters

Supply all three target parameters together. This operation is not paginated; total equals the number of items returned. Do not apply the limit/offset template from other resource lists.

| Fields | Type | Required | Description |
| --- | --- | --- | --- |
| `target_kind` | string | Yes | agent or team. |
| `target_workspace_id` | string | Yes | Workspace that owns the target. |
| `target_id` | string | Yes | Target ID. |

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

<span id="成功响应"></span>

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": 0,
  "data": {
    "items": [],
    "total": 0
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | 0 on success. |
| `data` | object | Result object; see common object descriptions for fields. |

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

<span id="错误响应"></span>

## Error response

Handle HTTP status, business results, and error fields as described in [Errors and environments](objects.md#错误与环境). Read current state on source or version conflicts; do not automatically retry with a different identity, resource, or request ID.
