获取数据湖元数据库列表,分页查询,可以根据数据库名称匹配

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

GET /api/metastore/catalogs/databases/list 

请求参数

名称 类型 位置 是否必选 示例值 描述
CatalogId String Query 1344371

数据库分类命名空间,默认填写主账号Uid

NamePattern String Query .*

数据库名称匹配的正则表达式,全部匹配则传入.*

NextPageToken String Query 2cb472ec1bf84f8d92f9c4baa0d21c19aa!

翻页token,由结果返回,如第一页可传入""

PageSize Integer Query 10

每页大小

RegionId String Host cn-hangzhou

系统所在的地域ID

返回数据

名称 类型 示例值 描述
Code String OK

状态描述

Databases Array of Database

元数据库列表

Message String .

提示相关错误信息

NextPageToken String 2cb472ec1bf84f8d92f9c4baa0d21c19aa

翻页token

RequestId String 558D764F-8C55-49CA-BF38-80EA532FC08F

请求ID

Success Boolean true

是否成功

Code错误码说明

InternalError:其他类型错误,请参考Message提示

示例

请求示例

GET /api/metastore/catalogs/databases/list HTTP/1.1 
 {
	"PageSize":"10",
	"NextPageToken":"2cb472ec1bf84f8d92f9c4baa0d21c19aa!",
	"NamePattern":".*",
	"RegionId":"cn-hangzhou",
	"CatalogId":"1344371"
}

正常返回示例

JSON 格式

{
  "Code": "OK",
  "Databases": [
    {
      "CatalogId": "1344371",
      "CreateTime": 1606226844,
      "Name": "111191eba2d14b7a935fb747a820db27abc",
      "OwnerName": "defaultOwnerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1606226844
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650860,
      "Name": "23b3a9884c28468193b6e2763ad6fbd6a0",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650860
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650859,
      "Name": "23b3a9884c28468193b6e2763ad6fbd6aa",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650859
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650859,
      "Name": "23b3a9884c28468193b6e2763ad6fbd6ab",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650859
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650860,
      "Name": "23b3a9884c28468193b6e2763ad6fbd6abc",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650860
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650859,
      "Name": "23b3a9884c28468193b6e2763ad6fbd6ac",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650859
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650864,
      "Name": "24ad12a646354fbb8b1b19bbe896e86faa",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650864
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597650864,
      "Name": "24ad12a646354fbb8b1b19bbe896e86fab",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597650864
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597652165,
      "Name": "2cb472ec1bf84f8d92f9c4baa0d21c19a0",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597652165
    },
    {
      "CatalogId": "1344371",
      "CreateTime": 1597652165,
      "Name": "2cb472ec1bf84f8d92f9c4baa0d21c19aa",
      "OwnerName": "default_ownerName",
      "OwnerType": "USER",
      "Parameters": {},
      "UpdateTime": 1597652165
    }
  ],
  "HttpStatusCode": 200,
  "Message": "",
  "NextPageToken": "2cb472ec1bf84f8d92f9c4baa0d21c19aa!",
  "RequestId": "558D764F-8C55-49CA-BF38-80EA532FC08F",
  "Success": true
}

错误码

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。