接口地址:/webapi/db/discovery
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
探寻DB
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| requestId | 请求requestId数据 | query | true | string | |
| clientId | 请求clientId数据 | query | true | integer(int64) | |
| agentType | 请求agentType数据 | query | true | integer(int32) | |
| instanceId | 请求instanceId数据 | query | true | integer(int64) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | ResponseResultListDatabaseInstanceVo |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| message | 返回状态标记 | string | |
| statFlag | 返回状态 | integer(int32) | integer(int32) |
| dataInfo | 返回的数据 | array | DatabaseInstanceVo |
| agentType | 代理类型 | integer(int32) | |
| agentName | 代理类型 | string | |
| backupMethod | 用户启用XtraBackup则1 | 否则=2 | integer(int32) |
| backupObjectSets | 备份集数组 | array | DatabaseInstanceBackupObjectDto |
| backupAgentId | 备份代理ID | integer(int32) | |
| backupObjectSetId | 备份集ID | integer(int64) | |
| backupObjectSetName | 备份集名称 | string | |
| clientId | 客户端Id | integer(int64) | |
| containerGroupId | 容器组ID | integer(int32) | |
| containerGroupName | 容器组名称 | string | |
| instanceId | 实例ID | integer(int64) | |
| instanceName | 实例名称 | string | |
| flags | flags | integer(int32) | |
| isDeleteBinLog | 是否删除binlog | integer(int32) | |
| path | 备份集内容集合 | array | string |
| streamCount | 流大小 | integer(int32) | |
| lastBackupJobId | 最后备份JobId | integer(int64) | |
| lastBackupTime | 最后备份时间 | integer(int64) | |
| lastBackupSize | 最后备份大小 | integer(int64) | |
| name | 属性名称 | string | |
| backupSize | 备份大小 | integer(int64) | |
| binDirectory | mysql二进制目录(mysql可执行文件的父目录) | string | |
| libDirectory | string | ||
| archiveDirectory | string | ||
| port | string | ||
| maintenanceDB | string | ||
| clientId | 客户端ID | integer(int64) | |
| clientName | 客户端名称 | string | |
| configFile | 配置文件全路径 | string | |
| dbUserName | 数据库用户名 | string | |
| dbPassword | 数据库密码 | string | |
| dbs | 数据库备份集列表 | array | BackupDatabaseDto |
| backupObjectSetId | 备份集ID | integer(int64) | |
| backupObjectSetName | 备份集名称 | string | |
| name | 数据库名 | string | |
| entityId | 数据库ID | integer(int64) | |
| filePath | 文件路径 | string | |
| status | 数据库状态 | integer(int32) | |
| uuid | 数据库UUID | integer(int64) | |
| instanceId | 实例ID | integer(int64) | |
| instanceName | 实例名 | string | |
| instanceUUID | 实例UUID | string | |
| isBackupEnable | 是否启动备份 | integer(int32) | |
| isDeleteBinlog | 是否删除Binlog | integer(int32) | |
| isRestoreEnable | 是否启动恢复 | integer(int32) | |
| lastBackupJobId | 最后备份JobId | integer(int64) | |
| lastBackupTime | 最后备份时间 | integer(int64) | |
| logDirectory | 日志路径 | string | |
| logPlan | 日志计划 | string | |
| nextLogId | 下个binlogId | string | |
| osUserName | 系统用户名 | string | |
| tableSpaceInfo | mysql账号密码 | array | object |
| socketFile | socket路径 | string | |
| status | 状态 | integer(int32) | |
| version | 数据库版本 | string | |
| accessNodes | 集群访问列表 | array | integer(int64) |
| accessNodeInfo | 集群访问节点详细信息 | array | ClientInfoDto |
| clientId | 客户端ID | integer(int32) | |
| guid | 客户端UUID | string | |
| clientName | 客户端名称 | string | |
| status | 客户端状态 | integer(int32) | |
| clientIp | 客户端IP | string | |
| description | 描述 | string | |
| clientCacheFolder | 缓存文件夹 | string | |
| installFolder | 安装目录 | string | |
| csdPort | CSD端口 | integer(int32) | |
| osId | 操作系统ID | integer(int32) | |
| releaseId | 版本ID | integer(int32) | |
| releaseName | 版本名称 | string | |
| updateStatus | 更新状态 | integer(int32) | |
| enableBackup | 启动备份 | integer(int32) | |
| enableRecover | 启动恢复 | integer(int32) | |
| maxConcurrentStream | 最大并发流数 | integer(int32) | |
| flags | 客户端压缩、去重标识 | integer(int32) | |
| agentList | 客户端代理类型列表 | array | integer |
| nodeJson | 节点Json | string | |
| accessNodes | 访问节点 | array | integer |
| dbIp | 访问节点的dbIp | string | |
| agentInfo | 访问节点的agentInfo | array | string |
| mgnodeInfo | 访问节点的mgnodeInfo | array | string |
| agentInfoJson | array | JSONObject | |
| empty | boolean | ||
| backupName | 备份服务名称 | string | |
| backupPort | 备份服务端口 | string | |
| restoreName | 恢复服务名称 | string | |
| restorePort | 恢复服务端口 | string | |
| instanceType | integer(int32) | ||
| xtrabackupPluginPath | string | ||
| dataNodeInfo | array | object | |
| clusterId | integer(int32) | ||
| ipinfo | string | ||
| dbname | string | ||
| oracleHomePath | string | ||
| inifilePath | string | ||
| dmhomePath | string | ||
| xtracbackupBinDirectory | xTra路径 | string | |
| dataCount | 返回数据条数 | integer(int32) | integer(int32) |
响应示例:
{
"message": "操作成功",
"statFlag": 0,
"dataInfo": [
{
"agentType": 0,
"agentName": "",
"backupMethod": 0,
"backupObjectSets": [
{
"backupAgentId": 0,
"backupObjectSetId": 0,
"backupObjectSetName": "",
"clientId": 0,
"containerGroupId": 0,
"containerGroupName": "",
"instanceId": 0,
"instanceName": "",
"flags": 0,
"isDeleteBinLog": 0,
"path": [],
"streamCount": 0,
"lastBackupJobId": 0,
"lastBackupTime": 0,
"lastBackupSize": 0,
"name": ""
}
],
"backupSize": 0,
"binDirectory": "",
"libDirectory": "",
"archiveDirectory": "",
"port": "",
"maintenanceDB": "",
"clientId": 0,
"clientName": "",
"configFile": "",
"dbUserName": "",
"dbPassword": "",
"dbs": [
{
"backupObjectSetId": 0,
"backupObjectSetName": "",
"name": "",
"entityId": 0,
"filePath": "",
"status": 0,
"uuid": 0
}
],
"instanceId": 0,
"instanceName": "",
"instanceUUID": "",
"isBackupEnable": 0,
"isDeleteBinlog": 0,
"isRestoreEnable": 0,
"lastBackupJobId": 0,
"lastBackupTime": 0,
"logDirectory": "",
"logPlan": "",
"nextLogId": "",
"osUserName": "",
"tableSpaceInfo": [],
"socketFile": "",
"status": 0,
"version": "",
"accessNodes": [],
"accessNodeInfo": [
{
"clientId": 0,
"guid": "",
"clientName": "",
"status": 0,
"clientIp": "",
"description": "",
"clientCacheFolder": "",
"installFolder": "",
"csdPort": 0,
"osId": 0,
"releaseId": 0,
"releaseName": "",
"updateStatus": 0,
"enableBackup": 0,
"enableRecover": 0,
"maxConcurrentStream": 0,
"flags": 0,
"agentList": [],
"nodeJson": "",
"accessNodes": [],
"dbIp": "",
"agentInfo": [],
"mgnodeInfo": [],
"agentInfoJson": [
{
"empty": true
}
]
}
],
"backupName": "",
"backupPort": "",
"restoreName": "",
"restorePort": "",
"instanceType": 0,
"xtrabackupPluginPath": "",
"dataNodeInfo": [],
"clusterId": 0,
"ipinfo": "",
"dbname": "",
"oracleHomePath": "",
"inifilePath": "",
"dmhomePath": "",
"xtracbackupBinDirectory": ""
}
],
"dataCount": 10
}