获取数据库中所有表-ListCatalogTables

获取用户指定的数据库中的所有表名称

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID,不填则为默认项目No
DatabaseNamestring数据库名称Yes

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
Requeststring请求IDNo
TotalCountint数据表总数No
Tablesarray该数据库中数据表的集合No

Tables

Parameter nameTypeDescriptionRequired
Namesstring数据表名称Yes
Columnsarray数据表的所有列Yes

Column

Parameter nameTypeDescriptionRequired
Namestring列名称Yes
Typestring列的数据类型Yes

Request Example

https://api.ucloud.cn/?Action=ListCatalogTables
&Region=cn-bj
&Database=default
&ProjectId=oPcVYRZv

Response Example

{
    "RetCode": 0,
    "Action": "ListCatalogTablesResponse",
    "Request": "2bb5dd25-650b-4836-a7fa-0ca2e84ba2e8",
    "TotalCount": 4,
    "Tables": [
        {
            "Name": "nation",
            "Columns": [
                {
                    "Name": "n_nationkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_name",
                    "Type": "string"
                },
                {
                    "Name": "n_regionkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_comment",
                    "Type": "string"
                }
            ]
        },
        {
            "Name": "nation2",
            "Columns": [
                {
                    "Name": "n_nationkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_name",
                    "Type": "string"
                },
                {
                    "Name": "n_regionkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_comment",
                    "Type": "string"
                }
            ]
        },
        {
            "Name": "nation3",
            "Columns": [
                {
                    "Name": "n_nationkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_name",
                    "Type": "string"
                },
                {
                    "Name": "n_regionkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_comment",
                    "Type": "string"
                }
            ]
        },
        {
            "Name": "nation4",
            "Columns": [
                {
                    "Name": "n_nationkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_name",
                    "Type": "string"
                },
                {
                    "Name": "n_regionkey",
                    "Type": "bigint"
                },
                {
                    "Name": "n_comment",
                    "Type": "string"
                }
            ]
        }
    ]
}