{ "swagger": "2.0", "info": { "description": "EM UI API", "title": "EM UI API", "contact": { "name": "zhangpeijin", "email": "zhangpeijin@pingcap.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "host": "localhost:4100", "basePath": "/api/v1/", "paths": { "/backups/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query backup records of a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster backup" ], "summary": "query backup records of a cluster", "parameters": [ { "type": "string", "name": "backupId", "in": "query" }, { "type": "string", "name": "clusterId", "in": "query" }, { "type": "integer", "name": "endTime", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "integer", "name": "startTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryBackupRecordsResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "backup", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster backup" ], "summary": "backup", "parameters": [ { "description": "backup request", "name": "backupReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.BackupClusterDataReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.BackupClusterDataResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/backups/cancel": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "cancel backup", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cancel cluster backup" ], "summary": "cancel backup", "parameters": [ { "description": "cancel backup request", "name": "backupReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.CancelBackupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.CancelBackupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/backups/{backupId}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete backup record", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster backup" ], "summary": "delete backup record", "parameters": [ { "type": "integer", "description": "backup record id", "name": "backupId", "in": "path", "required": true }, { "description": "backup delete request", "name": "backupDeleteReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.DeleteBackupDataReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.DeleteBackupDataResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/changefeeds/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query change feed tasks of a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "query change feed tasks of a cluster", "parameters": [ { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22", "name": "clusterId", "in": "query", "required": true }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/cluster.QueryChangeFeedTaskResp" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "create a change feed task", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "create a change feed task", "parameters": [ { "description": "change feed task request", "name": "changeFeedTask", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.CreateChangeFeedTaskReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.CreateChangeFeedTaskResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/changefeeds/{changeFeedTaskId}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete a change feed task", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "delete a change feed task", "parameters": [ { "type": "string", "description": "changeFeedTaskId", "name": "changeFeedTaskId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.DeleteChangeFeedTaskResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/changefeeds/{changeFeedTaskId}/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get change feed detail", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "get change feed detail", "parameters": [ { "type": "string", "description": "changeFeedTaskId", "name": "changeFeedTaskId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.DetailChangeFeedTaskResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/changefeeds/{changeFeedTaskId}/pause": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "pause a change feed task", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "pause a change feed task", "parameters": [ { "type": "string", "description": "changeFeedTaskId", "name": "changeFeedTaskId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.PauseChangeFeedTaskResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/changefeeds/{changeFeedTaskId}/resume": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "resume a change feed task", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "resume a change feed task", "parameters": [ { "type": "string", "description": "changeFeedTaskId", "name": "changeFeedTaskId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.ResumeChangeFeedTaskResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/changefeeds/{changeFeedTaskId}/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "resume a change feed", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "resume a change feed", "parameters": [ { "type": "string", "description": "changeFeedTaskId", "name": "changeFeedTaskId", "in": "path", "required": true }, { "description": "change feed task", "name": "task", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.UpdateChangeFeedTaskReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.UpdateChangeFeedTaskResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query clusters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "query clusters", "parameters": [ { "type": "string", "name": "clusterId", "in": "query" }, { "type": "string", "name": "clusterName", "in": "query" }, { "type": "string", "name": "clusterStatus", "in": "query" }, { "type": "string", "name": "clusterTag", "in": "query" }, { "type": "string", "name": "clusterType", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "create a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "create a cluster", "parameters": [ { "description": "create request", "name": "createReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.CreateClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.CreateClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/clone": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "clone a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "clone a cluster", "parameters": [ { "description": "clone cluster request", "name": "cloneClusterReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.CloneClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.CloneClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/export": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "export", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster export" ], "summary": "export data from tidb cluster", "parameters": [ { "description": "cluster info for data export", "name": "dataExport", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DataExportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DataExportResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/import": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "import", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster import" ], "summary": "import data to tidb cluster", "parameters": [ { "description": "cluster info for import data", "name": "dataImport", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DataImportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DataImportResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/preview": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "preview cluster topology and capability", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "preview cluster topology and capability", "parameters": [ { "description": "preview request", "name": "createReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.CreateClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.PreviewClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/restore": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "restore a new cluster by backup record", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "restore a new cluster by backup record", "parameters": [ { "description": "restore request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.RestoreNewClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.RestoreNewClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/switchover": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "master/slave switchover", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "switchover" ], "summary": "master/slave switchover", "parameters": [ { "description": "switchover request", "name": "masterSlaveClusterSwitchoverReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.MasterSlaveClusterSwitchoverReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.MasterSlaveClusterSwitchoverResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/takeover": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "takeover a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "takeover a cluster", "parameters": [ { "description": "takeover request", "name": "takeoverReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.TakeoverClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.TakeoverClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/transport": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query records of import and export", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster data transport" ], "summary": "query records of import and export", "parameters": [ { "type": "string", "name": "clusterId", "in": "query" }, { "type": "integer", "name": "endTime", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "boolean", "name": "reImport", "in": "query" }, { "type": "string", "name": "recordId", "in": "query" }, { "type": "integer", "name": "startTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryDataImportExportRecordsResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/transport/{recordId}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete data transport record", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster data transport" ], "summary": "delete data transport record", "parameters": [ { "type": "integer", "description": "data transport recordId", "name": "recordId", "in": "path", "required": true }, { "description": "data transport record delete request", "name": "DataTransportDeleteReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DeleteImportExportRecordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteImportExportRecordResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "show details of a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "show details of a cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryClusterDetailResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "delete cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true }, { "description": "delete request", "name": "deleteReq", "in": "body", "schema": { "$ref": "#/definitions/cluster.DeleteClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.DeleteClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/dashboard": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "dashboard", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "dashboard", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.GetDashboardInfoResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query cluster log", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster log" ], "summary": "query cluster log", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true }, { "type": "integer", "example": 1638331200, "name": "endTime", "in": "query" }, { "type": "string", "example": "127.0.0.1", "name": "ip", "in": "query" }, { "type": "string", "example": "warn", "name": "level", "in": "query" }, { "type": "string", "example": "tidb log", "name": "message", "in": "query" }, { "type": "string", "example": "tidb", "name": "module", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "integer", "example": 1630468800, "name": "startTime", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryClusterLogResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/monitor": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "describe monitoring link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "describe monitoring link", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryMonitorInfoResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/params": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query parameters of a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster parameters" ], "summary": "query parameters of a cluster", "parameters": [ { "type": "string", "name": "instanceType", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "string", "name": "paramName", "in": "query" }, { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryClusterParametersResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "submit parameters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster parameters" ], "summary": "submit parameters", "parameters": [ { "description": "update params request", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.UpdateClusterParametersReq" } }, { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.UpdateClusterParametersResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/params/inspect": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "inspect parameters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster parameters" ], "summary": "inspect parameters", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true }, { "description": "inspect params request", "name": "inspectReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.InspectParametersReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.InspectParametersResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/preview-scale-out": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "preview cluster topology and capability", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "preview cluster topology and capability", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true }, { "description": "scale out request", "name": "scaleOutReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.ScaleOutClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.PreviewClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/restart": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "restart a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "restart a cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.RestartClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/scale-in": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "scale in a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "scale in a cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true }, { "description": "scale in request", "name": "scaleInReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.ScaleInClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.ScaleInClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/scale-out": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "scale out a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "scale out a cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true }, { "description": "scale out request", "name": "scaleOutReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.ScaleOutClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.ScaleOutClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/stop": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "stop a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "stop a cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.StopClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/strategy": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "show the backup strategy of a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster backup" ], "summary": "show the backup strategy of a cluster", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.GetBackupStrategyResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "save the backup strategy of a cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster backup" ], "summary": "save the backup strategy of a cluster", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true }, { "description": "backup strategy request", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.SaveBackupStrategyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.SaveBackupStrategyResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/upgrade": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "request for upgrade TiDB cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster upgrade" ], "summary": "request for upgrade TiDB cluster", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true }, { "description": "upgrade request", "name": "upgradeReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.UpgradeClusterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.UpgradeClusterResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/upgrade/diff": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query config diff between current cluster and target upgrade version", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster upgrade" ], "summary": "query config diff between current cluster and target upgrade version", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true }, { "type": "string", "example": "v5.0.0", "name": "targetVersion", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryUpgradeVersionDiffInfoResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/clusters/{clusterId}/upgrade/path": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query upgrade path for given cluster id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster upgrade" ], "summary": "query upgrade path for given cluster id", "parameters": [ { "type": "string", "description": "clusterId", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.QueryUpgradePathRsp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/config/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get system config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "get system config" ], "summary": "get system config", "parameters": [ { "type": "string", "name": "configKey", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetSystemConfigResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/config/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "UpdateSystemConfig", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "UpdateSystemConfig" ], "summary": "update system config", "parameters": [ { "description": "system config for update", "name": "systemConfig", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateSystemConfigReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateSystemConfigResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/dataapps/sqleditor/{cluster_id}/dbs/{db_name}/{table_name}/meta": { "get": { "description": "table meta", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "show table meta", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "description": "db name", "name": "db_name", "in": "path", "required": true }, { "type": "string", "description": "table_name", "name": "table_name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.MetaRes" } } } } }, "/dataapps/sqleditor/{cluster_id}/meta": { "get": { "description": "show all db meta", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "show all db meta", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "description": "value: true or false", "name": "isbrief", "in": "query", "required": true }, { "type": "string", "description": "value: true or false", "name": "showSystemDB", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/sqleditor.DBMeta" } } } } } }, "/dataapps/sqleditor/{cluster_id}/session": { "post": { "description": "create session result", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "create session", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "description": "request_body", "name": "request_body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sqleditor.CreateSessionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.CreateSessionRes" } } } } }, "/dataapps/sqleditor/{cluster_id}/session/{session_id}": { "delete": { "description": "close session result", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "close session", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "description": "session ID", "name": "session_id", "in": "path", "required": true } ], "responses": { "200": { "description": "" } } } }, "/dataapps/sqleditor/{cluster_id}/sqlfiles": { "get": { "description": "list sql file", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "list sql file", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "name": "cluster_id", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.ListSQLFileRes" } } } }, "post": { "description": "create sql file", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "create sql file", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "description": "request_body", "name": "request_body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sqleditor.SQLFileReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.CreateSQLFileRes" } } } } }, "/dataapps/sqleditor/{cluster_id}/sqlfiles/{sql_file_id}": { "get": { "description": "show sql file", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "show sql file", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "description": "sql file ID", "name": "sql_file_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.ShowSQLFileRes" } } } }, "put": { "description": "update sql file", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "update sql file", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "description": "sql file ID", "name": "sql_file_id", "in": "path", "required": true }, { "description": "request_body", "name": "request_body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sqleditor.SQLFileUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.UpdateSQLFileRes" } } } }, "delete": { "description": "delete sql file", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "delete sql file", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "type": "string", "description": "sql file ID", "name": "sql_file_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.DeleteSQLFileRes" } } } } }, "/dataapps/sqleditor/{cluster_id}/statements": { "post": { "description": "execute sql result", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "sqleditor" ], "summary": "execute sql", "parameters": [ { "type": "string", "description": "cluster ID", "name": "cluster_id", "in": "path", "required": true }, { "description": "request_body", "name": "request_body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sqleditor.StatementParam" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/sqleditor.StatementsRes" } } } } }, "/downstream/": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "show display config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "change feed" ], "summary": "unused, just display downstream config", "parameters": [ { "description": "tidb", "name": "tidb", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.TiDBDownstream" } }, { "description": "mysql", "name": "mysql", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.MysqlDownstream" } }, { "description": "kafka", "name": "kafka", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cluster.KafkaDownstream" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/metadata/{clusterId}/": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "for handling exceptions only", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "delete cluster metadata in this system physically, but keep the real cluster alive", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true }, { "description": "delete request", "name": "deleteReq", "in": "body", "schema": { "$ref": "#/definitions/cluster.DeleteMetadataPhysicallyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cluster.DeleteMetadataPhysicallyResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/param-groups/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "query parameter group", "parameters": [ { "type": "string", "example": "8C16G", "name": "clusterSpec", "in": "query" }, { "type": "string", "example": "v5.0", "name": "clusterVersion", "in": "query" }, { "enum": [ 0, 1, 2 ], "type": "integer", "example": 0, "name": "dbType", "in": "query" }, { "enum": [ 0, 1, 2 ], "type": "integer", "example": 0, "name": "hasDefault", "in": "query" }, { "type": "boolean", "example": false, "name": "hasDetail", "in": "query" }, { "type": "string", "example": "default", "name": "name", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/message.QueryParameterGroupResp" } } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "create a parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "create a parameter group", "parameters": [ { "description": "create request", "name": "createReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CreateParameterGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CreateParameterGroupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/param-groups/{paramGroupId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "show details of a parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "show details of a parameter group", "parameters": [ { "type": "string", "description": "parameter group id", "name": "paramGroupId", "in": "path", "required": true }, { "type": "string", "name": "instanceType", "in": "query" }, { "type": "string", "name": "paramName", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DetailParameterGroupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update a parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "update a parameter group", "parameters": [ { "type": "string", "description": "parameter group id", "name": "paramGroupId", "in": "path", "required": true }, { "description": "update parameter group request", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateParameterGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateParameterGroupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete a parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "delete a parameter group", "parameters": [ { "type": "string", "description": "parameter group id", "name": "paramGroupId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteParameterGroupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/param-groups/{paramGroupId}/apply": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "apply a parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "apply a parameter group", "parameters": [ { "type": "string", "description": "parameter group id", "name": "paramGroupId", "in": "path", "required": true }, { "description": "apply parameter group request", "name": "applyReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.ApplyParameterGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.ApplyParameterGroupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/param-groups/{paramGroupId}/copy": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "copy a parameter group", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "parameter group" ], "summary": "copy a parameter group", "parameters": [ { "type": "string", "description": "parameter group id", "name": "paramGroupId", "in": "path", "required": true }, { "description": "copy parameter group request", "name": "copyReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CopyParameterGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CopyParameterGroupResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/platform/check": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "platform check", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "platform check", "parameters": [ { "description": "check platform", "name": "checkPlatformReq", "in": "body", "schema": { "$ref": "#/definitions/message.CheckPlatformReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CheckPlatformRsp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/platform/check/{clusterId}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "platform check cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "platform check cluster", "parameters": [ { "type": "string", "description": "cluster id", "name": "clusterId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CheckClusterRsp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/platform/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query platform log", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform log" ], "summary": "query platform log", "parameters": [ { "type": "integer", "example": 1638331200, "name": "endTime", "in": "query" }, { "type": "string", "example": "warn", "name": "level", "in": "query" }, { "type": "string", "example": "some do something", "name": "message", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "integer", "example": 1630468800, "name": "startTime", "in": "query" }, { "type": "string", "example": "UNe7K1uERa-2fwSxGJ6CFQ", "name": "traceId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryPlatformLogResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/platform/report/{checkId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get check report based on checkId", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "get check report based on checkId", "parameters": [ { "type": "string", "description": "check id", "name": "checkId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetCheckReportRsp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/platform/reports": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get query check reports", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "query check reports", "parameters": [ { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryCheckReportsRsp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/products/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query products", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "product" ], "summary": "query products", "parameters": [ { "type": "array", "items": { "type": "string" }, "collectionFormat": "multi", "description": "product id collection", "name": "productIDs", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryProductsInfoResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update products", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "product" ], "summary": "update products", "parameters": [ { "description": "update products info request parameter", "name": "UpdateProductsInfoReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateProductsInfoReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateProductsInfoResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/products/available": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "queries all products' information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "product" ], "summary": "queries all products' information", "parameters": [ { "type": "integer", "name": "internalProduct", "in": "query" }, { "type": "string", "name": "status", "in": "query" }, { "type": "string", "name": "vendorId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryAvailableProductsResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/products/detail": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query all product detail", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "product" ], "summary": "query all product detail", "parameters": [ { "type": "integer", "name": "internalProduct", "in": "query" }, { "type": "string", "name": "productId", "in": "query" }, { "type": "string", "name": "regionId", "in": "query" }, { "type": "string", "name": "status", "in": "query" }, { "type": "string", "name": "vendorId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryProductDetailResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/permission/add": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "AddPermissionsForRole", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac AddPermissionsForRole" ], "summary": "add permissions for role", "parameters": [ { "description": "AddPermissionsForRole request", "name": "addPermissionsForRoleReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.AddPermissionsForRoleReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.AddPermissionsForRoleResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/permission/check": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "CheckPermissionForUser", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac CheckPermissionForUser" ], "summary": "check permissions of user", "parameters": [ { "description": "CheckPermissionForUser request", "name": "checkPermissionForUserReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CheckPermissionForUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CheckPermissionForUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/permission/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "DeletePermissionsForRole", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac DeletePermissionsForRole" ], "summary": "delete permissions for role", "parameters": [ { "description": "DeleteRoleForUser request", "name": "deletePermissionsForRoleReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DeletePermissionsForRoleReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeletePermissionsForRoleResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/permission/{userId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "QueryPermissionsForUser", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac QueryPermissionsForUser" ], "summary": "query permissions of user", "parameters": [ { "type": "string", "description": "rbac userId", "name": "userId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryPermissionsForUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/role/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "QueryRoles", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac QueryRoles" ], "summary": "query rbac roles", "parameters": [ { "type": "string", "description": "rbac role", "name": "role", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryRolesResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "CreateRbacRole", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac CreateRbacRole" ], "summary": "create rbac role", "parameters": [ { "description": "CreateRole request", "name": "createReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CreateRoleReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CreateRoleResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/role/bind": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "BindRolesForUser", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac BindRolesForUser" ], "summary": "bind user with roles", "parameters": [ { "description": "BindRolesForUser request", "name": "bindReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.BindRolesForUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.BindRolesForUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/role/{role}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "DeleteRbacRole", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac DeleteRbacRole" ], "summary": "delete rbac role", "parameters": [ { "type": "string", "description": "rbac role", "name": "role", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteRoleResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/rbac/user_role/delete": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "UnbindRoleForUser", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rbac UnbindRoleForUser" ], "summary": "unbind rbac role from user", "parameters": [ { "description": "UnbindRoleForUser request", "name": "deleteRoleForUserReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UnbindRoleForUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UnbindRoleForUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/resources/disk": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update disk information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Update disk info", "parameters": [ { "description": "update disk information", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateDiskReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateDiskResp" } } } ] } } } } }, "/resources/disks": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "add disks to the specified host", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Add disks to the specified host", "parameters": [ { "description": "specify the hostId and disks", "name": "createDisksReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CreateDisksReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CreateDisksResp" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "remove disks by a list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Remove a batch of disks", "parameters": [ { "description": "list of disk IDs", "name": "diskIds", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DeleteDisksReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteDisksResp" } } } ] } } } } }, "/resources/hierarchy": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get resource hierarchy-tree", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Show the resources hierarchy", "parameters": [ { "type": "integer", "name": "Depth", "in": "query" }, { "type": "integer", "description": "[1:Region, 2:Zone, 3:Rack, 4:Host]", "name": "Level", "in": "query" }, { "type": "string", "name": "arch", "in": "query" }, { "type": "string", "name": "clusterType", "in": "query" }, { "type": "string", "name": "hostDiskType", "in": "query" }, { "type": "string", "name": "hostId", "in": "query" }, { "type": "string", "name": "hostName", "in": "query" }, { "type": "string", "name": "loadStat", "in": "query" }, { "type": "string", "name": "purpose", "in": "query" }, { "type": "string", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetHierarchyResp" } } } ] } } } } }, "/resources/host": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update host information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Update host info", "parameters": [ { "description": "update host information", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateHostInfoReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateHostInfoResp" } } } ] } } } } }, "/resources/host-reserved": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update host reserved by a list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Update host reserved", "parameters": [ { "description": "do update in host list", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateHostReservedReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateHostReservedResp" } } } ] } } } } }, "/resources/host-status": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update host status by a list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Update host status", "parameters": [ { "description": "do update in host list", "name": "updateReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateHostStatusReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateHostStatusResp" } } } ] } } } } }, "/resources/hosts": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get hosts list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Show all hosts list in EM", "parameters": [ { "type": "string", "name": "arch", "in": "query" }, { "type": "string", "name": "clusterType", "in": "query" }, { "type": "string", "name": "hostDiskType", "in": "query" }, { "type": "string", "name": "hostId", "in": "query" }, { "type": "string", "name": "hostIp", "in": "query" }, { "type": "string", "name": "hostName", "in": "query" }, { "type": "string", "name": "loadStat", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "string", "name": "purpose", "in": "query" }, { "type": "string", "name": "rack", "in": "query" }, { "type": "string", "name": "region", "in": "query" }, { "type": "string", "name": "status", "in": "query" }, { "type": "string", "name": "zone", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryHostsResp" } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "import hosts by xlsx file", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Import a batch of hosts to EM", "parameters": [ { "type": "string", "default": "false", "description": "whether hosts are reserved(won't be allocated) after import", "name": "hostReserved", "in": "formData" }, { "type": "string", "default": "false", "description": "whether to skip host init steps", "name": "skipHostInit", "in": "formData" }, { "type": "string", "default": "false", "description": "whether to ignore warings in init steps", "name": "ignorewarns", "in": "formData" }, { "type": "file", "description": "hosts information in a xlsx file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.ImportHostsResp" } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "remove hosts by a list", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Remove a batch of hosts", "parameters": [ { "description": "list of host IDs", "name": "hostIds", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DeleteHostsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteHostsResp" } } } ] } } } } }, "/resources/hosts-template": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get host template xlsx file", "consumes": [ "application/json" ], "produces": [ "application/octet-stream" ], "tags": [ "resource" ], "summary": "Download the host information template file for importing", "responses": { "200": { "description": "OK", "schema": { "type": "file" } } } } }, "/resources/stocks": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get resource stocks in specified conditions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "resource" ], "summary": "Show the resources stocks", "parameters": [ { "type": "string", "name": "arch", "in": "query" }, { "type": "integer", "name": "capacity", "in": "query" }, { "type": "string", "name": "clusterType", "in": "query" }, { "type": "string", "name": "diskStatus", "in": "query" }, { "type": "string", "name": "diskType", "in": "query" }, { "type": "string", "name": "hostDiskType", "in": "query" }, { "type": "string", "name": "hostId", "in": "query" }, { "type": "string", "name": "hostIp", "in": "query" }, { "type": "string", "name": "hostName", "in": "query" }, { "type": "string", "name": "loadStat", "in": "query" }, { "type": "string", "name": "purpose", "in": "query" }, { "type": "string", "name": "rack", "in": "query" }, { "type": "string", "name": "region", "in": "query" }, { "type": "string", "name": "status", "in": "query" }, { "type": "string", "name": "zone", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetStocksResp" } } } ] } } } } }, "/system/info": { "get": { "description": "get system info", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "get system info", "parameters": [ { "type": "boolean", "name": "withVersionDetail", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetSystemInfoResp" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/tenant": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query all tenant profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "queries all tenant profile", "parameters": [ { "description": "query tenant profile request parameter", "name": "QueryTenantReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.QueryTenantReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryTenantResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update tenant onboarding status", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "update tenant onboarding status", "parameters": [ { "type": "string", "description": "tenant id", "name": "tenantId", "in": "path", "required": true }, { "description": "query tenant profile request parameter", "name": "UpdateTenantOnBoardingStatusReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateTenantOnBoardingStatusReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateTenantOnBoardingStatusResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/tenant/{tenantId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get tenant profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "get tenant profile", "parameters": [ { "type": "string", "description": "tenant id", "name": "tenantId", "in": "path", "required": true }, { "description": "get tenant profile request parameter", "name": "GetTenantReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.GetTenantReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetTenantResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/tenants/": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "created tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "created tenant", "parameters": [ { "description": "create tenant request parameter", "name": "CreateTenantReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CreateTenantReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CreateTenantResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/tenants/{tenantId}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "delete tenant", "parameters": [ { "type": "string", "description": "tenant id", "name": "tenantId", "in": "path", "required": true }, { "description": "delete tenant request parameter", "name": "DeleteTenantReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DeleteTenantReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteTenantResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/tenants/{tenantId}/update_profile": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update tenant profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "update tenant profile", "parameters": [ { "type": "string", "description": "tenant id", "name": "tenantId", "in": "path", "required": true }, { "description": "query tenant profile request parameter", "name": "UpdateTenantProfileReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateTenantProfileReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateTenantProfileResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/user/login": { "post": { "description": "login", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "login", "parameters": [ { "description": "login info", "name": "loginInfo", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.LoginReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.LoginResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/user/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "logout", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "logout", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.LogoutResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/users/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query all user profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "queries all user profile", "parameters": [ { "description": "query user profile request parameter", "name": "queryUserRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.QueryUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "created user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "created user", "parameters": [ { "description": "create user request parameter", "name": "createUserReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.CreateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.CreateUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/users/{userId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get user profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "get user profile", "parameters": [ { "type": "string", "description": "user id", "name": "userId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.GetUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "delete user", "parameters": [ { "type": "string", "description": "user id", "name": "userId", "in": "path", "required": true }, { "description": "delete user request parameter", "name": "deleteUserReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.DeleteUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.DeleteUserResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/users/{userId}/password": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update user password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "update user password", "parameters": [ { "type": "string", "description": "user id", "name": "userId", "in": "path", "required": true }, { "description": "query user password request parameter", "name": "UpdateUserPasswordRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateUserPasswordReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateUserPasswordResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/users/{userId}/update_profile": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update user profile", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "platform" ], "summary": "update user profile", "parameters": [ { "type": "string", "description": "user id", "name": "userId", "in": "path", "required": true }, { "description": "query user profile request parameter", "name": "updateUserProfileRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateUserProfileReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateUserProfileResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/vendors/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query vendors", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vendor" ], "summary": "query vendors", "parameters": [ { "type": "array", "items": { "type": "string" }, "collectionFormat": "multi", "description": "vendor id collection", "name": "vendorIDs", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryVendorInfoResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update vendors", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vendor" ], "summary": "update vendors", "parameters": [ { "description": "update vendor info request parameter", "name": "UpdateVendorInfoReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.UpdateVendorInfoReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.UpdateVendorInfoReq" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/vendors/available": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query available vendors and regions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "vendor" ], "summary": "query available vendors and regions", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryAvailableVendorsResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/workflow/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query flow works", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "task" ], "summary": "query flow works", "parameters": [ { "type": "string", "name": "bizId", "in": "query" }, { "type": "string", "name": "bizType", "in": "query" }, { "type": "string", "name": "flowName", "in": "query" }, { "type": "integer", "description": "Current page location", "name": "page", "in": "query" }, { "type": "integer", "description": "Number of this request", "name": "pageSize", "in": "query" }, { "type": "string", "name": "status", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.ResultWithPage" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryWorkFlowsResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/workflow/start": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "start workflow", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "start workflow" ], "summary": "start workflow", "parameters": [ { "description": "start workflow", "name": "startReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.StartWorkFlowReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.StartWorkFlowResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/workflow/stop": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "stop workflow", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "stop workflow" ], "summary": "stop workflow", "parameters": [ { "description": "stop workflow", "name": "stopReq", "in": "body", "required": true, "schema": { "$ref": "#/definitions/message.StopWorkFlowReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.StopWorkFlowResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } }, "/workflow/{workFlowId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "show details of a flow work", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "task" ], "summary": "show details of a flow work", "parameters": [ { "type": "string", "description": "flow work id", "name": "workFlowId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/controller.CommonResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/message.QueryWorkFlowDetailResp" } } } ] } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/controller.CommonResult" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/controller.CommonResult" } } } } } }, "definitions": { "cluster.BackupClusterDataReq": { "type": "object", "properties": { "backupMode": { "description": "auto,manual", "type": "string" }, "backupType": { "description": "full,incr", "type": "string" }, "clusterId": { "type": "string" } } }, "cluster.BackupClusterDataResp": { "type": "object", "properties": { "backupId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.CancelBackupReq": { "type": "object", "properties": { "backupId": { "type": "string" }, "clusterId": { "type": "string" } } }, "cluster.CancelBackupResp": { "type": "object" }, "cluster.CloneClusterReq": { "type": "object", "required": [ "cloneStrategy", "clusterName", "clusterType", "clusterVersion", "cpuArchitecture", "dbPassword", "region", "sourceClusterId" ], "properties": { "cloneStrategy": { "description": "specify clone strategy, include empty, snapshot and sync, default empty(option)", "type": "string" }, "clusterName": { "type": "string" }, "clusterType": { "type": "string" }, "clusterVersion": { "type": "string" }, "copies": { "description": "The number of copies of the newly created cluster data, consistent with the number of copies set in PD", "type": "integer" }, "cpuArchitecture": { "description": "X86/X86_64/ARM", "type": "string" }, "dbPassword": { "type": "string" }, "dbUser": { "description": "todo delete?", "type": "string" }, "exclusive": { "description": "Whether the newly created cluster is exclusive to physical resources, when exclusive, a host will only deploy instances of the same cluster, which may result in poor resource utilization", "type": "boolean" }, "parameterGroupID": { "type": "string" }, "region": { "description": "The Region where the cluster is located", "type": "string" }, "resourceParameters": { "$ref": "#/definitions/structs.ClusterResourceInfo" }, "sourceClusterId": { "description": "specify source cluster id(require)", "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "tls": { "type": "boolean" }, "vendor": { "type": "string" } } }, "cluster.CloneClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.CreateChangeFeedTaskReq": { "type": "object", "required": [ "clusterId", "downstreamType", "name" ], "properties": { "clusterId": { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22" }, "downstream": { "type": "object" }, "downstreamType": { "type": "string", "enum": [ "tidb", "kafka", "mysql" ], "example": "tidb" }, "name": { "type": "string", "example": "my_sync_name" }, "rules": { "type": "array", "items": { "type": "string" }, "example": [ "*.*" ] }, "startTS": { "type": "string", "example": "415241823337054209" } } }, "cluster.CreateChangeFeedTaskResp": { "type": "object", "properties": { "id": { "type": "string", "example": "TASK_ID_IN_TIUNIMANAGER____22" } } }, "cluster.CreateClusterReq": { "type": "object", "required": [ "clusterName", "clusterType", "clusterVersion", "cpuArchitecture", "dbPassword", "region" ], "properties": { "clusterName": { "type": "string" }, "clusterType": { "type": "string" }, "clusterVersion": { "type": "string" }, "copies": { "description": "The number of copies of the newly created cluster data, consistent with the number of copies set in PD", "type": "integer" }, "cpuArchitecture": { "description": "X86/X86_64/ARM", "type": "string" }, "dbPassword": { "type": "string" }, "dbUser": { "description": "todo delete?", "type": "string" }, "exclusive": { "description": "Whether the newly created cluster is exclusive to physical resources, when exclusive, a host will only deploy instances of the same cluster, which may result in poor resource utilization", "type": "boolean" }, "parameterGroupID": { "type": "string" }, "region": { "description": "The Region where the cluster is located", "type": "string" }, "resourceParameters": { "$ref": "#/definitions/structs.ClusterResourceInfo" }, "tags": { "type": "array", "items": { "type": "string" } }, "tls": { "type": "boolean" }, "vendor": { "type": "string" } } }, "cluster.CreateClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.DeleteBackupDataReq": { "type": "object", "properties": { "backupMode": { "type": "string" }, "clusterId": { "type": "string" } } }, "cluster.DeleteBackupDataResp": { "type": "object" }, "cluster.DeleteChangeFeedTaskResp": { "type": "object", "properties": { "id": { "type": "string", "example": "TASK_ID_IN_TIUNIMANAGER____22" }, "status": { "type": "string", "enum": [ "Initial", "Normal", "Stopped", "Finished", "Error", "Failed" ], "example": "Normal" } } }, "cluster.DeleteClusterReq": { "type": "object", "properties": { "autoBackup": { "type": "boolean" }, "force": { "type": "boolean" }, "keepHistoryBackupRecords": { "type": "boolean" } } }, "cluster.DeleteClusterResp": { "type": "object", "properties": { "clusterID": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.DeleteMetadataPhysicallyReq": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string" } } }, "cluster.DeleteMetadataPhysicallyResp": { "type": "object" }, "cluster.DetailChangeFeedTaskResp": { "type": "object", "properties": { "clusterId": { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22" }, "createTime": { "type": "string" }, "downstream": { "type": "object" }, "downstreamFetchTs": { "type": "string", "example": "415241823337054209" }, "downstreamFetchUnix": { "type": "integer", "example": 1642402879000 }, "downstreamSyncTs": { "type": "string", "example": "415241823337054209" }, "downstreamSyncUnix": { "type": "integer", "example": 1642402879000 }, "downstreamType": { "type": "string", "enum": [ "tidb", "kafka", "mysql" ], "example": "tidb" }, "id": { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22" }, "name": { "type": "string", "example": "my_sync_name" }, "rules": { "type": "array", "items": { "type": "string" }, "example": [ "*.*" ] }, "startTS": { "type": "string", "example": "415241823337054209" }, "startUnix": { "type": "integer", "example": 1642402879000 }, "status": { "type": "string", "enum": [ "Initial", "Normal", "Stopped", "Finished", "Error", "Failed" ], "example": "Normal" }, "unsteady": { "type": "boolean", "example": false }, "updateTime": { "type": "string" }, "upstreamUpdateTs": { "type": "string", "example": "415241823337054209" }, "upstreamUpdateUnix": { "type": "integer", "example": 1642402879000 } } }, "cluster.Dispatcher": { "type": "object", "properties": { "dispatcher": { "type": "string", "example": "ts" }, "matcher": { "type": "string", "example": "test1.*" } } }, "cluster.GetBackupStrategyResp": { "type": "object", "properties": { "strategy": { "$ref": "#/definitions/structs.BackupStrategy" } } }, "cluster.GetDashboardInfoResp": { "type": "object", "properties": { "clusterId": { "type": "string", "example": "abc" }, "token": { "type": "string" }, "url": { "type": "string", "example": "http://127.0.0.1:9093" } } }, "cluster.InspectParameterInfo": { "type": "object", "properties": { "category": { "type": "string", "example": "log" }, "description": { "type": "string", "example": "binlog cache size" }, "hasReboot": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "inspectValue": { "type": "object" }, "name": { "type": "string", "example": "binlog_cache" }, "note": { "type": "string", "example": "binlog cache size" }, "paramId": { "type": "string", "example": "1" }, "range": { "type": "array", "items": { "type": "string" }, "example": [ "1", " 1000" ] }, "rangeType": { "type": "integer", "enum": [ 0, 1, 2 ], "example": 1 }, "readOnly": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "realValue": { "$ref": "#/definitions/structs.ParameterRealValue" }, "systemVariable": { "type": "string", "example": "log.log_level" }, "type": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "unit": { "type": "string", "example": "MB" }, "unitOptions": { "type": "array", "items": { "type": "string" }, "example": [ "KB", "MB", "GB" ] } } }, "cluster.InspectParameters": { "type": "object", "properties": { "instanceId": { "type": "string" }, "instanceType": { "type": "string" }, "parameterInfos": { "type": "array", "items": { "$ref": "#/definitions/cluster.InspectParameterInfo" } } } }, "cluster.InspectParametersReq": { "type": "object", "properties": { "instanceId": { "type": "string" } } }, "cluster.InspectParametersResp": { "type": "object", "properties": { "params": { "type": "array", "items": { "$ref": "#/definitions/cluster.InspectParameters" } } } }, "cluster.KafkaDownstream": { "type": "object", "properties": { "clientId": { "type": "string", "example": "213" }, "dispatchers": { "type": "array", "items": { "$ref": "#/definitions/cluster.Dispatcher" } }, "ip": { "type": "string", "example": "127.0.0.1" }, "maxBatchSize": { "type": "integer", "example": 5 }, "maxMessageBytes": { "type": "integer", "example": 16 }, "partitions": { "type": "integer", "example": 1 }, "port": { "type": "integer", "example": 9001 }, "protocol": { "type": "string", "enum": [ "default", "canal", "avro", "maxwell" ], "example": "default" }, "replicationFactor": { "type": "integer", "example": 1 }, "tls": { "type": "boolean", "example": false }, "topicName": { "type": "string", "example": "my_topic" }, "version": { "type": "string", "example": "2.4.0" } } }, "cluster.MasterSlaveClusterSwitchoverReq": { "type": "object", "required": [ "sourceClusterID", "targetClusterID" ], "properties": { "checkMasterWritableFlag": { "type": "boolean" }, "checkSlaveReadOnlyFlag": { "type": "boolean" }, "checkStandaloneClusterFlag": { "description": "check if cluster specified in `SourceClusterID` is standalone, i.e. no cluster relation and no cdc\nif this flag is true, always only check", "type": "boolean" }, "force": { "type": "boolean" }, "onlyCheck": { "description": "only check if this flag is true", "type": "boolean" }, "rollbackClearPreviousMaintenanceFlag": { "description": "clear previous un-cleared \"Switching\" maintenance state", "type": "boolean" }, "rollbackWorkFlowID": { "description": "if this field is not empty, that means this is a rollback request", "type": "string" }, "sourceClusterID": { "description": "old master/new slave", "type": "string" }, "targetClusterID": { "description": "new master/old slave", "type": "string" } } }, "cluster.MasterSlaveClusterSwitchoverResp": { "type": "object", "properties": { "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.MysqlDownstream": { "type": "object", "properties": { "concurrentThreads": { "type": "integer", "example": 7 }, "ip": { "type": "string", "example": "127.0.0.1" }, "maxTxnRow": { "type": "integer", "example": 5 }, "password": { "type": "string", "example": "my_password" }, "port": { "type": "integer", "example": 8001 }, "tls": { "type": "boolean", "example": false }, "username": { "type": "string", "example": "root" }, "workerCount": { "type": "integer", "example": 2 } } }, "cluster.PauseChangeFeedTaskResp": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "Initial", "Normal", "Stopped", "Finished", "Error", "Failed" ], "example": "Normal" } } }, "cluster.PreviewClusterResp": { "type": "object", "properties": { "capabilityIndexes": { "type": "array", "items": { "$ref": "#/definitions/structs.Index" } }, "clusterName": { "type": "string" }, "clusterType": { "type": "string" }, "clusterVersion": { "type": "string" }, "cpuArchitecture": { "type": "string" }, "region": { "type": "string" }, "stockCheckResult": { "type": "array", "items": { "$ref": "#/definitions/structs.ResourceStockCheckResult" } } } }, "cluster.QueryBackupRecordsResp": { "type": "object", "properties": { "backupRecords": { "type": "array", "items": { "$ref": "#/definitions/structs.BackupRecord" } } } }, "cluster.QueryChangeFeedTaskResp": { "type": "object", "properties": { "clusterId": { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22" }, "createTime": { "type": "string" }, "downstream": { "type": "object" }, "downstreamFetchTs": { "type": "string", "example": "415241823337054209" }, "downstreamFetchUnix": { "type": "integer", "example": 1642402879000 }, "downstreamSyncTs": { "type": "string", "example": "415241823337054209" }, "downstreamSyncUnix": { "type": "integer", "example": 1642402879000 }, "downstreamType": { "type": "string", "enum": [ "tidb", "kafka", "mysql" ], "example": "tidb" }, "id": { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22" }, "name": { "type": "string", "example": "my_sync_name" }, "rules": { "type": "array", "items": { "type": "string" }, "example": [ "*.*" ] }, "startTS": { "type": "string", "example": "415241823337054209" }, "startUnix": { "type": "integer", "example": 1642402879000 }, "status": { "type": "string", "enum": [ "Initial", "Normal", "Stopped", "Finished", "Error", "Failed" ], "example": "Normal" }, "unsteady": { "type": "boolean", "example": false }, "updateTime": { "type": "string" }, "upstreamUpdateTs": { "type": "string", "example": "415241823337054209" }, "upstreamUpdateUnix": { "type": "integer", "example": 1642402879000 } } }, "cluster.QueryClusterDetailResp": { "type": "object", "properties": { "info": { "$ref": "#/definitions/structs.ClusterInfo" }, "instanceResource": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterResourceParameterCompute" } }, "requestResourceMode": { "type": "string", "default": "SpecificZone", "enum": [ "SpecificZone", "SpecificHost" ] }, "topology": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterInstanceInfo" } } } }, "cluster.QueryClusterLogResp": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterLogItem" } }, "took": { "type": "integer", "example": 10 } } }, "cluster.QueryClusterParametersResp": { "type": "object", "properties": { "paramGroupId": { "type": "string" }, "params": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterParameterInfo" } } } }, "cluster.QueryClusterResp": { "type": "object", "properties": { "clusters": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterInfo" } } } }, "cluster.QueryMonitorInfoResp": { "type": "object", "properties": { "alertUrl": { "type": "string", "example": "http://127.0.0.1:9093" }, "clusterId": { "type": "string", "example": "abc" }, "grafanaUrl": { "type": "string", "example": "http://127.0.0.1:3000" } } }, "cluster.QueryUpgradePathRsp": { "type": "object", "properties": { "paths": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductUpgradePathItem" } } } }, "cluster.QueryUpgradeVersionDiffInfoResp": { "type": "object", "properties": { "configDiffInfos": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductUpgradeVersionConfigDiffItem" } } } }, "cluster.RestartClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.RestoreNewClusterReq": { "type": "object", "required": [ "backupId", "clusterName", "clusterType", "clusterVersion", "cpuArchitecture", "dbPassword", "region" ], "properties": { "backupId": { "type": "string" }, "clusterName": { "type": "string" }, "clusterType": { "type": "string" }, "clusterVersion": { "type": "string" }, "copies": { "description": "The number of copies of the newly created cluster data, consistent with the number of copies set in PD", "type": "integer" }, "cpuArchitecture": { "description": "X86/X86_64/ARM", "type": "string" }, "dbPassword": { "type": "string" }, "dbUser": { "description": "todo delete?", "type": "string" }, "exclusive": { "description": "Whether the newly created cluster is exclusive to physical resources, when exclusive, a host will only deploy instances of the same cluster, which may result in poor resource utilization", "type": "boolean" }, "parameterGroupID": { "type": "string" }, "region": { "description": "The Region where the cluster is located", "type": "string" }, "resourceParameters": { "$ref": "#/definitions/structs.ClusterResourceInfo" }, "tags": { "type": "array", "items": { "type": "string" } }, "tls": { "type": "boolean" }, "vendor": { "type": "string" } } }, "cluster.RestoreNewClusterResp": { "type": "object", "properties": { "clusterID": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.ResumeChangeFeedTaskResp": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "Initial", "Normal", "Stopped", "Finished", "Error", "Failed" ], "example": "Normal" } } }, "cluster.SaveBackupStrategyReq": { "type": "object", "properties": { "strategy": { "$ref": "#/definitions/structs.BackupStrategy" } } }, "cluster.SaveBackupStrategyResp": { "type": "object" }, "cluster.ScaleInClusterReq": { "type": "object", "properties": { "instanceId": { "type": "string" } } }, "cluster.ScaleInClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.ScaleOutClusterReq": { "type": "object", "properties": { "instanceResource": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterResourceParameterCompute" } }, "requestResourceMode": { "type": "string", "default": "SpecificZone", "enum": [ "SpecificZone", "SpecificHost" ] } } }, "cluster.ScaleOutClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.StopClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.TakeoverClusterReq": { "type": "object", "required": [ "TiUPIp", "TiUPPath", "TiUPPort", "TiUPUserName", "TiUPUserPassword", "clusterName", "dbPassword" ], "properties": { "TiUPIp": { "type": "string", "example": "172.16.4.147" }, "TiUPPath": { "type": "string", "example": ".tiup/" }, "TiUPPort": { "type": "integer", "example": 22 }, "TiUPUserName": { "type": "string", "example": "root" }, "TiUPUserPassword": { "type": "string", "example": "password" }, "clusterName": { "type": "string", "example": "myClusterName" }, "dbPassword": { "type": "string", "example": "myPassword" } } }, "cluster.TakeoverClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.TiDBDownstream": { "type": "object", "properties": { "concurrentThreads": { "type": "integer", "example": 5 }, "ip": { "type": "string", "example": "127.0.0.1" }, "maxTxnRow": { "type": "integer", "example": 4 }, "password": { "type": "string", "example": "my_password" }, "port": { "type": "integer", "example": 4534 }, "targetClusterId": { "type": "string", "example": "CLUSTER_ID_IN_TIUNIMANAGER__22" }, "tls": { "type": "boolean", "example": false }, "username": { "type": "string", "example": "tidb" }, "workerCount": { "type": "integer", "example": 2 } } }, "cluster.UpdateChangeFeedTaskReq": { "type": "object", "required": [ "name" ], "properties": { "downstream": { "type": "object" }, "downstreamType": { "type": "string", "enum": [ "tidb", "kafka", "mysql" ], "example": "tidb" }, "name": { "type": "string", "example": "my_sync_name" }, "rules": { "type": "array", "items": { "type": "string" }, "example": [ "*.*" ] } } }, "cluster.UpdateChangeFeedTaskResp": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "Initial", "Normal", "Stopped", "Finished", "Error", "Failed" ], "example": "Normal" } } }, "cluster.UpdateClusterParametersReq": { "type": "object", "required": [ "params" ], "properties": { "params": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterParameterSampleInfo" } }, "reboot": { "type": "boolean" } } }, "cluster.UpdateClusterParametersResp": { "type": "object", "properties": { "clusterId": { "type": "string", "example": "1" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "cluster.UpgradeClusterReq": { "type": "object", "required": [ "targetVersion", "upgradeType" ], "properties": { "configs": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterUpgradeVersionConfigItem" } }, "targetVersion": { "type": "string", "example": "v5.0.0" }, "upgradeType": { "type": "string", "enum": [ "in-place", "migration" ] }, "upgradeWay": { "type": "string", "enum": [ "offline", "online" ] } } }, "cluster.UpgradeClusterResp": { "type": "object", "properties": { "clusterId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "controller.CommonResult": { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "object" }, "message": { "type": "string" } } }, "controller.Page": { "type": "object", "properties": { "page": { "type": "integer" }, "pageSize": { "type": "integer" }, "total": { "type": "integer" } } }, "controller.ResultWithPage": { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "object" }, "message": { "type": "string" }, "page": { "$ref": "#/definitions/controller.Page" } } }, "message.AddPermissionsForRoleReq": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "$ref": "#/definitions/structs.RbacPermission" } }, "role": { "type": "string" } } }, "message.AddPermissionsForRoleResp": { "type": "object" }, "message.ApplyParameterGroupReq": { "type": "object", "required": [ "clusterId" ], "properties": { "clusterId": { "type": "string", "example": "123" }, "reboot": { "type": "boolean" } } }, "message.ApplyParameterGroupResp": { "type": "object", "properties": { "clusterId": { "type": "string", "example": "123" }, "paramGroupId": { "type": "string", "example": "123" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "message.BindRolesForUserReq": { "type": "object", "properties": { "roles": { "type": "array", "items": { "type": "string" } }, "userId": { "type": "string" } } }, "message.BindRolesForUserResp": { "type": "object" }, "message.CheckClusterRsp": { "type": "object", "properties": { "checkId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "message.CheckPermissionForUserReq": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "$ref": "#/definitions/structs.RbacPermission" } }, "userId": { "type": "string" } } }, "message.CheckPermissionForUserResp": { "type": "object", "properties": { "result": { "type": "boolean" } } }, "message.CheckPlatformReq": { "type": "object", "properties": { "displayMode": { "type": "string" } } }, "message.CheckPlatformRsp": { "type": "object", "properties": { "checkId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "message.CopyParameterGroupReq": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "example": "8C16GV4_copy" }, "note": { "type": "string", "example": "copy param group" } } }, "message.CopyParameterGroupResp": { "type": "object", "properties": { "paramGroupId": { "type": "string", "example": "1" } } }, "message.CreateDisksReq": { "type": "object", "properties": { "disks": { "type": "array", "items": { "$ref": "#/definitions/structs.DiskInfo" } }, "hostId": { "type": "string" } } }, "message.CreateDisksResp": { "type": "object", "properties": { "diskIds": { "type": "array", "items": { "type": "string" } } } }, "message.CreateParameterGroupReq": { "type": "object", "required": [ "clusterSpec", "clusterVersion", "dbType", "groupType", "name", "params" ], "properties": { "addParams": { "type": "array", "items": { "$ref": "#/definitions/message.ParameterInfo" } }, "clusterSpec": { "type": "string", "example": "8C16G" }, "clusterVersion": { "type": "string", "example": "v5.0" }, "dbType": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "groupType": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "name": { "type": "string", "example": "8C16GV4_default" }, "note": { "type": "string", "example": "default param group" }, "params": { "type": "array", "items": { "$ref": "#/definitions/structs.ParameterGroupParameterSampleInfo" } } } }, "message.CreateParameterGroupResp": { "type": "object", "properties": { "paramGroupId": { "type": "string", "example": "1" } } }, "message.CreateRoleReq": { "type": "object", "properties": { "role": { "type": "string" } } }, "message.CreateRoleResp": { "type": "object" }, "message.CreateTenantReq": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" }, "maxCluster": { "type": "integer" }, "maxCpu": { "type": "integer" }, "maxMemory": { "type": "integer" }, "maxStorage": { "type": "integer" }, "name": { "type": "string" }, "onBoardingStatus": { "type": "string" }, "status": { "type": "string" } } }, "message.CreateTenantResp": { "type": "object" }, "message.CreateUserReq": { "type": "object", "required": [ "email", "name", "password" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "nickname": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "tenantId": { "type": "string" } } }, "message.CreateUserResp": { "type": "object" }, "message.DataExportReq": { "type": "object", "properties": { "accessKey": { "type": "string" }, "bucketUrl": { "type": "string" }, "clusterId": { "type": "string" }, "comment": { "type": "string" }, "endpointUrl": { "type": "string" }, "fileType": { "type": "string" }, "filter": { "type": "string" }, "password": { "type": "string" }, "secretAccessKey": { "type": "string" }, "sql": { "type": "string" }, "storageType": { "type": "string" }, "userName": { "type": "string" }, "zipName": { "type": "string" } } }, "message.DataExportResp": { "type": "object", "properties": { "recordId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "message.DataImportReq": { "type": "object", "properties": { "accessKey": { "type": "string" }, "bucketUrl": { "type": "string" }, "clusterId": { "type": "string" }, "comment": { "type": "string" }, "endpointUrl": { "type": "string" }, "password": { "type": "string" }, "recordId": { "type": "string" }, "secretAccessKey": { "type": "string" }, "storageType": { "type": "string" }, "userName": { "type": "string" } } }, "message.DataImportResp": { "type": "object", "properties": { "recordId": { "type": "string" }, "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "message.DeleteDisksReq": { "type": "object", "properties": { "diskIds": { "type": "array", "items": { "type": "string" } } } }, "message.DeleteDisksResp": { "type": "object" }, "message.DeleteHostsReq": { "type": "object", "properties": { "force": { "type": "boolean" }, "hostIds": { "type": "array", "items": { "type": "string" } } } }, "message.DeleteHostsResp": { "type": "object", "properties": { "flowInfo": { "type": "array", "items": { "$ref": "#/definitions/structs.AsyncTaskWorkFlowInfo" } } } }, "message.DeleteImportExportRecordReq": { "type": "object" }, "message.DeleteImportExportRecordResp": { "type": "object", "properties": { "recordId": { "type": "string" } } }, "message.DeleteParameterGroupResp": { "type": "object", "properties": { "paramGroupId": { "type": "string", "example": "1" } } }, "message.DeletePermissionsForRoleReq": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "$ref": "#/definitions/structs.RbacPermission" } }, "role": { "type": "string" } } }, "message.DeletePermissionsForRoleResp": { "type": "object" }, "message.DeleteRoleResp": { "type": "object" }, "message.DeleteTenantReq": { "type": "object", "properties": { "id": { "type": "string" } } }, "message.DeleteTenantResp": { "type": "object" }, "message.DeleteUserReq": { "type": "object" }, "message.DeleteUserResp": { "type": "object" }, "message.DetailParameterGroupResp": { "type": "object", "properties": { "clusterSpec": { "type": "string", "example": "8C16G" }, "clusterVersion": { "type": "string", "example": "v5.0" }, "createTime": { "type": "integer", "example": 1636698675 }, "dbType": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "groupType": { "type": "integer", "enum": [ 1, 2 ], "example": 0 }, "hasDefault": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "name": { "type": "string", "example": "default" }, "note": { "type": "string", "example": "default param group" }, "paramGroupId": { "type": "string", "example": "1" }, "params": { "type": "array", "items": { "$ref": "#/definitions/structs.ParameterGroupParameterInfo" } }, "updateTime": { "type": "integer", "example": 1636698675 } } }, "message.GetCheckReportRsp": { "type": "object", "properties": { "reportInfo": { "type": "object" } } }, "message.GetHierarchyResp": { "type": "object", "properties": { "root": { "$ref": "#/definitions/structs.HierarchyTreeNode" } } }, "message.GetStocksResp": { "type": "object", "properties": { "stocks": { "description": "map[zone] -\u003e stocks", "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.Stocks" } } } }, "message.GetSystemConfigResp": { "type": "object", "properties": { "configKey": { "type": "string" }, "configValue": { "type": "string" } } }, "message.GetSystemInfoResp": { "type": "object", "properties": { "currentVersion": { "$ref": "#/definitions/structs.SystemVersionInfo" }, "info": { "$ref": "#/definitions/structs.SystemInfo" }, "lastVersion": { "$ref": "#/definitions/structs.SystemVersionInfo" } } }, "message.GetTenantReq": { "type": "object", "properties": { "id": { "type": "string" } } }, "message.GetTenantResp": { "type": "object", "properties": { "info": { "$ref": "#/definitions/structs.TenantInfo" } } }, "message.GetUserResp": { "type": "object", "properties": { "user": { "$ref": "#/definitions/structs.UserInfo" } } }, "message.ImportHostsResp": { "type": "object", "properties": { "flowInfo": { "type": "array", "items": { "$ref": "#/definitions/structs.AsyncTaskWorkFlowInfo" } }, "hostIds": { "type": "array", "items": { "type": "string" } } } }, "message.LoginReq": { "type": "object", "required": [ "userName", "userPassword" ], "properties": { "userName": { "type": "string" }, "userPassword": { "type": "string" } } }, "message.LoginResp": { "type": "object", "properties": { "passwordExpired": { "type": "boolean" }, "tenantId": { "type": "string" }, "token": { "type": "string" }, "userId": { "type": "string" } } }, "message.LogoutResp": { "type": "object", "properties": { "userId": { "type": "string" } } }, "message.ParameterInfo": { "type": "object", "properties": { "category": { "type": "string", "example": "log" }, "defaultValue": { "type": "string", "example": "1024" }, "description": { "type": "string", "example": "binlog size" }, "hasApply": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "hasReboot": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "instanceType": { "type": "string", "example": "TiDB" }, "name": { "type": "string", "example": "binlog_size" }, "note": { "type": "string" }, "range": { "type": "array", "items": { "type": "string" } }, "rangeType": { "type": "integer", "enum": [ 0, 1, 2 ], "example": 1 }, "readOnly": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "systemVariable": { "type": "string", "example": "log.binlog_size" }, "type": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "unit": { "type": "string", "example": "MB" }, "unitOptions": { "type": "array", "items": { "type": "string" }, "example": [ "KB", "MB", "GB" ] }, "updateSource": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 } } }, "message.PlatformLogItem": { "type": "object", "properties": { "id": { "type": "string", "example": "zvadfwf" }, "index": { "type": "string", "example": "em-system-logs-2021.12.30" }, "level": { "type": "string", "example": "warn" }, "message": { "type": "string", "example": "some do something" }, "microMethod": { "type": "string", "example": "em.cluster.ClusterService.GetSystemInfo" }, "timestamp": { "type": "string", "example": "2021-09-23 14:23:10" }, "traceId": { "type": "string", "example": "UNe7K1uERa-2fwSxGJ6CFQ" } } }, "message.QueryAvailableProductsResp": { "type": "object", "properties": { "products": { "description": "arch version", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.Product" } } } } } } }, "message.QueryAvailableVendorsResp": { "type": "object", "properties": { "vendors": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.VendorWithRegion" } } } }, "message.QueryCheckReportsRsp": { "type": "object", "properties": { "reportMetas": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.CheckReportMeta" } } } }, "message.QueryDataImportExportRecordsResp": { "type": "object", "properties": { "transportRecords": { "type": "array", "items": { "$ref": "#/definitions/structs.DataImportExportRecordInfo" } } } }, "message.QueryHostsResp": { "type": "object", "properties": { "hosts": { "type": "array", "items": { "$ref": "#/definitions/structs.HostInfo" } } } }, "message.QueryParameterGroupResp": { "type": "object", "properties": { "clusterSpec": { "type": "string", "example": "8C16G" }, "clusterVersion": { "type": "string", "example": "v5.0" }, "createTime": { "type": "integer", "example": 1636698675 }, "dbType": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "groupType": { "type": "integer", "enum": [ 1, 2 ], "example": 0 }, "hasDefault": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "name": { "type": "string", "example": "default" }, "note": { "type": "string", "example": "default param group" }, "paramGroupId": { "type": "string", "example": "1" }, "params": { "type": "array", "items": { "$ref": "#/definitions/structs.ParameterGroupParameterInfo" } }, "updateTime": { "type": "integer", "example": 1636698675 } } }, "message.QueryPermissionsForUserResp": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "$ref": "#/definitions/structs.RbacPermission" } }, "userId": { "type": "string" } } }, "message.QueryPlatformLogResp": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/message.PlatformLogItem" } }, "took": { "type": "integer", "example": 10 } } }, "message.QueryProductDetailResp": { "type": "object", "properties": { "products": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.ProductDetail" } } } }, "message.QueryProductsInfoResp": { "type": "object", "properties": { "products": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductConfigInfo" } } } }, "message.QueryRolesResp": { "type": "object", "properties": { "roles": { "type": "array", "items": { "type": "string" } } } }, "message.QueryTenantReq": { "type": "object", "properties": { "page": { "description": "Current page location", "type": "integer" }, "pageSize": { "description": "Number of this request", "type": "integer" } } }, "message.QueryTenantResp": { "type": "object", "properties": { "tenants": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.TenantInfo" } } } }, "message.QueryUserReq": { "type": "object", "properties": { "page": { "description": "Current page location", "type": "integer" }, "pageSize": { "description": "Number of this request", "type": "integer" } } }, "message.QueryUserResp": { "type": "object", "properties": { "users": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.UserInfo" } } } }, "message.QueryVendorInfoResp": { "type": "object", "properties": { "vendors": { "type": "array", "items": { "$ref": "#/definitions/structs.VendorConfigInfo" } } } }, "message.QueryWorkFlowDetailResp": { "type": "object", "properties": { "info": { "$ref": "#/definitions/structs.WorkFlowInfo" }, "nodeNames": { "type": "array", "items": { "type": "string" } }, "nodes": { "type": "array", "items": { "$ref": "#/definitions/structs.WorkFlowNodeInfo" } } } }, "message.QueryWorkFlowsResp": { "type": "object", "properties": { "workFlows": { "type": "array", "items": { "$ref": "#/definitions/structs.WorkFlowInfo" } } } }, "message.StartWorkFlowReq": { "type": "object", "properties": { "workFlowId": { "type": "string" } } }, "message.StartWorkFlowResp": { "type": "object" }, "message.StopWorkFlowReq": { "type": "object", "properties": { "workFlowId": { "type": "string" } } }, "message.StopWorkFlowResp": { "type": "object" }, "message.UnbindRoleForUserReq": { "type": "object", "properties": { "role": { "type": "string" }, "userId": { "type": "string" } } }, "message.UnbindRoleForUserResp": { "type": "object" }, "message.UpdateDiskReq": { "type": "object", "properties": { "newDiskInfo": { "$ref": "#/definitions/structs.DiskInfo" } } }, "message.UpdateDiskResp": { "type": "object" }, "message.UpdateHostInfoReq": { "type": "object", "properties": { "newHostInfo": { "$ref": "#/definitions/structs.HostInfo" } } }, "message.UpdateHostInfoResp": { "type": "object" }, "message.UpdateHostReservedReq": { "type": "object", "properties": { "hostIds": { "type": "array", "items": { "type": "string" } }, "reserved": { "type": "boolean" } } }, "message.UpdateHostReservedResp": { "type": "object" }, "message.UpdateHostStatusReq": { "type": "object", "properties": { "hostIds": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" } } }, "message.UpdateHostStatusResp": { "type": "object" }, "message.UpdateParameterGroupReq": { "type": "object", "required": [ "params" ], "properties": { "addParams": { "type": "array", "items": { "$ref": "#/definitions/message.ParameterInfo" } }, "clusterSpec": { "type": "string", "example": "8C16G" }, "clusterVersion": { "type": "string", "example": "v5.0" }, "delParams": { "type": "array", "items": { "type": "string" }, "example": [ "1" ] }, "name": { "type": "string", "example": "8C16GV4_new" }, "note": { "type": "string", "example": "update param group" }, "params": { "type": "array", "items": { "$ref": "#/definitions/structs.ParameterGroupParameterSampleInfo" } } } }, "message.UpdateParameterGroupResp": { "type": "object", "properties": { "paramGroupId": { "type": "string", "example": "1" } } }, "message.UpdateProductsInfoReq": { "type": "object", "required": [ "products" ], "properties": { "products": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductConfigInfo" } } } }, "message.UpdateProductsInfoResp": { "type": "object" }, "message.UpdateSystemConfigReq": { "type": "object", "properties": { "configKey": { "type": "string" }, "configValue": { "type": "string" } } }, "message.UpdateSystemConfigResp": { "type": "object" }, "message.UpdateTenantOnBoardingStatusReq": { "type": "object", "properties": { "id": { "type": "string" }, "onBoardingStatus": { "type": "string" } } }, "message.UpdateTenantOnBoardingStatusResp": { "type": "object" }, "message.UpdateTenantProfileReq": { "type": "object", "properties": { "id": { "type": "string" }, "maxCluster": { "type": "integer" }, "maxCpu": { "type": "integer" }, "maxMemory": { "type": "integer" }, "maxStorage": { "type": "integer" }, "name": { "type": "string" } } }, "message.UpdateTenantProfileResp": { "type": "object" }, "message.UpdateUserPasswordReq": { "type": "object", "required": [ "password" ], "properties": { "id": { "type": "string" }, "password": { "type": "string" } } }, "message.UpdateUserPasswordResp": { "type": "object" }, "message.UpdateUserProfileReq": { "type": "object", "properties": { "email": { "type": "string" }, "nickname": { "type": "string" }, "phone": { "type": "string" } } }, "message.UpdateUserProfileResp": { "type": "object" }, "message.UpdateVendorInfoReq": { "type": "object", "properties": { "vendors": { "type": "array", "items": { "$ref": "#/definitions/structs.VendorConfigInfo" } } } }, "sqleditor.Columns": { "type": "object", "properties": { "col": { "type": "string" }, "data_type": { "type": "string" }, "nullable": { "type": "boolean" } } }, "sqleditor.CreateSQLFileRes": { "type": "object", "properties": { "id": { "type": "string" } } }, "sqleditor.CreateSessionReq": { "type": "object", "properties": { "clusterID": { "type": "string" }, "database": { "type": "string" } } }, "sqleditor.CreateSessionRes": { "type": "object", "properties": { "sessionID": { "type": "string" } } }, "sqleditor.DBMeta": { "type": "object", "properties": { "name": { "type": "string" }, "tables": { "type": "array", "items": { "$ref": "#/definitions/sqleditor.TablesMeta" } } } }, "sqleditor.DataRes": { "type": "object", "properties": { "columns": { "type": "array", "items": { "$ref": "#/definitions/sqleditor.Columns" } }, "end_time": { "type": "string" }, "execute_time": { "type": "string" }, "limit": { "type": "integer" }, "query": { "type": "string" }, "row_count": { "type": "integer" }, "rows": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } }, "start_time": { "type": "string" } } }, "sqleditor.DeleteSQLFileRes": { "type": "object" }, "sqleditor.ListSQLFileRes": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/sqleditor.SqlEditorFile" } }, "page": { "type": "integer" }, "pageSize": { "type": "integer" }, "total": { "type": "integer" } } }, "sqleditor.MetaRes": { "type": "object", "properties": { "clusterid": { "type": "string" }, "columns": { "type": "array", "items": { "$ref": "#/definitions/sqleditor.Columns" } }, "database": { "type": "string" }, "table": { "type": "string" } } }, "sqleditor.SQLFileReq": { "type": "object", "properties": { "cluster_id": { "type": "string" }, "content": { "type": "string" }, "database": { "type": "string" }, "name": { "type": "string" } } }, "sqleditor.SQLFileUpdateReq": { "type": "object", "properties": { "cluster_id": { "type": "string" }, "content": { "type": "string" }, "database": { "type": "string" }, "name": { "type": "string" }, "sqlEditorFileID": { "type": "string" } } }, "sqleditor.ShowSQLFileRes": { "type": "object", "properties": { "cluster_id": { "type": "string" }, "content": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "database": { "type": "string" }, "id": { "type": "string" }, "is_deleted": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" } } }, "sqleditor.SqlEditorFile": { "type": "object", "properties": { "cluster_id": { "type": "string" }, "content": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "string" }, "database": { "type": "string" }, "id": { "type": "string" }, "is_deleted": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "type": "string" }, "updated_by": { "type": "string" } } }, "sqleditor.StatementParam": { "type": "object", "properties": { "sessionid": { "type": "string" }, "sql": { "type": "string" } } }, "sqleditor.StatementsRes": { "type": "object", "properties": { "data": { "$ref": "#/definitions/sqleditor.DataRes" } } }, "sqleditor.TablesMeta": { "type": "object", "properties": { "columns": { "type": "array", "items": { "$ref": "#/definitions/sqleditor.Columns" } }, "name": { "type": "string" } } }, "sqleditor.UpdateSQLFileRes": { "type": "object" }, "structs.AsyncTaskWorkFlowInfo": { "type": "object", "properties": { "workFlowId": { "description": "Asynchronous task workflow ID", "type": "string" } } }, "structs.BackupRecord": { "type": "object", "properties": { "backupMethod": { "type": "string" }, "backupMode": { "type": "string" }, "backupTso": { "type": "string" }, "backupType": { "type": "string" }, "clusterId": { "type": "string" }, "createTime": { "type": "string" }, "deleteTime": { "type": "string" }, "endTime": { "type": "string" }, "filePath": { "type": "string" }, "id": { "type": "string" }, "size": { "type": "number" }, "startTime": { "type": "string" }, "status": { "type": "string" }, "updateTime": { "type": "string" } } }, "structs.BackupStrategy": { "type": "object", "properties": { "backupDate": { "type": "string" }, "clusterId": { "type": "string" }, "period": { "type": "string" } } }, "structs.CheckReportMeta": { "type": "object", "properties": { "checkID": { "type": "string" }, "createAt": { "type": "string" }, "creator": { "type": "string" }, "status": { "type": "string" }, "type": { "type": "string" } } }, "structs.ClusterInfo": { "type": "object", "properties": { "alertUrl": { "type": "string", "example": "http://127.0.0.1:9093" }, "backupFileUsage": { "$ref": "#/definitions/structs.Usage" }, "clusterId": { "type": "string" }, "clusterName": { "type": "string" }, "clusterType": { "type": "string" }, "clusterVersion": { "type": "string" }, "copies": { "description": "The number of copies of the newly created cluster data, consistent with the number of copies set in PD", "type": "integer" }, "cpuArchitecture": { "description": "X86/X86_64/ARM", "type": "string" }, "cpuUsage": { "$ref": "#/definitions/structs.Usage" }, "createTime": { "type": "string" }, "deleteTime": { "type": "string" }, "exclusive": { "description": "Whether the newly created cluster is exclusive to physical resources, when exclusive, a host will only deploy instances of the same cluster, which may result in poor resource utilization", "type": "boolean" }, "extranetConnectAddresses": { "type": "array", "items": { "type": "string" } }, "grafanaUrl": { "type": "string", "example": "http://127.0.0.1:3000" }, "intranetConnectAddresses": { "type": "array", "items": { "type": "string" } }, "maintainStatus": { "type": "string" }, "maintainWindow": { "type": "string" }, "memoryUsage": { "$ref": "#/definitions/structs.Usage" }, "region": { "type": "string" }, "relations": { "$ref": "#/definitions/structs.ClusterRelations" }, "role": { "type": "string" }, "status": { "type": "string" }, "storageUsage": { "$ref": "#/definitions/structs.Usage" }, "tags": { "type": "array", "items": { "type": "string" } }, "tls": { "type": "boolean" }, "updateTime": { "type": "string" }, "userId": { "type": "string" }, "vendor": { "description": "DBUser string `json:\"dbUser\"` //The username and password for the newly created database cluster, default is the root user, which is not valid for Data Migration clusters", "type": "string" }, "whitelist": { "type": "array", "items": { "type": "string" } } } }, "structs.ClusterInstanceInfo": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string" } }, "cpuUsage": { "$ref": "#/definitions/structs.Usage" }, "diskId": { "type": "string" }, "hostID": { "type": "string" }, "id": { "type": "string" }, "ioUtil": { "type": "number" }, "iops": { "type": "array", "items": { "type": "number" } }, "memoryUsage": { "$ref": "#/definitions/structs.Usage" }, "ports": { "type": "array", "items": { "type": "integer" } }, "role": { "type": "string" }, "spec": { "description": "??", "$ref": "#/definitions/structs.ProductSpecInfo" }, "status": { "type": "string" }, "storageUsage": { "$ref": "#/definitions/structs.Usage" }, "type": { "type": "string" }, "version": { "type": "string" }, "zone": { "description": "??", "$ref": "#/definitions/structs.ZoneFullInfo" } } }, "structs.ClusterInstanceParameterValue": { "type": "object", "properties": { "instanceId": { "type": "string" }, "value": { "type": "string" } } }, "structs.ClusterLogItem": { "type": "object", "properties": { "clusterId": { "type": "string", "example": "abc" }, "ext": { "type": "object", "additionalProperties": true }, "id": { "type": "string", "example": "zvadfwf" }, "index": { "type": "string", "example": "em-tidb-cluster-2021.09.23" }, "ip": { "type": "string", "example": "127.0.0.1" }, "level": { "type": "string", "example": "warn" }, "message": { "type": "string", "example": "tidb log" }, "module": { "type": "string", "example": "tidb" }, "sourceLine": { "type": "string", "example": "main.go:210" }, "timestamp": { "type": "string", "example": "2021-09-23 14:23:10" } } }, "structs.ClusterParameterInfo": { "type": "object", "properties": { "category": { "type": "string", "example": "basic" }, "createTime": { "type": "integer", "example": 1636698675 }, "defaultValue": { "type": "string", "example": "1" }, "description": { "type": "string", "example": "binlog cache size" }, "hasApply": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "hasReboot": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "instanceType": { "type": "string", "example": "tidb" }, "name": { "type": "string", "example": "binlog_size" }, "note": { "type": "string", "example": "binlog cache size" }, "paramId": { "type": "string", "example": "1" }, "range": { "type": "array", "items": { "type": "string" }, "example": [ "1", " 1000" ] }, "rangeType": { "type": "integer", "enum": [ 0, 1, 2 ], "example": 1 }, "readOnly": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "realValue": { "$ref": "#/definitions/structs.ParameterRealValue" }, "systemVariable": { "type": "string", "example": "log.log_level" }, "type": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "unit": { "type": "string", "example": "MB" }, "unitOptions": { "type": "array", "items": { "type": "string" }, "example": [ "KB", "MB", "GB" ] }, "updateSource": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "updateTime": { "type": "integer", "example": 1636698675 } } }, "structs.ClusterParameterSampleInfo": { "type": "object", "required": [ "paramId", "realValue" ], "properties": { "paramId": { "type": "string", "example": "1" }, "realValue": { "$ref": "#/definitions/structs.ParameterRealValue" } } }, "structs.ClusterRelations": { "type": "object", "properties": { "masters": { "type": "array", "items": { "type": "string" } }, "slaves": { "type": "array", "items": { "type": "string" } } } }, "structs.ClusterResourceInfo": { "type": "object", "properties": { "instanceResource": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterResourceParameterCompute" } }, "requestResourceMode": { "type": "string", "default": "SpecificZone", "enum": [ "SpecificZone", "SpecificHost" ] } } }, "structs.ClusterResourceParameterCompute": { "type": "object", "properties": { "componentType": { "description": "TiDB/TiKV/PD/TiFlash/CDC/DM-Master/DM-Worker", "type": "string" }, "resource": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterResourceParameterComputeResource" } }, "totalNodeCount": { "type": "integer" } } }, "structs.ClusterResourceParameterComputeResource": { "type": "object", "properties": { "count": { "type": "integer" }, "diskCapacity": { "type": "integer" }, "diskId": { "type": "string" }, "diskType": { "description": "NVMeSSD/SSD/SATA", "type": "string" }, "hostIp": { "type": "string" }, "specCode": { "description": "4C8G/8C16G ?", "type": "string" }, "zoneCode": { "type": "string" } } }, "structs.ClusterUpgradeVersionConfigItem": { "type": "object", "required": [ "instanceType", "name", "paramId", "value" ], "properties": { "instanceType": { "type": "string", "example": "pd-server" }, "name": { "type": "string", "example": "max-merge-region-size" }, "paramId": { "type": "string", "example": "1" }, "value": { "type": "string", "example": "20" } } }, "structs.ComponentInstanceResourceSpec": { "type": "object", "properties": { "cpu": { "type": "integer" }, "diskType": { "description": "eg: NVMeSSD/SSD/SATA", "type": "string" }, "id": { "description": "ID of the instance resource specification", "type": "string" }, "memory": { "description": "The amount of memory occupied by the instance, in GiB", "type": "integer" }, "name": { "description": "Name of the instance resource specification,eg: TiDB.c1.large", "type": "string" }, "zoneId": { "type": "string" }, "zoneName": { "type": "string" } } }, "structs.ComponentInstanceZoneWithSpecs": { "type": "object", "properties": { "specs": { "type": "array", "items": { "$ref": "#/definitions/structs.ComponentInstanceResourceSpec" } }, "zoneId": { "type": "string" }, "zoneName": { "type": "string" } } }, "structs.DataImportExportRecordInfo": { "type": "object", "properties": { "clusterId": { "type": "string" }, "comment": { "type": "string" }, "createTime": { "type": "string" }, "deleteTime": { "type": "string" }, "endTime": { "type": "string" }, "filePath": { "type": "string" }, "recordId": { "type": "string" }, "startTime": { "type": "string" }, "status": { "type": "string" }, "storageType": { "type": "string" }, "transportType": { "type": "string" }, "updateTime": { "type": "string" }, "zipName": { "type": "string" } } }, "structs.DiskInfo": { "type": "object", "properties": { "capacity": { "description": "Disk size, Unit: GB", "type": "integer" }, "diskId": { "type": "string" }, "hostId": { "type": "string" }, "name": { "description": "[sda/sdb/nvmep0...]", "type": "string" }, "path": { "description": "Disk mount path: [/data1]", "type": "string" }, "status": { "description": "Disk Status, 0 for available, 1 for inused", "type": "string" }, "type": { "description": "Disk type: [nvme-ssd/ssd/sata]", "type": "string" } } }, "structs.HierarchyTreeNode": { "type": "object", "properties": { "code": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "subNodes": { "type": "array", "items": { "$ref": "#/definitions/structs.HierarchyTreeNode" } } } }, "structs.HostInfo": { "type": "object", "properties": { "arch": { "description": "x86 or arm64", "type": "string" }, "availableDiskCount": { "description": "available disk count which could be used for allocation", "type": "integer" }, "az": { "type": "string" }, "clusterType": { "description": "What cluster is the host used for? [database/data migration]", "type": "string" }, "cpuCores": { "description": "Host cpu cores spec, init while importing", "type": "integer" }, "createTime": { "type": "integer" }, "diskType": { "description": "Disk type of this host [SATA/SSD/NVMeSSD]", "type": "string" }, "disks": { "type": "array", "items": { "$ref": "#/definitions/structs.DiskInfo" } }, "hostId": { "type": "string" }, "hostName": { "type": "string" }, "instances": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "ip": { "type": "string" }, "kernel": { "type": "string" }, "loadStat": { "description": "Host load stat, Loadless, Inused, Exhaust, etc", "type": "string" }, "memory": { "description": "Host memory, init while importing", "type": "integer" }, "nic": { "description": "Host network type: 1GE or 10GE", "type": "string" }, "os": { "type": "string" }, "passwd": { "type": "string" }, "purpose": { "description": "What Purpose is the host used for? [compute/storage/schedule]", "type": "string" }, "rack": { "type": "string" }, "region": { "type": "string" }, "reserved": { "description": "Whether this host is reserved - will not be allocated", "type": "boolean" }, "spec": { "description": "Host Spec, init while importing", "type": "string" }, "sshPort": { "type": "integer" }, "status": { "description": "Host status, Online, Offline, Failed, Deleted, etc", "type": "string" }, "sysLabels": { "type": "array", "items": { "type": "string" } }, "traits": { "description": "Traits of labels", "type": "integer" }, "updateTime": { "type": "integer" }, "usedCpuCores": { "description": "Unused CpuCore, used for allocation", "type": "integer" }, "usedMemory": { "description": "Unused memory size, Unit:GiB, used for allocation", "type": "integer" }, "userName": { "type": "string" }, "vendor": { "type": "string" } } }, "structs.Index": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "unit": { "type": "string" }, "value": { "type": "object" } } }, "structs.ParameterGroupParameterInfo": { "type": "object", "properties": { "category": { "type": "string", "example": "basic" }, "createTime": { "type": "integer", "example": 1636698675 }, "defaultValue": { "type": "string", "example": "1" }, "description": { "type": "string", "example": "binlog cache size" }, "hasApply": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "hasReboot": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "instanceType": { "type": "string", "example": "tidb" }, "name": { "type": "string", "example": "binlog_size" }, "note": { "type": "string", "example": "binlog cache size" }, "paramId": { "type": "string", "example": "1" }, "range": { "type": "array", "items": { "type": "string" }, "example": [ "1", " 1000" ] }, "rangeType": { "type": "integer", "enum": [ 0, 1, 2 ], "example": 1 }, "readOnly": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "systemVariable": { "type": "string", "example": "log.log_level" }, "type": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "unit": { "type": "string", "example": "MB" }, "unitOptions": { "type": "array", "items": { "type": "string" }, "example": [ "KB", "MB", "GB" ] }, "updateSource": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "updateTime": { "type": "integer", "example": 1636698675 } } }, "structs.ParameterGroupParameterSampleInfo": { "type": "object", "required": [ "defaultValue", "paramId" ], "properties": { "defaultValue": { "type": "string", "example": "1" }, "note": { "type": "string", "example": "binlog cache size" }, "paramId": { "type": "string", "example": "123" } } }, "structs.ParameterRealValue": { "type": "object", "properties": { "clusterValue": { "type": "string" }, "instanceValue": { "type": "array", "items": { "$ref": "#/definitions/structs.ClusterInstanceParameterValue" } } } }, "structs.Product": { "type": "object", "properties": { "arch": { "type": "string" }, "id": { "description": "The ID of the product", "type": "string" }, "internal": { "type": "integer" }, "name": { "description": "the Name of the product", "type": "string" }, "regionId": { "type": "string" }, "regionName": { "type": "string" }, "status": { "type": "string" }, "vendorId": { "description": "the vendor ID of the vendor, e.go AWS", "type": "string" }, "vendorName": { "description": "the Vendor name of the vendor, e.g AWS/Aliyun", "type": "string" }, "version": { "type": "string" } } }, "structs.ProductComponentPropertyWithZones": { "type": "object", "properties": { "availableZones": { "description": "Information on the specifications of the resources online for the running of product components,organized by different Zone", "type": "array", "items": { "$ref": "#/definitions/structs.ComponentInstanceZoneWithSpecs" } }, "endPort": { "type": "integer" }, "id": { "description": "ID of the product component, globally unique", "type": "string" }, "maxInstance": { "description": "Maximum number of instances when the product component is running, e.g. PD can run up to 7 instances, other components have no upper limit", "type": "integer" }, "maxPort": { "type": "integer" }, "minInstance": { "description": "Minimum number of instances of product components at runtime, e.g. at least 1 instance of PD, at least 3 instances of TiKV", "type": "integer" }, "name": { "description": "Name of the product component, globally unique", "type": "string" }, "purposeType": { "description": "The type of resources required by the product component at runtime, e.g. storage class", "type": "string" }, "startPort": { "type": "integer" }, "suggestedInstancesCount": { "type": "array", "items": { "type": "integer" } } } }, "structs.ProductConfigInfo": { "type": "object", "properties": { "components": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductComponentPropertyWithZones" } }, "productId": { "type": "string" }, "productName": { "type": "string" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/structs.SpecificVersionProduct" } } } }, "structs.ProductDetail": { "type": "object", "properties": { "id": { "description": "The ID of the product consists of the product ID", "type": "string" }, "name": { "description": "The name of the product consists of the product name and the version", "type": "string" }, "versions": { "description": "Organize product information by version", "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.ProductVersion" } } } }, "structs.ProductSpecInfo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "structs.ProductUpgradePathItem": { "type": "object", "required": [ "upgradeType", "versions" ], "properties": { "upgradeType": { "type": "string", "enum": [ "in-place", "migration" ] }, "upgradeWays": { "type": "array", "items": { "type": "string" }, "example": [ "offline", "online" ] }, "versions": { "type": "array", "items": { "type": "string" }, "example": [ "v5.3.0", "v5.4.0" ] } } }, "structs.ProductUpgradeVersionConfigDiffItem": { "type": "object", "required": [ "category", "currentValue", "instanceType", "name", "paramId", "range", "rangeType", "suggestValue", "type", "unit", "unitOptions" ], "properties": { "category": { "type": "string", "example": "basic" }, "currentValue": { "type": "string", "example": "20" }, "description": { "type": "string", "example": "desc for max-merge-region-size" }, "instanceType": { "type": "string", "example": "pd-server" }, "name": { "type": "string", "example": "max-merge-region-size" }, "paramId": { "type": "string", "example": "1" }, "range": { "type": "array", "items": { "type": "string" }, "example": [ "1", " 1000" ] }, "rangeType": { "type": "integer", "enum": [ 0, 1, 2 ], "example": 1 }, "suggestValue": { "type": "string", "example": "30" }, "type": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "unit": { "type": "string", "example": "MB" }, "unitOptions": { "type": "array", "items": { "type": "string" }, "example": [ "KB", "MB", "GB" ] } } }, "structs.ProductVersion": { "type": "object", "properties": { "arch": { "description": "Arch information of the product, e.g. X86/X86_64", "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductComponentPropertyWithZones" } } }, "version": { "description": "Version information of the product, e.g. v5.0.0", "type": "string" } } }, "structs.ProductWithVersions": { "type": "object", "properties": { "productId": { "type": "string" }, "productName": { "type": "string" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/structs.SpecificVersionProduct" } } } }, "structs.RbacPermission": { "type": "object", "properties": { "action": { "type": "string" }, "resource": { "type": "string" } } }, "structs.RegionConfigInfo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "zones": { "type": "array", "items": { "$ref": "#/definitions/structs.ZoneInfo" } } } }, "structs.RegionInfo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "structs.ResourceStockCheckResult": { "type": "object", "properties": { "componentName": { "type": "string" }, "componentType": { "type": "string" }, "count": { "type": "integer" }, "diskCapacity": { "type": "integer" }, "diskId": { "type": "string" }, "diskType": { "description": "NVMeSSD/SSD/SATA", "type": "string" }, "enough": { "type": "boolean" }, "hostIp": { "type": "string" }, "specCode": { "description": "4C8G/8C16G ?", "type": "string" }, "zoneCode": { "type": "string" } } }, "structs.SpecInfo": { "type": "object", "properties": { "cpu": { "type": "integer" }, "diskType": { "description": "eg: NVMeSSD/SSD/SATA", "type": "string" }, "id": { "description": "ID of the resource specification", "type": "string" }, "memory": { "description": "The amount of memory occupied by the instance, in GiB", "type": "integer" }, "name": { "description": "Name of the resource specification,eg: TiDB.c1.large", "type": "string" }, "purposeType": { "description": "eg:Compute/Storage/Schedule", "type": "string" } } }, "structs.SpecificVersionProduct": { "type": "object", "properties": { "arch": { "type": "string" }, "productId": { "type": "string" }, "version": { "type": "string" } } }, "structs.Stocks": { "type": "object", "properties": { "freeCpuCores": { "type": "integer" }, "freeDiskCapacity": { "type": "integer" }, "freeDiskCount": { "type": "integer" }, "freeHostCount": { "type": "integer" }, "freeMemory": { "type": "integer" }, "zone": { "type": "string" } } }, "structs.SystemInfo": { "type": "object", "properties": { "currentVersionId": { "type": "string" }, "lastVersionId": { "type": "string" }, "productComponentsInitialized": { "type": "boolean" }, "productVersionsInitialized": { "type": "boolean" }, "state": { "type": "string" }, "supportedProducts": { "type": "array", "items": { "$ref": "#/definitions/structs.ProductWithVersions" } }, "supportedVendors": { "type": "array", "items": { "$ref": "#/definitions/structs.VendorInfo" } }, "systemLogo": { "type": "string" }, "systemName": { "type": "string" }, "vendorSpecsInitialized": { "type": "boolean" }, "vendorZonesInitialized": { "type": "boolean" } } }, "structs.SystemVersionInfo": { "type": "object", "properties": { "desc": { "type": "string" }, "releaseNote": { "type": "string" }, "versionId": { "type": "string" } } }, "structs.TenantInfo": { "type": "object", "properties": { "createAt": { "type": "string" }, "creator": { "type": "string" }, "id": { "type": "string" }, "maxCluster": { "type": "integer" }, "maxCpu": { "type": "integer" }, "maxMemory": { "type": "integer" }, "maxStorage": { "type": "integer" }, "name": { "type": "string" }, "onBoardingStatus": { "type": "string" }, "status": { "type": "string" }, "updateAt": { "type": "string" } } }, "structs.Usage": { "type": "object", "properties": { "total": { "type": "number" }, "usageRate": { "type": "number" }, "used": { "type": "number" } } }, "structs.UserInfo": { "type": "object", "properties": { "createAt": { "type": "string" }, "creator": { "type": "string" }, "defaultTenantId": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "names": { "type": "array", "items": { "type": "string" } }, "nickname": { "type": "string" }, "phone": { "type": "string" }, "status": { "type": "string" }, "tenantIds": { "type": "array", "items": { "type": "string" } }, "updateAt": { "type": "string" } } }, "structs.VendorConfigInfo": { "type": "object", "properties": { "id": { "description": "The value of the VendorID is similar to AWS", "type": "string" }, "name": { "description": "The value of the Name is similar to AWS", "type": "string" }, "regions": { "type": "array", "items": { "$ref": "#/definitions/structs.RegionConfigInfo" } }, "specs": { "type": "array", "items": { "$ref": "#/definitions/structs.SpecInfo" } } } }, "structs.VendorInfo": { "type": "object", "properties": { "id": { "description": "The value of the VendorID is similar to AWS", "type": "string" }, "name": { "description": "The value of the Name is similar to AWS", "type": "string" } } }, "structs.VendorWithRegion": { "type": "object", "properties": { "id": { "description": "The value of the VendorID is similar to AWS", "type": "string" }, "name": { "description": "The value of the Name is similar to AWS", "type": "string" }, "regions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/structs.RegionInfo" } } } }, "structs.WorkFlowInfo": { "type": "object", "properties": { "bizId": { "type": "string" }, "bizType": { "type": "string" }, "createTime": { "type": "string" }, "deleteTime": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": [ "Initializing", "Processing", "Finished", "Error", "Canceled" ] }, "updateTime": { "type": "string" } } }, "structs.WorkFlowNodeInfo": { "type": "object", "properties": { "endTime": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "parameters": { "type": "string" }, "result": { "type": "string" }, "startTime": { "type": "string" }, "status": { "type": "string", "enum": [ "Initializing", "Processing", "Finished", "Error", "Canceled" ] } } }, "structs.ZoneFullInfo": { "type": "object", "properties": { "comment": { "type": "string" }, "regionId": { "description": "The value of the RegionID is similar to CN-HANGZHOU", "type": "string" }, "regionName": { "description": "The value of the Name is similar to East China(Hangzhou)", "type": "string" }, "vendorId": { "description": "The value of the VendorID is similar to AWS", "type": "string" }, "vendorName": { "description": "The value of the Name is similar to AWS", "type": "string" }, "zoneId": { "description": "The value of the ZoneID is similar to CN-HANGZHOU-H", "type": "string" }, "zoneName": { "description": "The value of the Name is similar to Hangzhou(H)", "type": "string" } } }, "structs.ZoneInfo": { "type": "object", "properties": { "comment": { "type": "string" }, "zoneId": { "description": "The value of the ZoneID is similar to CN-HANGZHOU-H", "type": "string" }, "zoneName": { "description": "The value of the Name is similar to Hangzhou(H)", "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }