展示已有数据库。
接口说明
方法
GET
URI
/openapi/ha3/instances/{instanceId}/sql-studio/databases
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
searchengine:ListDatabases |
list |
*Instance
|
无 | 无 |
请求语法
GET /openapi/ha3/instances/{instanceId}/sql-studio/databases HTTP/1.1
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
instanceId |
string |
是 |
实例 id |
ha-cn-pl32rf0**** |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
requestId |
string |
请求 ID。 |
E45380E8-994A-5402-9806-F114B3295FCF |
result |
object |
返回结果。 |
|
databases |
array<object> |
数据库信息列表 |
|
object |
数据库信息列表 |
||
database |
string |
数据库名称 |
general |
sqlInstances |
array<object> |
sql 实例信息 |
|
object |
sql 实例信息 |
||
id |
integer |
主键 id |
12190 |
name |
string |
sql 实例名称 |
general |
type |
string |
table, instance, template, function |
instance |
parent |
integer |
父任务 id。 |
-1 |
children |
array |
子目录信息 |
|
any |
子目录信息 |
1 |
|
isDir |
integer |
是否为目录。取值:-true:是-false:否 |
true |
instanceId |
integer |
实例 id |
1 |
templateId |
integer |
模板 ID。 |
1 |
templates |
array<object> |
模板信息 |
|
object |
模版信息 |
||
id |
integer |
主键 id |
1 |
name |
string |
模版名称 |
c26_schema |
type |
string |
table, instance, template, function |
template |
parent |
integer |
父节点 id。 |
-1 |
children |
array |
子目录信息 |
|
any |
子目录信息 |
1 |
|
isDir |
integer |
是否为目录。取值:-true:是-false:否 |
true |
instanceId |
integer |
实例 id |
1 |
templateId |
integer |
模板 ID。 |
1 |
functions |
object |
函数信息。 |
|
array |
函数信息。 |
||
tables |
array<object> |
表信息。 |
|
object |
表信息。 |
||
id |
integer |
主键 id |
56 |
name |
string |
表名 |
general |
type |
string |
table, instance, template, function |
table |
parent |
integer |
父节点 id。 |
-1 |
children |
array |
子目录信息 |
|
any |
子目录信息 |
1 |
|
isDir |
integer |
是否为目录。取值:-true:是-false:否 |
true |
instanceId |
integer |
实例 ID |
1 |
templateId |
integer |
模板 ID。 |
1 |
示例
正常返回示例
JSON
格式
{
"requestId": "E45380E8-994A-5402-9806-F114B3295FCF",
"result": {
"databases": [
{
"database": "general",
"sqlInstances": [
{
"id": 12190,
"name": "general",
"type": "instance",
"parent": -1,
"children": [
"1"
],
"isDir": 0,
"instanceId": 1,
"templateId": 1
}
],
"templates": [
{
"id": 1,
"name": "c26_schema",
"type": "template",
"parent": -1,
"children": [
"1"
],
"isDir": 0,
"instanceId": 1,
"templateId": 1
}
],
"functions": {
"key": [
{
"name": "test",
"signatures": "gfasdds2****2wfrkv"
}
]
},
"tables": [
{
"id": 56,
"name": "general",
"type": "table",
"parent": -1,
"children": [
"1"
],
"isDir": 0,
"instanceId": 1,
"templateId": 1
}
]
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。