Table and view list
List tables and views under the specified namespace, one page at a time.
POST /api/open/v1/metadata/listTables
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| dataSourceId | Integer | Yes | DataSource ID. |
| namespacePath | Array of strings | Yes | Full path to the target namespace. See listNamespaces. |
| pageNumber | Integer | Yes | Page number, starting at 1. |
| pageSize | Integer | Yes | Number of records per page, from 1 to 100. |
| objectType | String | No | TABLE (table), VIEW (view). Omit this field to return both types. |
Response fields
| Fields in data | Type | Description |
|---|---|---|
| items | Array of objects | Records on the current page. |
| items[].tableName | String | Table or view name. |
| items[].objectType | String | TABLE (table), VIEW (view). |
| items[].comment | String or null | Comment. |
| total | Integer | Total number of visible records matching the filters. |
Request example (PostgreSQL)
{
"dataSourceId": 43,
"namespacePath": ["sales", "public"],
"pageNumber": 1,
"pageSize": 20
}
Response example
{
"requestId": "0905a68e-9a91-44b0-a0ca-f4c591b8b917",
"code": "OK",
"msg": "Request succeeded.",
"data": {
"items": [
{
"tableName": "orders",
"objectType": "TABLE",
"comment": "Orders table"
}
],
"total": 1
}
}