---
orphan: true
---

# Query the connection list

Query the agent connections saved in the current workspace.

```text
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/connections
```

## Before you call

The example below uses `$AI_STUDIO_API_KEY` and `$WORKSPACE_ID`.

## Request example

```bash
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/connections" -H "X-API-Key: $AI_STUDIO_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"
```

## Successful response

Returns `200` and the connection list on success.

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

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `data.items` | array | Current page connection. |
| `data.total` | integer | The total number of matches. |

## Error response

```json
{"code":6,"message":"unauthenticated"}
```
