> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出数据库连接

> 返回您能打开的数据库连接的分页列表

```
GET /openapi/memorylake/api/v3/db-connections
```

返回团队中您能打开的数据库连接。您可以按名称筛选，并使用延续令牌翻页。

> [!NOTE]
>
> **所需权限：** `dbconn:read` —— 您打不开的连接不会出现在列表里，列表本身不会被拒绝

### 查询参数

**name\_fuzzy** `string`

只返回名称包含该文本的连接（不区分大小写）

**page\_size** `integer` (default: 20)

每页返回的连接数量，取值 1 到 100

**continuation\_token** `string`

上一次响应返回的令牌，用于获取下一页。请求第一页时不传。

```bash cURL theme={null}
curl -X GET 'https://app.memorylake.cn/openapi/memorylake/api/v3/db-connections?page_size=20' \
  -H 'Authorization: Bearer sk_xxxxxx'
```

### 响应

**data** `object`

**连接分页列表**

**items** `array`

连接对象数组

**连接对象**

**id** `string`

数据库连接标识符，请把它当作不透明字符串处理。

**name** `string`

显示名称

**description** `string`

自由格式的描述

**host** `string`

服务器主机名或地址

**port** `integer`

服务器端口

**username** `string`

连接用于认证的用户名

**database** `string`

要读取的数据库名

**custom\_id** `string`

您为这个连接设置的自定义标识符（如果设置过）

**datasource\_count** `integer`

当前通过这个连接读取数据的数据源数量

**created\_at** `string`

创建时间戳

**updated\_at** `string`

最后更新时间戳

**continuation\_token** `string`

用于获取下一页结果的令牌。最后一页不返回该字段。

**total** `integer`

所有页中符合条件的连接总数。当列表按您的权限逐行过滤时不返回该字段，此时请用 `continuation_token` 翻页。

```json Success (200) theme={null}
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "dbconn-7c1e9a4b2d6f4a8e9b3c5d7f1a2b4c6d",
        "name": "Sales warehouse",
        "description": "Read-only replica of the sales database",
        "host": "pg.internal.example.com",
        "port": 5432,
        "username": "analytics_ro",
        "database": "sales",
        "custom_id": "sales-warehouse",
        "datasource_count": 1,
        "created_at": "2026-09-18T07:42:17.139Z",
        "updated_at": "2026-09-18T07:42:17.139Z"
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.