{ "swagger": "2.0", "info": { "description": "OceanBase Dashboard", "title": "OceanBase Dashboard API", "contact": {}, "version": "1.0" }, "basePath": "/api/v1", "paths": { "/api/v1/alarm/alert/alerts": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alerts, filter with alarm objects, serverity, time and keywords.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "List alerts", "operationId": "ListAlerts", "parameters": [ { "description": "alert filter", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/alert.AlertFilter" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/alert.Alert" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/receiver/receivers": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create or update alarm receiver.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Create or update alarm receiver", "operationId": "CreateOrUpdateReceiver", "parameters": [ { "description": "receiver", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/receiver.Receiver" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/receiver.Receiver" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alarm receivers, do not support filter, list all receivers at once.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "List alarm receivers", "operationId": "ListReceivers", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/receiver.Receiver" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/receiver/receivers/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alarm receiver, query by receiver name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Get alarm receiver", "operationId": "GetReceiver", "parameters": [ { "type": "string", "description": "rule name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/receiver.Receiver" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alarm receiver by receiver name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Delete alarm receiver", "operationId": "DeleteReceiver", "parameters": [ { "type": "string", "description": "receiver name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/receiver/templates": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alarm receiver templates.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "List alarm receiver templates", "operationId": "ListReceiverTemplates", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/receiver.Template" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/receiver/templates/{type}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alarm receiver template.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Get alarm receiver template", "operationId": "GetReceiverTemplate", "parameters": [ { "type": "string", "description": "receiver type", "name": "type", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/receiver.Template" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/route/routes": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create or update alarm route.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Create or update alarm route", "operationId": "CreateOrUpdateRoute", "parameters": [ { "description": "route", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/route.Route" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/route.RouteResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alarm routes, do not support filter, list all routes at once.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "List alarm routes", "operationId": "ListRoutes", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/route.RouteResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/route/routes/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alarm route, query by route name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Get alarm route", "operationId": "GetRoute", "parameters": [ { "type": "string", "description": "route id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/route.RouteResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alarm channel by channel name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Delete alarm channel", "operationId": "DeleteRoute", "parameters": [ { "type": "string", "description": "route id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/rule/rules": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create or update alarm rule.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Create or update alarm rule", "operationId": "CreateOrUpdateRule", "parameters": [ { "description": "rule", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/rule.Rule" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/rule.RuleResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alarm rules, filter with alarm objects type, serverity and keywords.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "List alarm rules", "operationId": "ListRules", "parameters": [ { "description": "rule filter", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/rule.RuleFilter" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/rule.RuleResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/rule/rules/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alarm rule, query by rule name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Get alarm rule", "operationId": "GetRule", "parameters": [ { "type": "string", "description": "rule name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/rule.RuleResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alarm rule by rule name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Delete alarm rule", "operationId": "DeleteRule", "parameters": [ { "type": "string", "description": "rule name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/silence/silencers": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create or update alarm silencer.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Create or update alarm silencer", "operationId": "CreateOrUpdateSilencer", "parameters": [ { "description": "silencer", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/silence.SilencerParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/silence.SilencerResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alarm silencers, filter with alarm objects and keywords.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "List alarm silencers", "operationId": "ListSilencers", "parameters": [ { "description": "silencer filter", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/silence.SilencerFilter" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/silence.SilencerResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/alarm/silence/silencers/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get alarm silencer, query by silencer id.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Get alarm silencer", "operationId": "GetSilencer", "parameters": [ { "type": "string", "description": "silencer id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/silence.SilencerResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete alarm silencer by silencer id.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Delete alarm silencer", "operationId": "DeleteSilencer", "parameters": [ { "type": "string", "description": "silencer id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/cluster/events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list k8s events", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "list k8s event", "operationId": "ListK8sEvents", "parameters": [ { "enum": [ "OBCLUSTER", "OBTENANT", "OBBACKUPPOLICY" ], "type": "string", "description": "related object types", "name": "objectType", "in": "query" }, { "enum": [ "NORMAL", "WARNING" ], "type": "string", "description": "event level", "name": "type", "in": "query" }, { "type": "string", "description": "Object name", "name": "name", "in": "query" }, { "type": "string", "description": "Namespace", "name": "namespace", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.K8sEvent" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/cluster/namespaces": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list k8s namespaces", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "list k8s namespaces", "operationId": "ListK8sNamespaces", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.Namespace" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "create k8s namespace", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "create k8s namespace", "operationId": "CreateK8sNamespace", "parameters": [ { "description": "create obcluster request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.CreateNamespaceParam" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/cluster/nodes": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list k8s nodes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "list k8s nodes", "operationId": "ListK8sNodes", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.K8sNode" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/cluster/storageClasses": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list k8s storage classes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "list k8s storage classes", "operationId": "ListK8sStorageClasses", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.StorageClass" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/conn/{terminalId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Connect to oceanbase database in websocket", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Terminal" ], "summary": "Connect to oceanbase database", "operationId": "ConnectDatabase", "parameters": [ { "type": "string", "description": "terminalId", "name": "terminalId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBConnection" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/info": { "get": { "description": "Get process info of OceanBase Dashboard, including process name etc.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Info" ], "summary": "Get process info", "operationId": "GetProcessInfo", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.DashboardInfo" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/login": { "post": { "description": "User login and return access token with cookie.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "User login", "operationId": "Login", "parameters": [ { "description": "login", "name": "loginInfo", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.LoginParam" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "User logout and clear session.", "produces": [ "application/json" ], "tags": [ "User" ], "summary": "User logout", "operationId": "Logout", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/metrics": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list all metrics meta info, return by groups", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Metric" ], "summary": "list all metrics", "operationId": "ListAllMetrics", "parameters": [ { "enum": [ "OBCLUSTER", "OBTENANT" ], "type": "string", "description": "metrics scope", "name": "scope", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.MetricClass" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/metrics/query": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "query metric data", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Metric" ], "summary": "query metrics", "operationId": "QueryMetrics", "parameters": [ { "description": "metric query request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.MetricQuery" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.MetricData" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list obclusters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "list obclusters", "operationId": "ListOBClusters", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.OBClusterOverview" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "create obcluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "create obcluster", "operationId": "CreateOBCluster", "parameters": [ { "description": "create obcluster request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.CreateOBClusterParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBCluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/namespace/{namespace}/name/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get obcluster detailed info", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "get obcluster", "operationId": "GetOBCluster", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBCluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "upgrade obcluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "upgrade obcluster", "operationId": "UpgradeOBCluster", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "description": "upgrade obcluster request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.UpgradeOBClusterParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBCluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete obcluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "delete obcluster", "operationId": "DeleteOBCluster", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/namespace/{namespace}/name/{name}/obzones": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "add obzone", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "add obzone", "operationId": "AddOBZone", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "description": "add obzone request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ZoneTopology" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBCluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/namespace/{namespace}/name/{name}/obzones/{obzoneName}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete obzone", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "delete obzone", "operationId": "DeleteOBZone", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "obzone name", "name": "obzoneName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBCluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/namespace/{namespace}/name/{name}/obzones/{obzoneName}/scale": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "scale observer", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "scale observer", "operationId": "ScaleOBServer", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "obzone name", "name": "obzoneName", "in": "path", "required": true }, { "description": "scale observer request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ScaleOBServerParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBCluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/namespace/{namespace}/name/{name}/terminal": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create oceanbase cluster connection terminal", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Terminal" ], "summary": "Create oceanbase cluster connection", "operationId": "CreateOBClusterConnection", "parameters": [ { "type": "string", "description": "namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBConnection" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/statistic": { "get": { "description": "get obcluster statistic info", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "get obcluster statistic", "operationId": "GetOBClusterStatistic", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.OBClusterStatistic" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/{namespace}/{name}/related-events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list related events of specific obcluster, including obzone and observer.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "list related events", "operationId": "ListOBClusterRelatedEvents", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.K8sEvent" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obclusters/{namespace}/{name}/resource-usages": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list resource usages of specific obcluster, such as cpu, memory, storage, etc. The old router ending with /essential-parameters is deprecated", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "list resource usages, the old router ending with /essential-parameters is deprecated", "operationId": "ListOBClusterResources", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBClusterResources" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obproxies": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list obproxies", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBProxy" ], "summary": "list obproxies", "operationId": "ListOBProxies", "parameters": [ { "type": "string", "description": "ns", "name": "ns", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/obproxy.OBProxyOverview" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create OBProxy with the specified parameters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBProxy" ], "summary": "Create OBProxy", "operationId": "CreateOBPROXY", "parameters": [ { "description": "Request body for creating obproxy", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/obproxy.CreateOBProxyParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/obproxy.OBProxy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obproxies/{namespace}/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get OBProxy by namespace and name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBProxy" ], "summary": "Get OBProxy", "operationId": "GetOBProxy", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/obproxy.OBProxy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete OBProxy by namespace and name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBProxy" ], "summary": "Delete OBProxy", "operationId": "DeleteOBProxy", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/obproxy.OBProxy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "security": [ { "ApiKeyAuth": [] } ], "description": "Patch OBProxy with the specified parameters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBProxy" ], "summary": "Patch OBProxy", "operationId": "PatchOBProxy", "parameters": [ { "description": "Request body for patching obproxy", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/obproxy.PatchOBProxyParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/obproxy.OBProxy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all tenants and return them", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "List all tenants", "operationId": "ListAllTenants", "parameters": [ { "type": "string", "description": "obcluster to filter", "name": "obcluster", "in": "query" }, { "type": "string", "description": "namespace to filter", "name": "ns", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.OBTenantOverview" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create an obtenant in a specific namespace, passwords should be encrypted by AES", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Create tenant", "operationId": "CreateTenant", "parameters": [ { "description": "create obtenant request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.CreateOBTenantParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/statistic": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List statistics information of tenants", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "List statistics information of tenants", "operationId": "GetOBTenantStatistic", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.OBTenantStatistic" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get an obtenant in a specific namespace", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Get tenant", "operationId": "GetTenant", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete an obtenant in a specific namespace, ask user to confrim the deletion carefully", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Delete tenant", "operationId": "DeleteTenant", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "security": [ { "ApiKeyAuth": [] } ], "description": "Patch tenant's configuration", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Patch tenant's configuration", "operationId": "PatchTenant", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "description": "patch tenant body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.PatchTenant" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/backup/{type}/jobs": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List backup jobs of specific tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "List backup jobs of specific tenant", "operationId": "ListBackupJobs", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "enum": [ "FULL", "INC", "CLEAN", "ARCHIVE" ], "type": "string", "description": "backup job type", "name": "type", "in": "path", "required": true }, { "type": "integer", "default": 10, "description": "limit", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.BackupJob" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/backupPolicy": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get backup policy of specific tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Get backup policy of specific tenant", "operationId": "GetBackupPolicy", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.BackupPolicy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create backup policy of specific tenant, passwords should be encrypted by AES", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Create backup policy of specific tenant", "operationId": "CreateBackupPolicy", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "description": "create backup policy request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.CreateBackupPolicy" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.BackupPolicy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete backup policy of specific tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Delete backup policy of specific tenant", "operationId": "DeleteBackupPolicy", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "type": "string", "default": "false", "description": "force delete", "name": "force", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update backup policy of specific tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Update backup policy of specific tenant", "operationId": "UpdateBackupPolicy", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "description": "update backup policy request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.UpdateBackupPolicy" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.BackupPolicy" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/logreplay": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Replay standby log of specific standby tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Replay standby log of specific standby tenant", "operationId": "ReplayStandbyLog", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "description": "target timestamp to replay to", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ReplayStandbyLog" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/pools/{zoneName}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create an obtenant pool in a specific namespace", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Create obtenant pool", "operationId": "CreateOBTenantPool", "parameters": [ { "description": "create obtenant pool request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.TenantPoolSpec" } }, { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "obzone name", "name": "zoneName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete an obtenant pool in a specific namespace", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Delete obtenant pool", "operationId": "DeleteOBTenantPool", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "obzone name", "name": "zoneName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } }, "patch": { "security": [ { "ApiKeyAuth": [] } ], "description": "Patch an obtenant pool in a specific namespace", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Patch obtenant pool", "operationId": "PatchOBTenantPool", "parameters": [ { "description": "patch obtenant pool request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.TenantPoolSpec" } }, { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "obzone name", "name": "zoneName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/related-events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List related events of specific tenant, including restore, backup and backup policy events", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "List related events of specific tenant", "operationId": "ListOBTenantRelatedEvents", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.K8sEvent" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/role": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change tenant role of specific tenant, if a tenant is a standby tenant, it can be changed to primary tenant, vice versa", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Change tenant role of specific tenant", "operationId": "ChangeTenantRole", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "description": "target role to change to", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ChangeTenantRole" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/terminal": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create oceanbase tenant connection terminal", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Terminal" ], "summary": "Create oceanbase tenant connection", "operationId": "CreateOBTenantConnection", "parameters": [ { "type": "string", "description": "namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBConnection" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/userCredentials": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change root password of specific tenant, encrypted by AES", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Change root password of specific tenant", "operationId": "ChangeUserPassword", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true }, { "description": "new password", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ChangeUserPassword" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/obtenants/{namespace}/{name}/version": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Upgrade tenant compatibility version of specific tenant to match the version of cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Upgrade tenant compatibility version of specific tenant", "operationId": "UpgradeTenantVersion", "parameters": [ { "type": "string", "description": "obtenant namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obtenant name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.OBTenantDetail" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } }, "/api/v1/statistics": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get statistic data", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Info" ], "summary": "get statistic data", "operationId": "GetStatistics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.StatisticData" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/response.APIResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/response.APIResponse" } } } } } }, "definitions": { "alarm.Matcher": { "type": "object", "properties": { "isEqual": { "type": "boolean" }, "isRegex": { "type": "boolean" }, "name": { "type": "string" }, "value": { "type": "string" } } }, "alarm.Serverity": { "type": "string", "enum": [ "critical", "warning", "caution", "info" ], "x-enum-varnames": [ "ServerityCritical", "ServerityWarning", "ServerityCaution", "ServerityInfo" ] }, "alert.Alert": { "type": "object", "required": [ "endsAt", "fingerprint", "instance", "rule", "serverity", "startsAt", "status", "updatedAt" ], "properties": { "description": { "type": "string" }, "endsAt": { "type": "integer" }, "fingerprint": { "type": "string" }, "instance": { "$ref": "#/definitions/oceanbase.OBInstance" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "rule": { "type": "string" }, "serverity": { "$ref": "#/definitions/alarm.Serverity" }, "startsAt": { "type": "integer" }, "status": { "$ref": "#/definitions/alert.Status" }, "summary": { "type": "string" }, "updatedAt": { "type": "integer" } } }, "alert.AlertFilter": { "type": "object", "properties": { "endTime": { "type": "integer" }, "instance": { "$ref": "#/definitions/oceanbase.OBInstance" }, "keyword": { "type": "string" }, "serverity": { "$ref": "#/definitions/alarm.Serverity" }, "startTime": { "type": "integer" } } }, "alert.State": { "type": "string", "enum": [ "active", "unprocessed", "suppressed" ], "x-enum-varnames": [ "StateActive", "StateUnprocessed", "StateSuppressed" ] }, "alert.Status": { "type": "object", "required": [ "inhibitedBy", "silencedBy", "state" ], "properties": { "inhibitedBy": { "type": "array", "items": { "type": "string" } }, "silencedBy": { "type": "array", "items": { "type": "string" } }, "state": { "$ref": "#/definitions/alert.State" } } }, "common.AffinitySpec": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "$ref": "#/definitions/common.AffinityType" }, "value": { "type": "string" } } }, "common.AffinityType": { "type": "string", "enum": [ "NODE", "POD", "POD_ANTI" ], "x-enum-varnames": [ "NodeAffinityType", "PodAffinityType", "PodAntiAffinityType" ] }, "common.ClusterMode": { "type": "string", "enum": [ "NORMAL", "STANDALONE", "SERVICE" ], "x-enum-varnames": [ "ClusterModeNormal", "ClusterModeStandalone", "ClusterModeService" ] }, "common.KVPair": { "type": "object", "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "common.ResourceSpec": { "type": "object", "properties": { "cpu": { "type": "integer" }, "memory": { "type": "integer" } } }, "common.StorageSpec": { "type": "object", "properties": { "size": { "type": "integer" }, "storageClass": { "type": "string" } } }, "models.K8sEvent": { "type": "object", "properties": { "count": { "type": "integer" }, "firstTimestamp": { "type": "string" }, "kind": { "type": "string" }, "lastTimestamp": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "reason": { "type": "string" }, "resourceName": { "type": "string" } } }, "models.OBBackupPolicy": { "type": "object", "properties": { "archiveDestType": { "type": "string" }, "archiveSwitchPieceInterval": { "type": "string" }, "bakDataDestType": { "type": "string" }, "bakDataFullCrontab": { "type": "string" }, "bakDataIncrCrontab": { "type": "string" }, "encryptBakData": { "type": "boolean" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "runningFlow": { "type": "string" }, "runningTask": { "type": "string" }, "status": { "type": "string" }, "taskStatus": { "type": "string" }, "tenantCR": { "type": "string" }, "tenantName": { "type": "string" }, "uid": { "type": "string" } } }, "models.OBCluster": { "type": "object", "properties": { "clusterId": { "type": "integer" }, "clusterMode": { "type": "string" }, "clusterName": { "type": "string" }, "configuredBackupVolume": { "type": "boolean" }, "configuredMonitor": { "type": "boolean" }, "cpu": { "type": "integer" }, "dataStorage": { "$ref": "#/definitions/models.StorageSpec" }, "image": { "type": "string" }, "independentPVC": { "type": "boolean" }, "memory": { "type": "integer" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "redoLogStorage": { "$ref": "#/definitions/models.StorageSpec" }, "runningFlow": { "type": "string" }, "runningTask": { "type": "string" }, "singlePVC": { "type": "boolean" }, "status": { "type": "string" }, "sysLogStorage": { "$ref": "#/definitions/models.StorageSpec" }, "taskStatus": { "type": "string" }, "uid": { "type": "string" }, "zones": { "type": "array", "items": { "$ref": "#/definitions/models.OBZoneStatus" } } } }, "models.OBServer": { "type": "object", "properties": { "clusterCR": { "type": "string" }, "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "cni": { "type": "string" }, "image": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "podIPHash": { "type": "string" }, "podPhase": { "type": "string" }, "runningFlow": { "type": "string" }, "runningTask": { "type": "string" }, "serviceIPHash": { "type": "string" }, "status": { "type": "string" }, "taskStatus": { "type": "string" }, "uid": { "type": "string" }, "zoneName": { "type": "string" } } }, "models.OBTenant": { "type": "object", "properties": { "archiveDestType": { "type": "string" }, "bakDataDestType": { "type": "string" }, "clusterName": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "primaryTenant": { "type": "string" }, "runningFlow": { "type": "string" }, "runningTask": { "type": "string" }, "status": { "type": "string" }, "taskStatus": { "type": "string" }, "tenantName": { "type": "string" }, "tenantRole": { "type": "string" }, "topology": { "type": "array", "items": { "$ref": "#/definitions/models.OBTenantResourcePool" } }, "uid": { "type": "string" }, "unitNumber": { "type": "integer" } } }, "models.OBTenantResourcePool": { "type": "object", "properties": { "IOPSWeight": { "type": "integer" }, "logDiskSize": { "type": "integer" }, "maxCPU": { "type": "integer" }, "maxIOPS": { "type": "integer" }, "memorySize": { "type": "integer" }, "minCPU": { "type": "integer" }, "minIOPS": { "type": "integer" }, "priority": { "type": "integer" }, "type": { "type": "string" }, "unitNumber": { "type": "integer" }, "zone": { "type": "string" } } }, "models.OBZone": { "type": "object", "properties": { "clusterCR": { "type": "string" }, "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "image": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "runningFlow": { "type": "string" }, "runningTask": { "type": "string" }, "status": { "type": "string" }, "taskStatus": { "type": "string" }, "uid": { "type": "string" } } }, "models.OBZoneStatus": { "type": "object", "properties": { "replica": { "type": "integer" }, "status": { "type": "string" }, "zoneName": { "type": "string" } } }, "models.StorageSpec": { "type": "object", "properties": { "storageClass": { "type": "string" }, "storageSize": { "type": "integer" } } }, "obproxy.CreateOBProxyParam": { "type": "object", "required": [ "image", "name", "namespace", "obCluster", "proxyClusterName", "proxySysPassword", "replicas", "resource", "serviceType" ], "properties": { "image": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obCluster": { "$ref": "#/definitions/obproxy.K8sObject" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "proxyClusterName": { "type": "string" }, "proxySysPassword": { "description": "Password should be encrypted", "type": "string" }, "replicas": { "type": "integer" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" }, "serviceType": { "type": "string", "default": "ClusterIP", "enum": [ "ClusterIP", "NodePort", "LoadBalancer", "ExternalName" ], "example": "ClusterIP" } } }, "obproxy.K8sObject": { "type": "object", "required": [ "name", "namespace" ], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } }, "obproxy.OBProxy": { "type": "object", "required": [ "creationTime", "image", "name", "namespace", "obCluster", "parameters", "pods", "proxyClusterName", "proxySysSecret", "replicas", "resource", "service", "serviceIp", "status" ], "properties": { "creationTime": { "type": "string" }, "image": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obCluster": { "$ref": "#/definitions/obproxy.K8sObject" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "pods": { "type": "array", "items": { "$ref": "#/definitions/response.K8sPodInfo" } }, "proxyClusterName": { "type": "string" }, "proxySysSecret": { "type": "string" }, "replicas": { "type": "integer" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" }, "service": { "$ref": "#/definitions/response.K8sService" }, "serviceIp": { "type": "string" }, "status": { "type": "string" } } }, "obproxy.OBProxyOverview": { "type": "object", "required": [ "creationTime", "image", "name", "namespace", "obCluster", "proxyClusterName", "replicas", "serviceIp", "status" ], "properties": { "creationTime": { "type": "string" }, "image": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obCluster": { "$ref": "#/definitions/obproxy.K8sObject" }, "proxyClusterName": { "type": "string" }, "replicas": { "type": "integer" }, "serviceIp": { "type": "string" }, "status": { "type": "string" } } }, "obproxy.PatchOBProxyParam": { "type": "object", "properties": { "addedParameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "deletedParameters": { "type": "array", "items": { "type": "string" } }, "image": { "type": "string" }, "replicas": { "type": "integer" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" }, "serviceType": { "type": "string", "default": "ClusterIP", "enum": [ "ClusterIP", "NodePort", "LoadBalancer", "ExternalName" ], "example": "ClusterIP" } } }, "oceanbase.OBInstance": { "type": "object", "required": [ "type" ], "properties": { "obcluster": { "type": "string" }, "observer": { "type": "string" }, "obtenant": { "type": "string" }, "obzone": { "description": "obzone may exist in labels", "type": "string" }, "type": { "$ref": "#/definitions/oceanbase.OBInstanceType" } } }, "oceanbase.OBInstanceType": { "type": "string", "enum": [ "obcluster", "obtenant", "observer" ], "x-enum-varnames": [ "OBCluster", "OBTenant", "OBServer" ] }, "param.ChangeTenantRole": { "type": "object", "properties": { "failover": { "type": "boolean" }, "switchover": { "type": "boolean" } } }, "param.ChangeUserPassword": { "type": "object", "required": [ "password", "user" ], "properties": { "password": { "type": "string" }, "user": { "description": "Description: The user name of the database account, only root is supported now.", "type": "string" } } }, "param.CreateBackupPolicy": { "type": "object", "required": [ "archivePath", "bakDataPath", "destType" ], "properties": { "archivePath": { "type": "string" }, "bakDataPath": { "type": "string" }, "bakEncryptionPassword": { "type": "string", "example": "encryptedPassword" }, "destType": { "description": "Enum: NFS, OSS", "type": "string", "example": "NFS" }, "jobKeepDays": { "type": "integer", "example": 5 }, "ossAccessId": { "type": "string", "example": "encryptedPassword" }, "ossAccessKey": { "type": "string", "example": "encryptedPassword" }, "pieceIntervalDays": { "type": "integer", "example": 1 }, "recoveryDays": { "type": "integer", "example": 3 }, "scheduleDates": { "type": "array", "items": { "$ref": "#/definitions/param.ScheduleDate" } }, "scheduleTime": { "description": "Description: HH:MM\nExample: 04:00", "type": "string", "example": "04:00" }, "scheduleType": { "description": "Enum: Weekly, Monthly", "type": "string", "example": "Weekly" } } }, "param.CreateNamespaceParam": { "type": "object", "properties": { "namespace": { "type": "string" } } }, "param.CreateOBClusterParam": { "type": "object", "properties": { "backupVolume": { "$ref": "#/definitions/param.NFSVolumeSpec" }, "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "mode": { "$ref": "#/definitions/common.ClusterMode" }, "monitor": { "$ref": "#/definitions/param.MonitorSpec" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "observer": { "$ref": "#/definitions/param.OBServerSpec" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "rootPassword": { "type": "string" }, "topology": { "type": "array", "items": { "$ref": "#/definitions/param.ZoneTopology" } } } }, "param.CreateOBTenantParam": { "type": "object", "required": [ "name", "namespace", "obcluster", "pools", "rootPassword", "tenantName", "unitConfig", "unitNum" ], "properties": { "charset": { "type": "string" }, "connectWhiteList": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obcluster": { "type": "string" }, "pools": { "type": "array", "items": { "$ref": "#/definitions/param.ResourcePoolSpec" } }, "rootPassword": { "type": "string" }, "source": { "$ref": "#/definitions/param.TenantSourceSpec" }, "tenantName": { "type": "string" }, "tenantRole": { "description": "Enum: Primary, Standby", "type": "string" }, "unitConfig": { "$ref": "#/definitions/param.UnitConfig" }, "unitNum": { "type": "integer" } } }, "param.LoginParam": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "param.MetricQuery": { "type": "object", "properties": { "groupLabels": { "type": "array", "items": { "type": "string" } }, "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "metrics": { "type": "array", "items": { "type": "string" } }, "queryRange": { "$ref": "#/definitions/param.QueryRange" } } }, "param.MonitorSpec": { "type": "object", "properties": { "image": { "type": "string" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" } } }, "param.NFSVolumeSpec": { "type": "object", "properties": { "address": { "type": "string" }, "path": { "type": "string" } } }, "param.OBServerSpec": { "type": "object", "properties": { "image": { "type": "string" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" }, "storage": { "$ref": "#/definitions/param.OBServerStorageSpec" } } }, "param.OBServerStorageSpec": { "type": "object", "properties": { "data": { "$ref": "#/definitions/common.StorageSpec" }, "log": { "$ref": "#/definitions/common.StorageSpec" }, "redoLog": { "$ref": "#/definitions/common.StorageSpec" } } }, "param.PatchTenant": { "type": "object", "properties": { "unitConfig": { "description": "Deprecated\nDescription: Deprecated, use PATCH /obtenants/:namespace/:name/pools/:zoneName instead", "allOf": [ { "$ref": "#/definitions/param.PatchUnitConfig" } ] }, "unitNum": { "type": "integer" } } }, "param.PatchUnitConfig": { "type": "object", "required": [ "pools", "unitConfig" ], "properties": { "pools": { "type": "array", "items": { "$ref": "#/definitions/param.ResourcePoolSpec" } }, "unitConfig": { "$ref": "#/definitions/param.UnitConfig" } } }, "param.QueryRange": { "type": "object", "properties": { "endTimestamp": { "type": "number" }, "startTimestamp": { "type": "number" }, "step": { "type": "integer" } } }, "param.ReplayStandbyLog": { "type": "object", "properties": { "timestamp": { "type": "string", "example": "2024-02-23 17:47:00" }, "unlimited": { "type": "boolean" } } }, "param.ResourcePoolSpec": { "type": "object", "required": [ "zone" ], "properties": { "priority": { "type": "integer" }, "type": { "description": "Enum: Readonly, Full", "type": "string" }, "zone": { "type": "string" } } }, "param.RestoreSourceSpec": { "type": "object", "required": [ "archiveSource", "bakDataSource", "type" ], "properties": { "archiveSource": { "type": "string" }, "bakDataSource": { "type": "string" }, "bakEncryptionPassword": { "type": "string" }, "ossAccessId": { "type": "string" }, "ossAccessKey": { "type": "string" }, "type": { "description": "Enum: OSS, NFS", "type": "string" }, "until": { "$ref": "#/definitions/param.RestoreUntilConfig" } } }, "param.RestoreUntilConfig": { "type": "object", "properties": { "timestamp": { "type": "string", "example": "2024-02-23 17:47:00" }, "unlimited": { "type": "boolean" } } }, "param.ScaleOBServerParam": { "type": "object", "properties": { "replicas": { "type": "integer" } } }, "param.ScheduleDate": { "type": "object", "required": [ "backupType", "day" ], "properties": { "backupType": { "description": "Enum: Full, Incremental", "type": "string", "example": "Full" }, "day": { "description": "Description: 1-31 for monthly, 1-7 for weekly", "type": "integer", "example": 3 } } }, "param.TenantPoolSpec": { "type": "object", "properties": { "priority": { "type": "integer" }, "unitConfig": { "$ref": "#/definitions/param.UnitConfig" } } }, "param.TenantSourceSpec": { "type": "object", "properties": { "restore": { "$ref": "#/definitions/param.RestoreSourceSpec" }, "tenant": { "type": "string" } } }, "param.UnitConfig": { "type": "object", "required": [ "cpuCount", "memorySize" ], "properties": { "cpuCount": { "type": "string" }, "iopsWeight": { "type": "integer" }, "logDiskSize": { "type": "string" }, "maxIops": { "type": "integer" }, "memorySize": { "type": "string" }, "minIops": { "type": "integer" } } }, "param.UpdateBackupPolicy": { "type": "object", "properties": { "jobKeepDays": { "type": "integer", "example": 5 }, "pieceIntervalDays": { "type": "integer", "example": 1 }, "recoveryDays": { "type": "integer", "example": 3 }, "scheduleDates": { "type": "array", "items": { "$ref": "#/definitions/param.ScheduleDate" } }, "scheduleTime": { "description": "Description: HH:MM\nExample: 04:00", "type": "string", "example": "04:00" }, "scheduleType": { "description": "Enum: Weekly, Monthly", "type": "string", "example": "Weekly" }, "status": { "description": "Enum: PAUSED, RUNNING", "type": "string", "example": "PAUSED" } } }, "param.UpgradeOBClusterParam": { "type": "object", "properties": { "image": { "type": "string" } } }, "param.ZoneTopology": { "type": "object", "properties": { "affinities": { "type": "array", "items": { "$ref": "#/definitions/common.AffinitySpec" } }, "nodeSelector": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "replicas": { "type": "integer" }, "tolerations": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "zone": { "type": "string" } } }, "receiver.Receiver": { "type": "object", "required": [ "config", "name", "type" ], "properties": { "config": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/receiver.ReceiverType" } } }, "receiver.ReceiverType": { "type": "string", "enum": [ "dingtalk", "wechat" ], "x-enum-varnames": [ "TypeDingTalk", "TypeWeChat" ] }, "receiver.Template": { "type": "object", "required": [ "template", "type" ], "properties": { "template": { "type": "string" }, "type": { "$ref": "#/definitions/receiver.ReceiverType" } } }, "response.APIResponse": { "type": "object", "required": [ "data", "message", "successful" ], "properties": { "data": {}, "message": { "type": "string" }, "successful": { "type": "boolean" } } }, "response.BackupJob": { "type": "object", "required": [ "backupPolicyName", "name", "namespace", "path", "startTime", "status", "statusInDatabase", "tenantName", "type", "uid" ], "properties": { "backupPolicyName": { "type": "string" }, "encryptionSecret": { "type": "string" }, "endTime": { "description": "End time of the backup job, empty for ARCHIVE job", "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "path": { "description": "Empty for Clean job", "type": "string" }, "startTime": { "description": "Start time of the backup job, StartScnDisplay for ARCHIVE job", "type": "string" }, "status": { "type": "string" }, "statusInDatabase": { "type": "string" }, "tenantName": { "type": "string" }, "type": { "description": "Enum: FULL, INCR, ARCHIVE, CLEAN", "type": "string" }, "uid": { "type": "string" } } }, "response.BackupPolicy": { "type": "object", "required": [ "archivePath", "bakDataPath", "createTime", "destType", "events", "name", "namespace", "status", "tenantName", "uid" ], "properties": { "archivePath": { "type": "string" }, "bakDataPath": { "type": "string" }, "bakEncryptionSecret": { "type": "string" }, "createTime": { "type": "string" }, "destType": { "description": "Enum: NFS, OSS", "type": "string", "example": "NFS" }, "events": { "type": "array", "items": { "$ref": "#/definitions/response.K8sEvent" } }, "jobKeepDays": { "type": "integer", "example": 5 }, "name": { "type": "string" }, "namespace": { "type": "string" }, "ossAccessSecret": { "type": "string" }, "pieceIntervalDays": { "type": "integer", "example": 1 }, "recoveryDays": { "type": "integer", "example": 3 }, "scheduleDates": { "type": "array", "items": { "$ref": "#/definitions/param.ScheduleDate" } }, "scheduleTime": { "description": "Description: HH:MM\nExample: 04:00", "type": "string", "example": "04:00" }, "scheduleType": { "description": "Enum: Weekly, Monthly", "type": "string", "example": "Weekly" }, "status": { "type": "string" }, "tenantName": { "type": "string" }, "uid": { "type": "string" } } }, "response.ContainerInfo": { "type": "object", "required": [ "image", "limits", "name", "ports", "ready", "requests", "restartCount", "startTime" ], "properties": { "image": { "type": "string" }, "limits": { "$ref": "#/definitions/common.ResourceSpec" }, "name": { "type": "string" }, "ports": { "type": "array", "items": { "type": "integer" } }, "ready": { "type": "boolean" }, "requests": { "$ref": "#/definitions/common.ResourceSpec" }, "restartCount": { "type": "integer" }, "startTime": { "type": "string" } } }, "response.DashboardInfo": { "type": "object", "required": [ "appName", "publicKey", "reportHost", "reportStatistics", "version" ], "properties": { "appName": { "type": "string" }, "publicKey": { "type": "string" }, "reportHost": { "type": "string" }, "reportStatistics": { "type": "boolean" }, "version": { "type": "string" } } }, "response.K8sEvent": { "type": "object", "required": [ "count", "firstOccur", "lastSeen", "message", "namespace", "object", "reason", "type" ], "properties": { "count": { "type": "integer" }, "firstOccur": { "type": "integer" }, "lastSeen": { "type": "integer" }, "message": { "type": "string" }, "namespace": { "type": "string" }, "object": { "type": "string" }, "reason": { "type": "string" }, "type": { "type": "string" } } }, "response.K8sNode": { "type": "object", "properties": { "info": { "$ref": "#/definitions/response.K8sNodeInfo" }, "resource": { "$ref": "#/definitions/response.K8sNodeResource" } } }, "response.K8sNodeCondition": { "type": "object", "required": [ "message", "reason", "type" ], "properties": { "message": { "type": "string" }, "reason": { "type": "string" }, "type": { "type": "string" } } }, "response.K8sNodeInfo": { "type": "object", "required": [ "conditions", "cri", "externalIP", "internalIP", "kernel", "labels", "name", "os", "roles", "status", "uptime", "version" ], "properties": { "conditions": { "type": "array", "items": { "$ref": "#/definitions/response.K8sNodeCondition" } }, "cri": { "type": "string" }, "externalIP": { "type": "string" }, "internalIP": { "type": "string" }, "kernel": { "type": "string" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "name": { "type": "string" }, "os": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "uptime": { "type": "integer" }, "version": { "type": "string" } } }, "response.K8sNodeResource": { "type": "object", "required": [ "cpuFree", "cpuTotal", "cpuUsed", "memoryFree", "memoryTotal", "memoryUsed" ], "properties": { "cpuFree": { "type": "number" }, "cpuTotal": { "type": "number" }, "cpuUsed": { "type": "number" }, "memoryFree": { "type": "number" }, "memoryTotal": { "type": "number" }, "memoryUsed": { "type": "number" } } }, "response.K8sPodInfo": { "type": "object", "required": [ "containers", "message", "name", "namespace", "nodeName", "podIP", "reason", "startTime", "status" ], "properties": { "containers": { "type": "array", "items": { "$ref": "#/definitions/response.ContainerInfo" } }, "message": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "nodeName": { "type": "string" }, "podIP": { "type": "string" }, "reason": { "type": "string" }, "startTime": { "type": "string" }, "status": { "type": "string" } } }, "response.K8sService": { "type": "object", "properties": { "clusterIP": { "type": "string" }, "externalIP": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "ports": { "type": "array", "items": { "$ref": "#/definitions/response.K8sServicePort" } }, "type": { "type": "string" } } }, "response.K8sServicePort": { "type": "object", "properties": { "name": { "type": "string" }, "port": { "type": "integer" }, "targetPort": { "type": "integer" } } }, "response.Metric": { "type": "object", "properties": { "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "name": { "type": "string" } } }, "response.MetricClass": { "type": "object", "required": [ "description", "metricGroups", "name" ], "properties": { "description": { "type": "string" }, "metricGroups": { "type": "array", "items": { "$ref": "#/definitions/response.MetricGroup" } }, "name": { "type": "string" } } }, "response.MetricData": { "type": "object", "required": [ "metric", "values" ], "properties": { "metric": { "$ref": "#/definitions/response.Metric" }, "values": { "type": "array", "items": { "$ref": "#/definitions/response.MetricValue" } } } }, "response.MetricGroup": { "type": "object", "required": [ "description", "metrics", "name" ], "properties": { "description": { "type": "string" }, "metrics": { "type": "array", "items": { "$ref": "#/definitions/response.MetricMeta" } }, "name": { "type": "string" } } }, "response.MetricMeta": { "type": "object", "required": [ "description", "key", "name", "unit" ], "properties": { "description": { "type": "string" }, "key": { "type": "string" }, "name": { "type": "string" }, "unit": { "type": "string" } } }, "response.MetricValue": { "type": "object", "required": [ "timestamp", "value" ], "properties": { "timestamp": { "type": "number" }, "value": { "type": "number" } } }, "response.MonitorSpec": { "type": "object", "required": [ "image", "resource" ], "properties": { "image": { "type": "string" }, "resource": { "$ref": "#/definitions/response.ResourceSpecRender" } } }, "response.NFSVolumeSpec": { "type": "object", "required": [ "address", "path" ], "properties": { "address": { "type": "string" }, "path": { "type": "string" } } }, "response.Namespace": { "type": "object", "required": [ "namespace", "status" ], "properties": { "namespace": { "type": "string" }, "status": { "type": "string" } } }, "response.OBCluster": { "type": "object", "required": [ "clusterId", "clusterName", "createTime", "image", "mode", "name", "namespace", "parameters", "resource", "rootPasswordSecret", "status", "statusDetail", "storage", "topology", "uid" ], "properties": { "backupVolume": { "$ref": "#/definitions/response.NFSVolumeSpec" }, "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "createTime": { "type": "integer" }, "image": { "type": "string" }, "metrics": { "$ref": "#/definitions/response.OBMetrics" }, "mode": { "$ref": "#/definitions/common.ClusterMode" }, "monitor": { "$ref": "#/definitions/response.MonitorSpec" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "resource": { "$ref": "#/definitions/response.ResourceSpecRender" }, "rootPasswordSecret": { "type": "string" }, "status": { "type": "string" }, "statusDetail": { "type": "string" }, "storage": { "$ref": "#/definitions/response.OBServerStorage" }, "topology": { "type": "array", "items": { "$ref": "#/definitions/response.OBZone" } }, "uid": { "type": "string" }, "version": { "type": "string" } } }, "response.OBClusterOverview": { "type": "object", "required": [ "clusterId", "clusterName", "createTime", "image", "mode", "name", "namespace", "status", "statusDetail", "topology", "uid" ], "properties": { "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "createTime": { "type": "integer" }, "image": { "type": "string" }, "mode": { "$ref": "#/definitions/common.ClusterMode" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "status": { "type": "string" }, "statusDetail": { "type": "string" }, "topology": { "type": "array", "items": { "$ref": "#/definitions/response.OBZone" } }, "uid": { "type": "string" } } }, "response.OBClusterResources": { "type": "object", "required": [ "minPoolMemory" ], "properties": { "minPoolMemory": { "type": "integer", "example": 2147483648 }, "obServerResources": { "type": "array", "items": { "$ref": "#/definitions/response.OBServerAvailableResource" } }, "obZoneResourceMap": { "type": "object", "additionalProperties": { "$ref": "#/definitions/response.OBZoneAvailableResource" } } } }, "response.OBClusterStatistic": { "type": "object", "required": [ "count", "status" ], "properties": { "count": { "type": "integer" }, "status": { "type": "string" } } }, "response.OBConnection": { "type": "object", "properties": { "clientIp": { "type": "string" }, "cluster": { "type": "string" }, "namespace": { "type": "string" }, "pod": { "type": "string" }, "tenant": { "type": "string" }, "terminalId": { "type": "string" }, "user": { "type": "string" } } }, "response.OBMetrics": { "type": "object", "required": [ "cpuPercent", "diskPercent", "memoryPercent" ], "properties": { "cpuPercent": { "type": "integer" }, "diskPercent": { "type": "integer" }, "memoryPercent": { "type": "integer" } } }, "response.OBServer": { "type": "object", "required": [ "address", "name", "namespace", "status", "statusDetail" ], "properties": { "address": { "type": "string" }, "metrics": { "$ref": "#/definitions/response.OBMetrics" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "status": { "type": "string" }, "statusDetail": { "type": "string" } } }, "response.OBServerAvailableResource": { "type": "object", "required": [ "availableCPU", "availableDataDisk", "availableLogDisk", "availableMemory", "obServerIP", "obZone", "serverCount" ], "properties": { "availableCPU": { "type": "integer", "example": 12 }, "availableDataDisk": { "type": "integer", "example": 16106127360 }, "availableLogDisk": { "type": "integer", "example": 5368709120 }, "availableMemory": { "type": "integer", "example": 5368709120 }, "obServerIP": { "type": "string" }, "obZone": { "type": "string", "example": "zone1" }, "serverCount": { "type": "integer", "example": 3 } } }, "response.OBServerStorage": { "type": "object", "required": [ "dataStorage", "redoLogStorage", "sysLogStorage" ], "properties": { "dataStorage": { "$ref": "#/definitions/response.StorageSpec" }, "redoLogStorage": { "$ref": "#/definitions/response.StorageSpec" }, "sysLogStorage": { "$ref": "#/definitions/response.StorageSpec" } } }, "response.OBTenantDetail": { "type": "object", "required": [ "charset", "clusterResourceName", "createTime", "locality", "name", "namespace", "primaryZone", "status", "tenantName", "tenantRole", "uid", "unitNumber" ], "properties": { "charset": { "description": "Charset of the tenant", "type": "string" }, "clusterResourceName": { "description": "Name of the cluster belonging to", "type": "string" }, "createTime": { "description": "Creation time of the tenant", "type": "string" }, "locality": { "description": "Locality of the tenant units", "type": "string" }, "name": { "description": "Name of the resource", "type": "string" }, "namespace": { "description": "Namespace of the resource", "type": "string" }, "primaryTenant": { "type": "string" }, "primaryZone": { "description": "Primary zone of the tenant", "type": "string" }, "restoreSource": { "$ref": "#/definitions/response.RestoreSource" }, "rootCredential": { "type": "string" }, "standbyROCredential": { "type": "string" }, "status": { "description": "Status of the tenant", "type": "string" }, "tenantName": { "description": "Name of the tenant in the database", "type": "string" }, "tenantRole": { "description": "Enum: Primary, Standby", "type": "string" }, "topology": { "description": "Topology of the tenant", "type": "array", "items": { "$ref": "#/definitions/response.OBTenantReplica" } }, "uid": { "description": "Unique identifier of the resource", "type": "string" }, "unitNumber": { "description": "Number of units in every zone", "type": "integer" }, "version": { "type": "string" } } }, "response.OBTenantOverview": { "description": "Brief information about OBTenant", "type": "object", "required": [ "charset", "clusterResourceName", "createTime", "locality", "name", "namespace", "primaryZone", "status", "tenantName", "tenantRole", "uid", "unitNumber" ], "properties": { "charset": { "description": "Charset of the tenant", "type": "string" }, "clusterResourceName": { "description": "Name of the cluster belonging to", "type": "string" }, "createTime": { "description": "Creation time of the tenant", "type": "string" }, "locality": { "description": "Locality of the tenant units", "type": "string" }, "name": { "description": "Name of the resource", "type": "string" }, "namespace": { "description": "Namespace of the resource", "type": "string" }, "primaryZone": { "description": "Primary zone of the tenant", "type": "string" }, "status": { "description": "Status of the tenant", "type": "string" }, "tenantName": { "description": "Name of the tenant in the database", "type": "string" }, "tenantRole": { "description": "Enum: Primary, Standby", "type": "string" }, "topology": { "description": "Topology of the tenant", "type": "array", "items": { "$ref": "#/definitions/response.OBTenantReplica" } }, "uid": { "description": "Unique identifier of the resource", "type": "string" }, "unitNumber": { "description": "Number of units in every zone", "type": "integer" } } }, "response.OBTenantReplica": { "type": "object", "required": [ "iopsWeight", "logDiskSize", "maxCPU", "maxIops", "memorySize", "minCPU", "minIops", "priority", "type", "zone" ], "properties": { "iopsWeight": { "type": "integer" }, "logDiskSize": { "type": "string" }, "maxCPU": { "type": "string" }, "maxIops": { "type": "integer" }, "memorySize": { "type": "string" }, "minCPU": { "type": "string" }, "minIops": { "type": "integer" }, "priority": { "type": "integer" }, "type": { "description": "Enum: Readonly, Full", "type": "string" }, "zone": { "type": "string" } } }, "response.OBTenantStatistic": { "type": "object", "required": [ "count", "status" ], "properties": { "count": { "type": "integer" }, "status": { "type": "string" } } }, "response.OBZone": { "type": "object", "required": [ "name", "namespace", "replicas", "status", "statusDetail", "zone" ], "properties": { "affinities": { "type": "array", "items": { "$ref": "#/definitions/common.AffinitySpec" } }, "name": { "type": "string" }, "namespace": { "type": "string" }, "nodeSelector": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "observers": { "type": "array", "items": { "$ref": "#/definitions/response.OBServer" } }, "replicas": { "type": "integer" }, "rootService": { "type": "string" }, "status": { "type": "string" }, "statusDetail": { "type": "string" }, "tolerations": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "zone": { "type": "string" } } }, "response.OBZoneAvailableResource": { "type": "object", "required": [ "availableCPU", "availableDataDisk", "availableLogDisk", "availableMemory", "obZone", "serverCount" ], "properties": { "availableCPU": { "type": "integer", "example": 12 }, "availableDataDisk": { "type": "integer", "example": 16106127360 }, "availableLogDisk": { "type": "integer", "example": 5368709120 }, "availableMemory": { "type": "integer", "example": 5368709120 }, "obZone": { "type": "string", "example": "zone1" }, "serverCount": { "type": "integer", "example": 3 } } }, "response.ResourceSpecRender": { "type": "object", "required": [ "cpu", "memory" ], "properties": { "cpu": { "type": "integer" }, "memory": { "type": "string" } } }, "response.RestoreSource": { "type": "object", "required": [ "archiveSource", "bakDataSource", "type" ], "properties": { "archiveSource": { "type": "string" }, "bakDataSource": { "type": "string" }, "bakEncryptionSecret": { "type": "string" }, "ossAccessSecret": { "type": "string" }, "type": { "description": "Enum: OSS, NFS", "type": "string" }, "until": { "type": "string" } } }, "response.StatisticData": { "type": "object", "required": [ "backupPolicies", "clusters", "k8sNodes", "servers", "tenants", "warningEvents", "zones" ], "properties": { "backupPolicies": { "type": "array", "items": { "$ref": "#/definitions/models.OBBackupPolicy" } }, "clusters": { "type": "array", "items": { "$ref": "#/definitions/models.OBCluster" } }, "k8sNodes": { "type": "array", "items": { "$ref": "#/definitions/response.K8sNode" } }, "operatorVersion": { "type": "string" }, "servers": { "type": "array", "items": { "$ref": "#/definitions/models.OBServer" } }, "tenants": { "type": "array", "items": { "$ref": "#/definitions/models.OBTenant" } }, "warningEvents": { "type": "array", "items": { "$ref": "#/definitions/models.K8sEvent" } }, "zones": { "type": "array", "items": { "$ref": "#/definitions/models.OBZone" } } } }, "response.StorageClass": { "type": "object", "required": [ "allowVolumeExpansion", "name", "provisioner", "reclaimPolicy", "volumeBindingMode" ], "properties": { "allowVolumeExpansion": { "type": "boolean" }, "mountOptions": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "provisioner": { "type": "string" }, "reclaimPolicy": { "type": "string" }, "volumeBindingMode": { "type": "string" } } }, "response.StorageSpec": { "type": "object", "required": [ "size", "storageClass" ], "properties": { "size": { "type": "string" }, "storageClass": { "type": "string" } } }, "route.Route": { "type": "object", "required": [ "aggregateLabels", "groupInterval", "groupWait", "matchers", "receiver", "repeatInterval" ], "properties": { "aggregateLabels": { "type": "array", "items": { "type": "string" } }, "groupInterval": { "type": "integer" }, "groupWait": { "type": "integer" }, "matchers": { "type": "array", "items": { "$ref": "#/definitions/alarm.Matcher" } }, "receiver": { "type": "string" }, "repeatInterval": { "type": "integer" } } }, "route.RouteResponse": { "type": "object", "required": [ "aggregateLabels", "groupInterval", "groupWait", "id", "matchers", "receiver", "repeatInterval" ], "properties": { "aggregateLabels": { "type": "array", "items": { "type": "string" } }, "groupInterval": { "type": "integer" }, "groupWait": { "type": "integer" }, "id": { "type": "string" }, "matchers": { "type": "array", "items": { "$ref": "#/definitions/alarm.Matcher" } }, "receiver": { "type": "string" }, "repeatInterval": { "type": "integer" } } }, "rule.Rule": { "type": "object", "required": [ "description", "duration", "instanceType", "labels", "name", "query", "serverity", "summary", "type" ], "properties": { "description": { "type": "string" }, "duration": { "type": "integer" }, "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "labels": { "$ref": "#/definitions/common.KVPair" }, "name": { "type": "string" }, "query": { "type": "string" }, "serverity": { "$ref": "#/definitions/alarm.Serverity" }, "summary": { "type": "string" }, "type": { "$ref": "#/definitions/rule.RuleType" } } }, "rule.RuleFilter": { "type": "object", "properties": { "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "keyword": { "type": "string" }, "serverity": { "$ref": "#/definitions/alarm.Serverity" } } }, "rule.RuleHealth": { "type": "string", "enum": [ "unknown", "ok", "error" ], "x-enum-varnames": [ "HealthUnknown", "HealthOK", "HealthError" ] }, "rule.RuleResponse": { "type": "object", "required": [ "description", "duration", "evaluationTime", "health", "instanceType", "keepFiringFor", "labels", "lastEvaluation", "name", "query", "serverity", "state", "summary", "type" ], "properties": { "description": { "type": "string" }, "duration": { "type": "integer" }, "evaluationTime": { "type": "number" }, "health": { "$ref": "#/definitions/rule.RuleHealth" }, "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "keepFiringFor": { "type": "integer" }, "labels": { "$ref": "#/definitions/common.KVPair" }, "lastError": { "type": "string" }, "lastEvaluation": { "type": "integer" }, "name": { "type": "string" }, "query": { "type": "string" }, "serverity": { "$ref": "#/definitions/alarm.Serverity" }, "state": { "$ref": "#/definitions/rule.RuleState" }, "summary": { "type": "string" }, "type": { "$ref": "#/definitions/rule.RuleType" } } }, "rule.RuleState": { "type": "string", "enum": [ "active", "inactive" ], "x-enum-varnames": [ "StateActive", "StateInactive" ] }, "rule.RuleType": { "type": "string", "enum": [ "builtin", "customized" ], "x-enum-varnames": [ "TypeBuiltin", "TypeCustomized" ] }, "silence.SilencerFilter": { "type": "object", "properties": { "instance": { "$ref": "#/definitions/oceanbase.OBInstance" }, "keyword": { "type": "string" } } }, "silence.SilencerParam": { "type": "object", "required": [ "comment", "createdBy", "endsAt", "instance", "matchers", "startsAt" ], "properties": { "comment": { "type": "string" }, "createdBy": { "type": "string" }, "endsAt": { "type": "integer" }, "id": { "type": "string" }, "instance": { "type": "array", "items": { "$ref": "#/definitions/oceanbase.OBInstance" } }, "matchers": { "type": "array", "items": { "$ref": "#/definitions/alarm.Matcher" } }, "startsAt": { "type": "integer" } } }, "silence.SilencerResponse": { "type": "object", "required": [ "comment", "createdBy", "endsAt", "id", "instance", "matchers", "startsAt", "status", "updatedAt" ], "properties": { "comment": { "type": "string" }, "createdBy": { "type": "string" }, "endsAt": { "type": "integer" }, "id": { "type": "string" }, "instance": { "type": "array", "items": { "$ref": "#/definitions/oceanbase.OBInstance" } }, "matchers": { "type": "array", "items": { "$ref": "#/definitions/alarm.Matcher" } }, "startsAt": { "type": "integer" }, "status": { "$ref": "#/definitions/silence.Status" }, "updatedAt": { "type": "integer" } } }, "silence.State": { "type": "string", "enum": [ "active" ], "x-enum-varnames": [ "StateActive" ] }, "silence.Status": { "type": "object", "required": [ "state" ], "properties": { "state": { "$ref": "#/definitions/silence.State" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Cookie", "in": "header" } } }