Skip to main content

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​

ParameterTypeRequiredDescription
dataSourceIdIntegerYesDataSource ID.
namespacePathArray of stringsYesFull path to the target namespace. See listNamespaces.
pageNumberIntegerYesPage number, starting at 1.
pageSizeIntegerYesNumber of records per page, from 1 to 100.
objectTypeStringNoTABLE (table), VIEW (view). Omit this field to return both types.

Response fields​

Fields in dataTypeDescription
itemsArray of objectsRecords on the current page.
items[].tableNameStringTable or view name.
items[].objectTypeStringTABLE (table), VIEW (view).
items[].commentString or nullComment.
totalIntegerTotal 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
}
}