Skip to main content

资产中心列表

数据库资源列表

接口描述
  • 通过该接口获取系统中所有纳管的数据库资源
请求URL
  • http://host/bbm/v2/adapter/all/instance
请求方式
  • ==GET==
header 请求头参数
参数名必选类型说明示例值及参考API
content-typestringapplication/json
Authorizationstring签名描述Bearer + 登录token
请求示例
http://host/bbm/v2/adapter/all/instance

请求参数示例

返回参数说明

  • http_status && status_code 为200 为成功
  • 否则均为失败或者异常
字段字段示例字段说明是否必填
id1主键id
system_codee11d134c-1d35-4585-9708-c060d1d88194唯一标识符
db_typeoceanbase数据库类型 (oracle/mysql/postgresql/oceanbase....)
node_typemysql子类型 例如oceanbase数据库下 分为 oracle与mysql类型
name纳管资源名称名称 唯一名称
db_nametestdh数据库连接的默认db
db_username----连接数据库用户
ip192.168.5.11数据库连接地址
port2883数据库连接端口
connect_as连接角色db_type为oracle需要提供(normal/sysdba/sysoper),其他类型为空
env环境dev/sit/uat/pet/sim/pro
slasla等级A/B/C/D
sceneTP业务类型TP/AP
monitor_template_id1监控模版id
redis_typeredis类型single/cluster
redis_cluster_info集群模式下的节点 查看redis示例
返回示例
{
"status_code": 200,
"code": "",
"message": "",
"detail": "",
"alert": "",
"to_wiki": "",
"data": [
{
"id": 3200,//表示id
"system_code": "特殊符号ob-mysql", //资源标识符
"db_type": "oceanbase", //数据库类型
"node_type": "mysql", //子类型 例如oceanbase数据库下 分为 oracle与mysql类型
"name": "ob-mysql-gbk-testdh", //纳管资源名称
"db_name": "testdh", //数据库连接的默认db
"db_username": "abcde@mysqlt#obcluster",
"ip": "192.168.5.11", //连接ip
"port": 2883,
"connect_as": "", //连接角色 db_type 为oracle需要提供
"env": "SIT",
"sla": "A",
"instance_status": "ON",
"scene": "TP",
"monitor_template_id": 41,//监控模版id
"redis_type": "",//redis类型 集群or单机
"redis_cluster_info": [] //集群模式下的节点 查看redis示例
},
{
"id": 3239,
"system_code": "5266fc78-8710-4234-84aa-459e19b14977",
"db_type": "oracle",
"node_type": "",
"name": "zfqoracle",
"db_name": "orcl",
"db_username": "system",
"ip": "192.168.0.241",
"port": 1521,
"connect_as": "normal",
"env": "SIT",
"sla": "C",
"instance_status": "ON",
"scene": "TP",
"monitor_template_id": 27,
"redis_type": "",
"redis_cluster_info": []
},
{
"id": 3273,
"system_code": "e11d134c-1d35-4585-9708-c060d1d88194",
"db_type": "redis",
"node_type": "",
"name": "redis-178",
"db_name": "",
"db_username": "monitor",
"ip": "192.168.5.178",
"port": 7000,
"connect_as": "normal",
"env": "PROD",
"sla": "C",
"instance_status": "ON",
"scene": "TP",
"monitor_template_id": 49,
"redis_type": "cluster",
"redis_cluster_info": [
{
"ip": "192.168.5.178",
"port": 7000
},
{
"ip": "192.168.5.178",
"port": 7001
},
{
"ip": "192.168.2.29",
"port": 7000
},
{
"ip": "192.168.2.29",
"port": 7001
},
{
"ip": "192.168.1.182",
"port": 7000
},
{
"ip": "192.168.1.182",
"port": 7001
}
]
}
]
}