<span id="查询工作区表概览"></span>

# Get workspace table overviews

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

List readable registered tables and physical column names in the current workspace.

```text
POST https://api.moi.matrixorigin.cn/v5/table/overview
```

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

## Before you call this API

`BASE_URL` uses the product API prefix `https://api.moi.matrixorigin.cn/v5`. For a dedicated deployment, use its corresponding product API address.

Prepare a personal access token with regular workspace access and a workspace ID. Actual table reads also follow actor/shared-read binding constraints. `BASE_URL` includes the same environment's product prefix. `MOI_KEY` and `WORKSPACE_ID` are product credentials and workspace ID. Example IDs/data are placeholders.

<span id="请求体"></span>

## Request body

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

```bash
curl --fail-with-body -sS -X POST "$BASE_URL/table/overview" \
  -H "X-API-Key: $MOI_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{}'
```

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

No business request parameters.

No business request fields are needed. File-only directories without registered tables may be skipped; a missing expected physical table may fail the request.

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

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

## Successful response

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

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "tables": [
      {
        "db_name": "sales",
        "table_name": "orders",
        "col_names": [
          "id",
          "amount"
        ]
      }
    ]
  }
}
```

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

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | OK on success. |
| `msg` | string | OK on success. |
| `data.tables` | object[] (array of objects) or null | Table overview collection; may be null without results. |
| `data.tables[].db_name` | string | Database name. |
| `data.tables[].table_name` | string | Table name. |
| `data.tables[].col_names` | string[] (array of strings) | Physical column names; empty values may be null. |

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

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

## Error response

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

```json
{
  "code": "ErrWorkspaceRequired",
  "msg": "示例错误信息"
}
```

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

| HTTP | code | Condition |
| --- | --- | --- |
| 400 | ErrWorkspaceRequired | Missing exactly one nonempty X-Workspace-ID. |
| 404 | ErrNotFound | Metadata association or expected physical table missing. |

Use actual returned code, msg, and diagnostic fields for identity, permission, and dependency failures. Error text may vary by language.

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