> ## 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/workspaces/{workspaceId}/db-datasources/{datasourceId}/tables
```

列出这个数据源所覆盖 schema 中的数据表，以及每张表的注释。一次响应即返回完整列表。把表名传给[列出字段](https://docs.memorylake.cn/features/memorylake/api-reference/database/datasources/list-columns.md)即可查看它的字段；如需修改注释，请调用[编辑 Schema 元数据](https://docs.memorylake.cn/features/memorylake/api-reference/database/datasources/edit-schema-metadata.md)。

> [!NOTE]
>
> **所需权限：** `db_datasource:read`

### 路径参数

**workspaceId** `string` *required*

工作空间 ID

**datasourceId** `string` *required*

数据源 ID

### 查询参数

**name\_fuzzy** `string`

只返回名称包含该文本的数据表（不区分大小写）

```bash cURL theme={null}
curl -X GET 'https://app.memorylake.cn/openapi/memorylake/api/v3/workspaces/ws-8001856949ad4f6a5b6226f415ffa877/db-datasources/dbds-4b8e2f6a1c9d4e7b8a3f5c2d6e9b1a7c/tables' \
  -H 'Authorization: Bearer sk_xxxxxx'
```

### 响应

**data** `object`

**数据表列表**

**items** `array`

数据表对象数组

**数据表对象**

**comment** `string`

描述这张表内容的注释。未设置时为空。

**schema\_name** `string`

数据表所属的 schema

**table\_name** `string`

表名

**table\_type** `string`

数据库报告的关系类型，例如 `table`

```json Success (200) theme={null}
{
  "success": true,
  "data": {
    "items": [
      {
        "comment": "Registered customers",
        "schema_name": "sales",
        "table_name": "customers",
        "table_type": "table"
      },
      {
        "comment": "One row per customer order",
        "schema_name": "sales",
        "table_name": "orders",
        "table_type": "table"
      }
    ]
  }
}
```


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