{ "swagger": "2.0", "info": { "description": "OceanBase Dashboard", "title": "OceanBase Dashboard API", "contact": {}, "version": "1.0" }, "basePath": "/api/v1", "paths": { "/api/v1/ac/accounts": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all accounts", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "List all accounts", "operationId": "ListAllAccounts", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/ac.Account" } } } } ] } }, "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 an account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Create an account", "operationId": "CreateAccount", "parameters": [ { "description": "Account information", "name": "account", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ac.CreateAccountParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Account" } } } ] } }, "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/ac/accounts/{username}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete an account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Delete an account", "operationId": "DeleteAccount", "parameters": [ { "type": "string", "description": "Username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Account" } } } ] } }, "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 account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Patch an account", "operationId": "PatchAccount", "parameters": [ { "description": "Account information", "name": "account", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ac.PatchAccountParam" } }, { "type": "string", "description": "Username", "name": "username", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Account" } } } ] } }, "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/ac/info": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get account info", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "get account info", "operationId": "GetAccountInfo", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Account" } } } ] } }, "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/ac/password": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Reset user's own password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Reset user's own password", "operationId": "ResetPassword", "parameters": [ { "description": "reset password", "name": "resetParam", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ResetPasswordParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Account" } } } ] } }, "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/ac/policies": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all policies", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "List all policies", "operationId": "ListAllPolicies", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/ac.Policy" } } } } ] } }, "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/ac/roles": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all roles", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "List all roles", "operationId": "ListAllRoles", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/ac.Role" } } } } ] } }, "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 an role", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Create an role", "operationId": "CreateRole", "parameters": [ { "description": "Role information", "name": "role", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ac.CreateRoleParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Role" } } } ] } }, "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/ac/roles/{name}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete an role", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Delete an role", "operationId": "DeleteRole", "parameters": [ { "type": "string", "description": "Role name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Role" } } } ] } }, "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 role", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "AccessControl" ], "summary": "Patch an role", "operationId": "PatchRole", "parameters": [ { "description": "Role information", "name": "role", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ac.PatchRoleParam" } }, { "type": "string", "description": "Role name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Role" } } } ] } }, "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/alert/alerts": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List alerts, filter with alarm objects, severity, 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/alert/diagnose": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Diagnose alert, trigger a job to do data collection and analization on background.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Alarm" ], "summary": "Diagnose alert", "operationId": "DiagnoseAlert", "parameters": [ { "description": "alert analyze param", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/alert.AnalyzeParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/job.Job" } } } ] } }, "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.RouteParam" } } ], "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, severity 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/attachments/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Download attachment by id", "consumes": [ "application/json" ], "produces": [ "application/x-gzip" ], "tags": [ "Attachment" ], "summary": "Download attachment", "operationId": "DownloadAttachment", "parameters": [ { "type": "string", "description": "attachment id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } }, "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", "OBPROXY" ], "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/nodes/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "update k8s nodes taints and labels", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "update k8s nodes", "operationId": "BatchUpdateK8sNodes", "parameters": [ { "description": "batch update nodes request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.BatchUpdateNodesParam" } } ], "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/{name}/labels": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update k8s node labels", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "update k8s node labels", "operationId": "PutK8sNodeLabels", "parameters": [ { "type": "string", "description": "node name", "name": "name", "in": "path", "required": true }, { "description": "update node labels request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.NodeLabels" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$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/nodes/{name}/taints": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update k8s node taints", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "update k8s node taints", "operationId": "PutK8sNodeTaints", "parameters": [ { "type": "string", "description": "node name", "name": "name", "in": "path", "required": true }, { "description": "update node taints request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.NodeTaints" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$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/configurable-infos": { "patch": { "security": [ { "ApiKeyAuth": [] } ], "description": "Set configurable infos", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Info" ], "summary": "Set configurable infos", "operationId": "ConfigureInfo", "parameters": [ { "description": "metric query request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.ConfigurableInfo" } } ], "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/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/inspection/policies": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list inspection policies", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "list inspection policies", "operationId": "ListInspectionPolicies", "parameters": [ { "type": "string", "description": "Namespace", "name": "namespace", "in": "query" }, { "type": "string", "description": "Object name", "name": "name", "in": "query" }, { "type": "string", "description": "obcluster name", "name": "obclusterName", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/inspection.Policy" } } } } ] } }, "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 or update inspection policy", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "create or update inspection policy", "operationId": "CreateOrUpdateInspectionPolicy", "parameters": [ { "description": "inspection policy", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/inspection.PolicyMeta" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/inspection.Policy" } } } ] } }, "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/inspection/policies/{namespace}/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get inspection policy", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "get inspection policy", "operationId": "GetInspectionPolicy", "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/inspection.Policy" } } } ] } }, "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/inspection/policies/{namespace}/{name}/{scenario}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete inspection policy", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "delete inspection policy", "operationId": "DeleteInspectionPolicy", "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": "scenario", "name": "scenario", "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/inspection/policies/{namespace}/{name}/{scenario}/trigger": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "trigger inspection", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "trigger inspection", "operationId": "TriggerInspection", "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": "scenario", "name": "scenario", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/job.Job" } } } ] } }, "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/inspection/reports": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list inspection reports", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "list inspection reports", "operationId": "ListInspectionReports", "parameters": [ { "type": "string", "description": "Namespace", "name": "namespace", "in": "query" }, { "type": "string", "description": "Object name", "name": "name", "in": "query" }, { "type": "string", "description": "obcluster name", "name": "obclusterName", "in": "query" }, { "type": "string", "description": "scenario", "name": "scenario", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/inspection.ReportBriefInfo" } } } } ] } }, "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/inspection/reports/{namespace}/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get inspection report", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Inspection" ], "summary": "get inspection report", "operationId": "GetInspectionReport", "parameters": [ { "type": "string", "description": "job namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "job name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/inspection.Report" } } } ] } }, "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/jobs/{namespace}/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get job by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Get job", "operationId": "GetJob", "parameters": [ { "type": "string", "description": "namespace of the job", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of the job", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/job.Job" } } } ] } }, "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 a job by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Delete a job", "operationId": "DeleteJob", "parameters": [ { "type": "string", "description": "namespace of the job", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of the job", "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/k8s/clusters": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list remote k8s clusters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "list remote k8s clusters", "operationId": "ListRemoteK8sClusters", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/k8s.K8sClusterInfo" } } } } ] } }, "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 remote k8s cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "create remote k8s cluster", "operationId": "CreateRemoteK8sCluster", "parameters": [ { "description": "create k8s cluster request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/k8s.CreateK8sClusterParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/k8s.K8sClusterInfo" } } } ] } }, "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/k8s/clusters/{clusterName}/nodes/{nodeName}/labels": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update remote k8s node labels", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "update remote k8s node labels", "operationId": "PutRemoteK8sNodeLabels", "parameters": [ { "type": "string", "description": "k8s cluster name", "name": "clusterName", "in": "path", "required": true }, { "type": "string", "description": "node name", "name": "nodeName", "in": "path", "required": true }, { "description": "update node labels request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.NodeLabels" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$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/k8s/clusters/{clusterName}/nodes/{nodeName}/taints": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update remote k8s node taints", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "update remote k8s node taints", "operationId": "PutRemoteK8sNodeTaints", "parameters": [ { "type": "string", "description": "k8s cluster name", "name": "clusterName", "in": "path", "required": true }, { "type": "string", "description": "node name", "name": "nodeName", "in": "path", "required": true }, { "description": "update node taints request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.NodeTaints" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$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/k8s/clusters/{name}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "get remote k8s cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "get remote k8s cluster", "operationId": "GetRemoteK8sCluster", "parameters": [ { "type": "string", "description": "k8s cluster name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/k8s.K8sClusterInfo" } } } ] } }, "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 remote k8s cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "delete remote k8s cluster", "operationId": "DeleteRemoteK8sCluster", "parameters": [ { "type": "string", "description": "k8s cluster 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": "put remote k8s cluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "put remote k8s cluster", "operationId": "PatchRemoteK8sCluster", "parameters": [ { "type": "string", "description": "k8s cluster name", "name": "name", "in": "path", "required": true }, { "description": "update k8s cluster request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/k8s.UpdateK8sClusterParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/k8s.K8sClusterInfo" } } } ] } }, "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/k8s/clusters/{name}/events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list remote k8s events", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "list remote k8s event", "operationId": "ListRemoteK8sEvents", "parameters": [ { "type": "string", "description": "k8s cluster name", "name": "name", "in": "path", "required": true }, { "enum": [ "OBCLUSTER", "OBTENANT", "OBBACKUPPOLICY", "OBPROXY" ], "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/k8s/clusters/{name}/nodes": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list remote k8s nodes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "list remote k8s nodes", "operationId": "ListRemoteK8sNodes", "parameters": [ { "type": "string", "description": "k8s cluster 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.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/k8s/clusters/{name}/nodes/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "batch update remote k8s nodes taints and labels", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "K8sCluster" ], "summary": "batch update remote k8s nodes", "operationId": "BatchUpdateRemoteK8sNode", "parameters": [ { "type": "string", "description": "k8s cluster name", "name": "name", "in": "path", "required": true }, { "description": "batch update nodes request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.BatchUpdateNodesParam" } } ], "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/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": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ac.Account" } } } ] } }, "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/monitor/endpoints": { "get": { "description": "list all endpoints to query metrics data", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Monitor" ], "summary": "list all endpoints", "operationId": "ListEndpoints", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/response.MonitorEndpoint" } } } } ] } }, "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": { "$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/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" } } } }, "patch": { "security": [ { "ApiKeyAuth": [] } ], "description": "patch obcluster configuration including resources, storage, monitor and parameters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "patch obcluster", "operationId": "PatchOBCluster", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "description": "patch obcluster request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.PatchOBClusterParam" } } ], "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}/log": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Download obcluster log", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "Download obcluster log", "operationId": "DownloadOBClusterLog", "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": "start time", "name": "startTime", "in": "query", "required": true }, { "type": "string", "description": "end time", "name": "endTime", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/job.Job" } } } ] } }, "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}/observers": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "delete specified observers from the obcluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "delete observers", "operationId": "DeleteOBServers", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "description": "delete observers request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.DeleteOBServersParam" } } ], "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": { "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}/parameters": { "get": { "description": "List OBCluster Parameters by namespace and name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "List OBCluster Parameters", "operationId": "ListOBClusterParameters", "parameters": [ { "type": "string", "description": "namespace of obcluster resource", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of obcluster resource", "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.AggregatedParameter" } } } } ] } }, "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}/restart": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "restart specified observers in the obcluster", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBCluster" ], "summary": "restart observers", "operationId": "RestartOBServers", "parameters": [ { "type": "string", "description": "obcluster namespace", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "obcluster name", "name": "name", "in": "path", "required": true }, { "description": "restart observers request body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/param.RestartOBServersParam" } } ], "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 }, { "enum": [ "TERMINAL", "ODC" ], "type": "string", "description": "channel", "name": "channel", "in": "query" } ], "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", "parameters": [ { "type": "string", "description": "namespace of obproxy deployment", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of obproxy deployment", "name": "name", "in": "path", "required": true } ], "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", "parameters": [ { "type": "string", "description": "namespace of obproxy deployment", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of obproxy deployment", "name": "name", "in": "path", "required": true } ], "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" } }, { "type": "string", "description": "namespace of obproxy deployment", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of obproxy deployment", "name": "name", "in": "path", "required": true } ], "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}/parameters": { "get": { "description": "List OBProxy Parameters by namespace and name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBProxy" ], "summary": "List OBProxy Parameters", "operationId": "ListOBProxyParameters", "parameters": [ { "type": "string", "description": "namespace of obproxy deployment", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "name of obproxy deployment", "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/obproxy.ConfigItem" } } } } ] } }, "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 confirm 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}/databases": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all the databases under obtenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "List obtenant databases", "operationId": "ListOBTenantDatabases", "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": { "type": "string" } } } } ] } }, "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}/sql-analyzer": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create SQL Analyzer for specific tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Create SQL Analyzer for specific tenant", "operationId": "CreateSQLAnalyzer", "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 SQL Analyzer for specific tenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "Delete SQL Analyzer for specific tenant", "operationId": "DeleteSQLAnalyzer", "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" } } } } }, "/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 }, { "enum": [ "TERMINAL", "ODC" ], "type": "string", "description": "channel", "name": "channel", "in": "query" } ], "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}/users": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all the users under obtenant", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "OBTenant" ], "summary": "List obtenant users", "operationId": "ListOBTenantUsers", "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": { "type": "string" } } } } ] } }, "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/sql/metrics": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "list sqls metrics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sql" ], "summary": "list sql metrics", "operationId": "ListSqlMetrics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlMetricMetaCategory" } } } } ] } }, "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/sql/queryPlanDetailInfo": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "query detailed statistic info of a plan", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sql" ], "summary": "query plan detail info", "operationId": "QueryPlanDetailInfo", "parameters": [ { "description": "param for query detailed plan info", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sql.PlanDetailParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/sql.PlanDetail" } } } ] } }, "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/sql/querySqlDetailInfo": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "query detailed statistic info of a SQL", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sql" ], "summary": "query SQL detail info", "operationId": "QuerySqlDetailInfo", "parameters": [ { "description": "param for query detailed sql info", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sql.SqlDetailParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/sql.SqlDetailedInfo" } } } ] } }, "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/sql/querySqlHistoryInfo": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "query history statistic info of a SQL", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sql" ], "summary": "query SQL history info", "operationId": "QuerySqlHistoryInfo", "parameters": [ { "description": "param for query history sql info", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sql.SqlHistoryParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/sql.SqlHistoryInfo" } } } ] } }, "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/sql/requestStatistics": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "list request statistics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sql" ], "summary": "list request statistics", "operationId": "ListRequestStatistics", "parameters": [ { "description": "sql request statistic param", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sql.SqlRequestStatisticParam" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/sql.RequestStatisticInfo" } } } } ] } }, "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/sql/stats": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "list top sqls ordering by spcecific metrics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sql" ], "summary": "list top sqls", "operationId": "ListSqlStats", "parameters": [ { "description": "sql filter", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/sql.SqlFilter" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/sql.SqlStatsList" } } } ] } }, "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" } } } } }, "/api/v1/storage/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get file by id", "consumes": [ "application/json" ], "produces": [ "application/zip" ], "tags": [ "Storage" ], "summary": "Get file", "operationId": "GetFile", "responses": { "200": { "description": "OK", "schema": { "type": "file" } }, "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/webhook/alert/log": { "post": { "description": "Log alerts sent by alertmanager.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Webhook" ], "summary": "Log alerts", "operationId": "LogAlerts", "parameters": [ { "description": "payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/payload.WebhookPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.APIResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/response.DashboardInfo" } } } ] } }, "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": { "ac.Account": { "type": "object", "required": [ "roles", "username" ], "properties": { "description": { "type": "string" }, "lastLoginAt": { "type": "string" }, "needReset": { "type": "boolean" }, "nickname": { "type": "string" }, "roles": { "type": "array", "items": { "$ref": "#/definitions/ac.Role" } }, "username": { "type": "string" } } }, "ac.CreateAccountParam": { "type": "object", "required": [ "nickname", "password", "roles", "username" ], "properties": { "description": { "type": "string" }, "nickname": { "type": "string" }, "password": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "username": { "type": "string" } } }, "ac.CreateRoleParam": { "type": "object", "required": [ "name", "permissions" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/ac.Policy" } } } }, "ac.PatchAccountParam": { "type": "object", "properties": { "description": { "type": "string" }, "nickname": { "type": "string" }, "password": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } } } }, "ac.PatchRoleParam": { "type": "object", "properties": { "description": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/ac.Policy" } } } }, "ac.Policy": { "type": "object", "required": [ "action", "domain", "object" ], "properties": { "action": { "type": "string" }, "domain": { "type": "string" }, "object": { "type": "string" } } }, "ac.Role": { "type": "object", "required": [ "name", "policies" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "policies": { "type": "array", "items": { "$ref": "#/definitions/ac.Policy" } } } }, "alarm.Matcher": { "type": "object", "properties": { "isRegex": { "type": "boolean" }, "name": { "type": "string" }, "value": { "type": "string" } } }, "alarm.Severity": { "type": "string", "enum": [ "critical", "warning", "caution", "info" ], "x-enum-varnames": [ "SeverityCritical", "SeverityWarning", "SeverityCaution", "SeverityInfo" ] }, "alert.Alert": { "type": "object", "required": [ "endsAt", "fingerprint", "instance", "rule", "severity", "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" }, "severity": { "$ref": "#/definitions/alarm.Severity" }, "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" }, "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "keyword": { "type": "string" }, "severity": { "$ref": "#/definitions/alarm.Severity" }, "startTime": { "type": "integer" } } }, "alert.AnalyzeParam": { "type": "object", "required": [ "endsAt", "instance", "rule", "startsAt" ], "properties": { "endsAt": { "type": "integer" }, "instance": { "$ref": "#/definitions/oceanbase.OBInstance" }, "rule": { "type": "string" }, "startsAt": { "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", "required": [ "key", "operator", "type" ], "properties": { "key": { "type": "string" }, "operator": { "description": "Enum: In, NotIn, Exists, DoesNotExist", "type": "string" }, "preferred": { "type": "boolean" }, "type": { "description": "Enum: NODE, POD, POD_ANTI", "allOf": [ { "$ref": "#/definitions/common.AffinityType" } ] }, "values": { "type": "array", "items": { "type": "string" } }, "weight": { "type": "integer" } } }, "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", "required": [ "key", "value" ], "properties": { "key": { "type": "string" }, "value": { "type": "string" } } }, "common.ResourceSpec": { "type": "object", "required": [ "cpu", "memory" ], "properties": { "cpu": { "type": "integer" }, "memory": { "type": "integer" } } }, "common.StorageSpec": { "type": "object", "required": [ "size" ], "properties": { "size": { "type": "integer" }, "storageClass": { "type": "string" } } }, "common.TolerationSpec": { "type": "object", "required": [ "effect", "key", "operator", "value" ], "properties": { "effect": { "description": "Enum: PreferNoSchedule, NoSchedule, NoExecute", "type": "string" }, "key": { "type": "string" }, "operator": { "description": "Enum: Exists, Equal", "type": "string" }, "tolerationSeconds": { "type": "integer" }, "value": { "type": "string" } } }, "inspection.InspectionItem": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "results": { "type": "array", "items": { "type": "string" } } } }, "inspection.InspectionScenario": { "type": "string", "enum": [ "basic", "performance" ], "x-enum-varnames": [ "ScenarioBasic", "ScenarioPerformance" ] }, "inspection.InspectionScheduleConfig": { "type": "object", "required": [ "scenario", "schedule" ], "properties": { "scenario": { "$ref": "#/definitions/inspection.InspectionScenario" }, "schedule": { "type": "string" }, "timeZone": { "type": "string" } } }, "inspection.InspectionScheduleStatus": { "type": "string", "enum": [ "enabled", "disabled" ], "x-enum-varnames": [ "ScheduleEnabled", "ScheduleDisabled" ] }, "inspection.Policy": { "type": "object", "required": [ "obCluster", "status" ], "properties": { "latestReports": { "type": "array", "items": { "$ref": "#/definitions/inspection.ReportBriefInfo" } }, "obCluster": { "$ref": "#/definitions/response.OBClusterMetaBasic" }, "scheduleConfig": { "type": "array", "items": { "$ref": "#/definitions/inspection.InspectionScheduleConfig" } }, "status": { "$ref": "#/definitions/inspection.InspectionScheduleStatus" } } }, "inspection.PolicyMeta": { "type": "object", "required": [ "obCluster", "status" ], "properties": { "obCluster": { "$ref": "#/definitions/response.OBClusterMetaBasic" }, "scheduleConfig": { "type": "array", "items": { "$ref": "#/definitions/inspection.InspectionScheduleConfig" } }, "status": { "$ref": "#/definitions/inspection.InspectionScheduleStatus" } } }, "inspection.Report": { "type": "object", "required": [ "name", "namespace", "obCluster", "resultStatistics", "scenario", "status" ], "properties": { "finishTime": { "type": "integer" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obCluster": { "$ref": "#/definitions/response.OBClusterMeta" }, "resultDetail": { "$ref": "#/definitions/inspection.ResultDetail" }, "resultStatistics": { "$ref": "#/definitions/inspection.ResultStatistics" }, "scenario": { "$ref": "#/definitions/inspection.InspectionScenario" }, "startTime": { "type": "integer" }, "status": { "$ref": "#/definitions/job.JobStatus" } } }, "inspection.ReportBriefInfo": { "type": "object", "required": [ "name", "namespace", "obCluster", "resultStatistics", "scenario", "status" ], "properties": { "finishTime": { "type": "integer" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obCluster": { "$ref": "#/definitions/response.OBClusterMeta" }, "resultStatistics": { "$ref": "#/definitions/inspection.ResultStatistics" }, "scenario": { "$ref": "#/definitions/inspection.InspectionScenario" }, "startTime": { "type": "integer" }, "status": { "$ref": "#/definitions/job.JobStatus" } } }, "inspection.ResultDetail": { "type": "object", "properties": { "criticalItems": { "type": "array", "items": { "$ref": "#/definitions/inspection.InspectionItem" } }, "failedItems": { "type": "array", "items": { "$ref": "#/definitions/inspection.InspectionItem" } }, "moderateItems": { "type": "array", "items": { "$ref": "#/definitions/inspection.InspectionItem" } }, "negligibleItems": { "type": "array", "items": { "$ref": "#/definitions/inspection.InspectionItem" } } } }, "inspection.ResultStatistics": { "type": "object", "properties": { "criticalCount": { "type": "integer" }, "failedCount": { "type": "integer" }, "moderateCount": { "type": "integer" }, "negligibleCount": { "type": "integer" } } }, "job.Job": { "type": "object", "required": [ "name", "namespace", "status" ], "properties": { "finishTime": { "type": "integer" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "result": { "$ref": "#/definitions/job.JobResult" }, "startTime": { "type": "integer" }, "status": { "$ref": "#/definitions/job.JobStatus" } } }, "job.JobResult": { "type": "object", "required": [ "exitCode" ], "properties": { "attachmentId": { "type": "string" }, "exitCode": { "type": "integer" }, "output": { "type": "string" } } }, "job.JobStatus": { "type": "string", "enum": [ "successful", "failed", "running", "pending" ], "x-enum-varnames": [ "JobStatusSuccessful", "JobStatusFailed", "JobStatusRunning", "JobStatusPending" ] }, "k8s.CreateK8sClusterParam": { "type": "object", "required": [ "kubeConfig", "name" ], "properties": { "description": { "type": "string" }, "kubeConfig": { "type": "string" }, "name": { "type": "string" } } }, "k8s.K8sClusterInfo": { "type": "object", "required": [ "name" ], "properties": { "createdAt": { "type": "integer" }, "description": { "type": "string" }, "name": { "type": "string" } } }, "k8s.Taint": { "type": "object", "required": [ "effect", "key" ], "properties": { "effect": { "type": "string" }, "key": { "type": "string" }, "value": { "type": "string" } } }, "k8s.UpdateK8sClusterParam": { "type": "object", "properties": { "description": { "type": "string" }, "kubeConfig": { "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.ConfigItem": { "type": "object", "properties": { "info": { "type": "string" }, "name": { "type": "string" }, "needReboot": { "type": "boolean" }, "value": { "type": "string" }, "visibleLevel": { "type": "string" } } }, "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", "serviceType", "status" ], "properties": { "creationTime": { "type": "integer" }, "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" }, "serviceType": { "type": "string" }, "status": { "type": "string", "enum": [ "Running", "Pending" ] } } }, "obproxy.OBProxyOverview": { "type": "object", "required": [ "creationTime", "image", "name", "namespace", "obCluster", "proxyClusterName", "replicas", "serviceIp", "serviceType", "status" ], "properties": { "creationTime": { "type": "integer" }, "image": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obCluster": { "$ref": "#/definitions/obproxy.K8sObject" }, "proxyClusterName": { "type": "string" }, "replicas": { "type": "integer" }, "serviceIp": { "type": "string" }, "serviceType": { "type": "string" }, "status": { "type": "string", "enum": [ "Running", "Pending" ] } } }, "obproxy.PatchOBProxyParam": { "type": "object", "properties": { "image": { "type": "string" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "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": [ "unknown", "obcluster", "obzone", "obtenant", "observer" ], "x-enum-varnames": [ "TypeUnknown", "TypeOBCluster", "TypeOBZone", "TypeOBTenant", "TypeOBServer" ] }, "param.BackupDestType": { "type": "string", "enum": [ "NFS", "OSS", "COS", "S3", "S3_COMPATIBLE" ], "x-enum-varnames": [ "BackupDestNFS", "BackupDestOSS", "BackupDestCOS", "BackupDestS3", "BackupDestS3Compatible" ] }, "param.BatchUpdateNodesParam": { "type": "object", "required": [ "nodes" ], "properties": { "labelOperations": { "type": "array", "items": { "$ref": "#/definitions/param.labelOperation" } }, "nodes": { "type": "array", "items": { "type": "string" } }, "taintOperations": { "type": "array", "items": { "$ref": "#/definitions/param.taintOperation" } } } }, "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.ConfigurableInfo": { "type": "object", "properties": { "odcURL": { "type": "string" } } }, "param.CreateBackupPolicy": { "type": "object", "required": [ "archivePath", "bakDataPath", "destType" ], "properties": { "appId": { "description": "Used for COS", "type": "string", "example": "123456" }, "archivePath": { "type": "string" }, "bakDataPath": { "type": "string" }, "bakEncryptionPassword": { "type": "string", "example": "encryptedPassword" }, "destType": { "description": "Enum: NFS, OSS, COS, S3, S3_COMPATIBLE", "allOf": [ { "$ref": "#/definitions/param.BackupDestType" } ], "example": "NFS" }, "host": { "type": "string", "example": "https://oss-cn-hangzhou.aliyuncs.com" }, "jobKeepDays": { "type": "integer", "example": 5 }, "ossAccessId": { "description": "Used for non-NFS", "type": "string", "example": "encryptedPassword" }, "ossAccessKey": { "type": "string", "example": "encryptedPassword" }, "pieceIntervalDays": { "type": "integer", "example": 1 }, "recoveryDays": { "type": "integer", "example": 3 }, "region": { "description": "Used for S3", "type": "string", "example": "cn-hangzhou" }, "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", "required": [ "clusterId", "clusterName", "mode", "name", "namespace", "observer", "rootPassword", "scenario", "topology" ], "properties": { "backupVolume": { "$ref": "#/definitions/param.NFSVolumeSpec" }, "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "deletionProtection": { "type": "boolean" }, "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" } }, "proxyroPassword": { "type": "string" }, "pvcIndependent": { "type": "boolean" }, "rootPassword": { "type": "string" }, "scenario": { "description": "Enum: express_oltp, express_oltp, olap, kv, htap, express_oltp_perf", "type": "string" }, "topology": { "type": "array", "items": { "$ref": "#/definitions/param.ZoneTopology" } } } }, "param.CreateOBTenantParam": { "type": "object", "required": [ "name", "namespace", "obcluster", "pools", "scenario", "tenantName", "unitConfig", "unitNum" ], "properties": { "charset": { "type": "string" }, "connectWhiteList": { "type": "string" }, "deletionProtection": { "type": "boolean" }, "enableSqlAnalyzer": { "type": "boolean" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "obcluster": { "type": "string" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "pools": { "type": "array", "items": { "$ref": "#/definitions/param.ResourcePoolSpec" } }, "rootCredential": { "type": "string" }, "rootPassword": { "type": "string" }, "scenario": { "description": "Enum: express_oltp, express_oltp, olap, kv, htap, express_oltp_perf", "type": "string" }, "secretNamespace": { "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" }, "variables": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } } } }, "param.DeleteOBServersParam": { "type": "object", "properties": { "observers": { "type": "array", "items": { "type": "string" } } } }, "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", "required": [ "image", "resource" ], "properties": { "image": { "type": "string" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" } } }, "param.NFSVolumeSpec": { "type": "object", "properties": { "address": { "type": "string" }, "path": { "type": "string" } } }, "param.NodeLabels": { "type": "object", "properties": { "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } } } }, "param.NodeOperation": { "type": "string", "enum": [ "overwrite", "delete" ], "x-enum-varnames": [ "OperationOverwrite", "OperationDelete" ] }, "param.NodeTaints": { "type": "object", "properties": { "taints": { "type": "array", "items": { "$ref": "#/definitions/k8s.Taint" } } } }, "param.OBServerSpec": { "type": "object", "required": [ "image", "resource", "storage" ], "properties": { "image": { "type": "string" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" }, "storage": { "$ref": "#/definitions/param.OBServerStorageSpec" } } }, "param.OBServerStorageSpec": { "type": "object", "required": [ "data", "log", "redoLog" ], "properties": { "data": { "$ref": "#/definitions/common.StorageSpec" }, "log": { "$ref": "#/definitions/common.StorageSpec" }, "redoLog": { "$ref": "#/definitions/common.StorageSpec" } } }, "param.PatchOBClusterParam": { "type": "object", "properties": { "addDeletionProtection": { "type": "boolean" }, "backupVolume": { "$ref": "#/definitions/param.NFSVolumeSpec" }, "deletedParameters": { "description": "Delete some parameters", "type": "array", "items": { "type": "string" } }, "modifiedParameters": { "description": "Add or modify some parameters", "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "monitor": { "$ref": "#/definitions/param.MonitorSpec" }, "parameters": { "description": "Replace all parameters", "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "removeBackupVolume": { "type": "boolean" }, "removeDeletionProtection": { "type": "boolean" }, "removeMonitor": { "type": "boolean" }, "resource": { "$ref": "#/definitions/common.ResourceSpec" }, "storage": { "$ref": "#/definitions/param.OBServerStorageSpec" } } }, "param.PatchTenant": { "type": "object", "properties": { "addDeletionProtection": { "type": "boolean" }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "removeDeletionProtection": { "type": "boolean" }, "unitConfig": { "description": "Deprecated\nDescription: Deprecated, use PATCH /obtenants/:namespace/:name/pools/:zoneName instead", "allOf": [ { "$ref": "#/definitions/param.PatchUnitConfig" } ] }, "unitNum": { "type": "integer" }, "variables": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } } } }, "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.ResetPasswordParam": { "type": "object", "required": [ "password" ], "properties": { "oldPassword": { "type": "string" }, "password": { "type": "string" } } }, "param.ResourcePoolSpec": { "type": "object", "required": [ "zone" ], "properties": { "priority": { "type": "integer" }, "type": { "description": "Enum: Full, Readonly, Columnstore", "type": "string" }, "zone": { "type": "string" } } }, "param.RestartOBServersParam": { "type": "object", "properties": { "all": { "type": "boolean" }, "observers": { "type": "array", "items": { "type": "string" } }, "obzones": { "type": "array", "items": { "type": "string" } } } }, "param.RestoreSourceSpec": { "type": "object", "required": [ "archiveSource", "bakDataSource", "type" ], "properties": { "appId": { "type": "string" }, "archiveSource": { "type": "string" }, "bakDataSource": { "type": "string" }, "bakEncryptionPassword": { "type": "string" }, "bakEncryptionSecret": { "type": "string" }, "ossAccessId": { "type": "string" }, "ossAccessKey": { "type": "string" }, "ossAccessSecret": { "type": "string" }, "region": { "type": "string" }, "type": { "description": "Enum: OSS, NFS, COS, S3, S3_COMPATIBLE", "allOf": [ { "$ref": "#/definitions/param.BackupDestType" } ] }, "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", "required": [ "replicas" ], "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" }, "type": { "description": "Enum: Full, Readonly, Columnstore", "type": "string" }, "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", "required": [ "image" ], "properties": { "image": { "type": "string" } } }, "param.ZoneTopology": { "type": "object", "required": [ "replicas", "zone" ], "properties": { "affinities": { "type": "array", "items": { "$ref": "#/definitions/common.AffinitySpec" } }, "k8sCluster": { "type": "string" }, "nodeSelector": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "replicas": { "type": "integer" }, "tolerations": { "type": "array", "items": { "$ref": "#/definitions/common.TolerationSpec" } }, "zone": { "type": "string" } } }, "param.labelOperation": { "type": "object", "required": [ "key", "operation" ], "properties": { "key": { "type": "string" }, "operation": { "$ref": "#/definitions/param.NodeOperation" }, "value": { "type": "string" } } }, "param.taintOperation": { "type": "object", "required": [ "effect", "key", "operation" ], "properties": { "effect": { "type": "string" }, "key": { "type": "string" }, "operation": { "$ref": "#/definitions/param.NodeOperation" }, "value": { "type": "string" } } }, "payload.Alert": { "type": "object", "properties": { "annotations": { "type": "object", "additionalProperties": { "type": "string" } }, "endsAt": { "type": "string" }, "generatorURL": { "type": "string" }, "labels": { "type": "object", "additionalProperties": { "type": "string" } }, "startsAt": { "type": "string" }, "status": { "type": "string" } } }, "payload.WebhookPayload": { "type": "object", "properties": { "alerts": { "type": "array", "items": { "$ref": "#/definitions/payload.Alert" } }, "commonAnnotations": { "type": "object", "additionalProperties": { "type": "string" } }, "commonLabels": { "type": "object", "additionalProperties": { "type": "string" } }, "externalURL": { "type": "string" }, "groupKey": { "type": "string" }, "groupLabels": { "type": "object", "additionalProperties": { "type": "string" } }, "receiver": { "type": "string" }, "status": { "type": "string" }, "version": { "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": [ "discord", "email", "pagerduty", "slack", "webhook", "opsgenie", "wechat", "pushover", "victorops", "sns", "telegram", "webex", "msteams" ], "x-enum-varnames": [ "TypeDiscord", "TypeEmail", "TypePagerduty", "TypeSlack", "TypeWebhook", "TypeOpsGenie", "TypeWechat", "TypePushover", "TypeVictorOps", "TypeSNS", "TypeTelegram", "TypeWebex", "TypeMSTeams" ] }, "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.AggregatedParameter": { "type": "object", "properties": { "dataType": { "type": "string" }, "editLevel": { "type": "string" }, "info": { "type": "string" }, "isManagedByOperator": { "type": "boolean" }, "name": { "type": "string" }, "scope": { "type": "string" }, "section": { "type": "string" }, "status": { "type": "string" }, "values": { "type": "array", "items": { "$ref": "#/definitions/response.AggregratedParameterValue" } } } }, "response.AggregratedParameterValue": { "type": "object", "properties": { "metas": { "type": "array", "items": { "$ref": "#/definitions/response.ParameterMeta" } }, "metasStr": { "type": "string" }, "value": { "type": "string" } } }, "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, COS, S3, S3_COMPATIBLE", "allOf": [ { "$ref": "#/definitions/param.BackupDestType" } ], "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.ConfigurableInfo": { "type": "object", "required": [ "odcURL" ], "properties": { "odcURL": { "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", "configurableInfo", "publicKey", "reportHost", "reportStatistics", "version" ], "properties": { "appName": { "type": "string" }, "configurableInfo": { "$ref": "#/definitions/response.ConfigurableInfo" }, "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", "taints", "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" }, "taints": { "type": "array", "items": { "$ref": "#/definitions/k8s.Taint" } }, "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", "required": [ "clusterIP", "name", "namespace", "ports", "type" ], "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", "required": [ "port", "targetPort" ], "properties": { "name": { "type": "string" }, "nodePort": { "type": "integer" }, "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.MonitorEndpoint": { "type": "object", "required": [ "targets" ], "properties": { "labels": { "type": "object", "additionalProperties": { "type": "string" } }, "targets": { "type": "array", "items": { "type": "string" } } } }, "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", "deletionProtection", "image", "mode", "name", "namespace", "parameters", "pvcIndependent", "resource", "rootPasswordSecret", "status", "statusDetail", "storage", "supportStaticIP", "topology", "uid" ], "properties": { "annotations": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "backupVolume": { "$ref": "#/definitions/response.NFSVolumeSpec" }, "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "createTime": { "type": "integer" }, "deletionProtection": { "type": "boolean" }, "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/response.ParameterSpec" } }, "pvcIndependent": { "type": "boolean" }, "resource": { "$ref": "#/definitions/response.ResourceSpecRender" }, "rootPasswordSecret": { "type": "string" }, "status": { "type": "string" }, "statusDetail": { "type": "string" }, "storage": { "$ref": "#/definitions/response.OBServerStorage" }, "supportStaticIP": { "type": "boolean" }, "topology": { "type": "array", "items": { "$ref": "#/definitions/response.OBZone" } }, "uid": { "type": "string" }, "version": { "type": "string" } } }, "response.OBClusterMeta": { "type": "object", "required": [ "clusterId", "clusterName", "deletionProtection", "mode", "name", "namespace", "pvcIndependent", "supportStaticIP", "uid" ], "properties": { "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "deletionProtection": { "type": "boolean" }, "mode": { "$ref": "#/definitions/common.ClusterMode" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "pvcIndependent": { "type": "boolean" }, "supportStaticIP": { "type": "boolean" }, "uid": { "type": "string" } } }, "response.OBClusterMetaBasic": { "type": "object", "required": [ "clusterId", "clusterName", "name", "namespace", "uid" ], "properties": { "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "uid": { "type": "string" } } }, "response.OBClusterOverview": { "type": "object", "required": [ "clusterId", "clusterName", "createTime", "deletionProtection", "image", "mode", "name", "namespace", "pvcIndependent", "status", "statusDetail", "supportStaticIP", "topology", "uid" ], "properties": { "clusterId": { "type": "integer" }, "clusterName": { "type": "string" }, "createTime": { "type": "integer" }, "deletionProtection": { "type": "boolean" }, "image": { "type": "string" }, "mode": { "$ref": "#/definitions/common.ClusterMode" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "pvcIndependent": { "type": "boolean" }, "status": { "type": "string" }, "statusDetail": { "type": "string" }, "supportStaticIP": { "type": "boolean" }, "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" }, "odcConnectionURL": { "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", "nodeIp", "nodeName", "status", "statusDetail" ], "properties": { "address": { "type": "string" }, "metrics": { "$ref": "#/definitions/response.OBMetrics" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "nodeIp": { "type": "string" }, "nodeName": { "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", "deletionProtection", "locality", "name", "namespace", "primaryZone", "status", "tenantName", "tenantRole", "uid", "unitNumber" ], "properties": { "annotations": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "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" }, "deletionProtection": { "description": "Whether the tenant is protected from deletion", "type": "boolean" }, "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" }, "scenario": { "type": "string" }, "sqlAnalyzerEnabled": { "description": "Whether the sql analyzer is enabled", "type": "boolean" }, "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", "deletionProtection", "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" }, "deletionProtection": { "description": "Whether the tenant is protected from deletion", "type": "boolean" }, "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" }, "scenario": { "type": "string" }, "sqlAnalyzerEnabled": { "description": "Whether the sql analyzer is enabled", "type": "boolean" }, "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": "integer" }, "maxCPU": { "type": "integer" }, "maxIops": { "type": "integer" }, "memorySize": { "type": "integer" }, "minCPU": { "type": "integer" }, "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" } }, "k8sCluster": { "type": "string" }, "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.TolerationSpec" } }, "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.ParameterMeta": { "type": "object", "properties": { "svr_ip": { "type": "string" }, "svr_port": { "type": "integer" }, "tenant_id": { "type": "integer" }, "zone": { "type": "string" } } }, "response.ParameterSpec": { "type": "object", "required": [ "name", "specValue", "value" ], "properties": { "name": { "type": "string" }, "specValue": { "type": "string" }, "value": { "type": "string" } } }, "response.ResourceSpecRender": { "type": "object", "required": [ "cpu", "memory" ], "properties": { "cpu": { "type": "integer" }, "memory": { "type": "integer" } } }, "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": "integer" }, "storageClass": { "type": "string" } } }, "route.RouteParam": { "type": "object", "required": [ "aggregateLabels", "groupInterval", "groupWait", "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" } } }, "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", "severity", "summary" ], "properties": { "description": { "type": "string" }, "duration": { "type": "integer" }, "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "name": { "type": "string" }, "query": { "type": "string" }, "severity": { "$ref": "#/definitions/alarm.Severity" }, "summary": { "type": "string" }, "type": { "default": "customized", "allOf": [ { "$ref": "#/definitions/rule.RuleType" } ] } } }, "rule.RuleFilter": { "type": "object", "properties": { "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "keyword": { "type": "string" }, "severity": { "$ref": "#/definitions/alarm.Severity" } } }, "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", "severity", "state", "summary" ], "properties": { "description": { "type": "string" }, "duration": { "type": "integer" }, "evaluationTime": { "type": "number" }, "health": { "$ref": "#/definitions/rule.RuleHealth" }, "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "keepFiringFor": { "type": "integer" }, "labels": { "type": "array", "items": { "$ref": "#/definitions/common.KVPair" } }, "lastError": { "type": "string" }, "lastEvaluation": { "type": "integer" }, "name": { "type": "string" }, "query": { "type": "string" }, "severity": { "$ref": "#/definitions/alarm.Severity" }, "state": { "$ref": "#/definitions/rule.RuleState" }, "summary": { "type": "string" }, "type": { "default": "customized", "allOf": [ { "$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" }, "instanceType": { "$ref": "#/definitions/oceanbase.OBInstanceType" }, "keyword": { "type": "string" } } }, "silence.SilencerParam": { "type": "object", "required": [ "comment", "createdBy", "endsAt", "instances", "matchers", "rules", "startsAt" ], "properties": { "comment": { "type": "string" }, "createdBy": { "type": "string" }, "endsAt": { "type": "integer" }, "id": { "type": "string" }, "instances": { "type": "array", "items": { "$ref": "#/definitions/oceanbase.OBInstance" } }, "matchers": { "type": "array", "items": { "$ref": "#/definitions/alarm.Matcher" } }, "rules": { "type": "array", "items": { "type": "string" } }, "startsAt": { "type": "integer" } } }, "silence.SilencerResponse": { "type": "object", "required": [ "comment", "createdBy", "endsAt", "id", "instances", "matchers", "rules", "startsAt", "status", "updatedAt" ], "properties": { "comment": { "type": "string" }, "createdBy": { "type": "string" }, "endsAt": { "type": "integer" }, "id": { "type": "string" }, "instances": { "type": "array", "items": { "$ref": "#/definitions/oceanbase.OBInstance" } }, "matchers": { "type": "array", "items": { "$ref": "#/definitions/alarm.Matcher" } }, "rules": { "type": "array", "items": { "type": "string" } }, "startsAt": { "type": "integer" }, "status": { "$ref": "#/definitions/silence.Status" }, "updatedAt": { "type": "integer" } } }, "silence.State": { "type": "string", "enum": [ "active", "expired", "pending" ], "x-enum-varnames": [ "StateActive", "StateExpired", "StatePending" ] }, "silence.Status": { "type": "object", "required": [ "state" ], "properties": { "state": { "$ref": "#/definitions/silence.State" } } }, "sql.IndexInfo": { "type": "object", "required": [ "columns", "indexName", "indexType", "status", "tableName", "uniqueness" ], "properties": { "columns": { "type": "array", "items": { "type": "string" } }, "indexName": { "type": "string" }, "indexType": { "type": "string" }, "status": { "type": "string" }, "tableName": { "type": "string" }, "uniqueness": { "type": "string" } } }, "sql.MetricCategory": { "type": "string", "enum": [ "meta", "latency", "execution" ], "x-enum-varnames": [ "Meta", "Latency", "Execution" ] }, "sql.PlanDetail": { "type": "object", "required": [ "generatedTime", "planDetail", "planHash", "planID", "svrIP", "svrPort", "tenantID" ], "properties": { "generatedTime": { "type": "integer" }, "planDetail": { "$ref": "#/definitions/sql.PlanOperator" }, "planHash": { "type": "integer" }, "planID": { "type": "integer" }, "svrIP": { "type": "string" }, "svrPort": { "type": "integer" }, "tenantID": { "type": "integer" } } }, "sql.PlanDetailParam": { "type": "object", "required": [ "namespace", "obtenant", "planID", "svrIP", "svrPort", "tenantID" ], "properties": { "namespace": { "type": "string" }, "obtenant": { "type": "string" }, "planID": { "type": "integer" }, "svrIP": { "type": "string" }, "svrPort": { "type": "integer" }, "tenantID": { "type": "integer" } } }, "sql.PlanOperator": { "type": "object", "required": [ "cost", "estimatedRows", "operator" ], "properties": { "childOperators": { "type": "array", "items": { "$ref": "#/definitions/sql.PlanOperator" } }, "cost": { "type": "integer" }, "estimatedRows": { "type": "integer" }, "name": { "type": "string" }, "operator": { "type": "string" }, "outputOrFilter": { "type": "string" } } }, "sql.PlanStatistic": { "type": "object", "required": [ "generatedTime", "planHash", "planID", "svrIP", "svrPort", "tenantID" ], "properties": { "cost": { "type": "integer" }, "cpuCost": { "type": "integer" }, "generatedTime": { "type": "integer" }, "ioCost": { "type": "integer" }, "planHash": { "type": "integer" }, "planID": { "type": "integer" }, "realCost": { "type": "integer" }, "svrIP": { "type": "string" }, "svrPort": { "type": "integer" }, "tenantID": { "type": "integer" } } }, "sql.RequestStatisticInfo": { "type": "object", "required": [ "averageLatency", "database", "executionTrend", "failedExecutions", "latencyTrend", "planCategoryStatistics", "tenant", "totalExecutions", "totalLatency", "user" ], "properties": { "averageLatency": { "type": "number" }, "database": { "type": "string" }, "executionTrend": { "type": "array", "items": { "$ref": "#/definitions/response.MetricValue" } }, "failedExecutions": { "type": "number" }, "latencyTrend": { "type": "array", "items": { "$ref": "#/definitions/response.MetricValue" } }, "planCategoryStatistics": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlStatisticMetric" } }, "tenant": { "type": "string" }, "totalExecutions": { "type": "number" }, "totalLatency": { "type": "number" }, "user": { "type": "string" } } }, "sql.SqlDetailParam": { "type": "object", "required": [ "namespace", "obtenant", "sqlId" ], "properties": { "database": { "type": "string" }, "endTime": { "type": "integer" }, "includeInnerSql": { "type": "boolean" }, "namespace": { "type": "string" }, "obtenant": { "type": "string" }, "sqlId": { "type": "string" }, "startTime": { "type": "integer" }, "user": { "type": "string" } } }, "sql.SqlDetailedInfo": { "type": "object", "required": [ "plans" ], "properties": { "diagnoseInfo": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlDiagnoseInfo" } }, "indexies": { "type": "array", "items": { "$ref": "#/definitions/sql.IndexInfo" } }, "plans": { "type": "array", "items": { "$ref": "#/definitions/sql.PlanStatistic" } } } }, "sql.SqlDiagnoseInfo": { "type": "object", "properties": { "level": { "type": "string" }, "reason": { "type": "string" }, "ruleName": { "type": "string" }, "suggestion": { "type": "string" } } }, "sql.SqlFilter": { "type": "object", "required": [ "namespace", "obtenant" ], "properties": { "database": { "type": "string" }, "endTime": { "type": "integer" }, "includeInnerSql": { "type": "boolean" }, "keyword": { "type": "string" }, "namespace": { "type": "string" }, "obtenant": { "type": "string" }, "outputColumns": { "type": "array", "items": { "type": "string" } }, "pageNum": { "type": "integer" }, "pageSize": { "type": "integer" }, "sortColumn": { "type": "string" }, "sortOrder": { "type": "string" }, "startTime": { "type": "integer" }, "suspiciousOnly": { "type": "boolean" }, "user": { "type": "string" } } }, "sql.SqlHistoryInfo": { "type": "object", "required": [ "executionTrend", "latencyTrend" ], "properties": { "executionTrend": { "type": "array", "items": { "$ref": "#/definitions/response.MetricData" } }, "latencyTrend": { "type": "array", "items": { "$ref": "#/definitions/response.MetricData" } } } }, "sql.SqlHistoryParam": { "type": "object", "required": [ "interval", "namespace", "obtenant", "sqlId" ], "properties": { "database": { "type": "string" }, "endTime": { "type": "integer" }, "includeInnerSql": { "type": "boolean" }, "interval": { "type": "integer" }, "namespace": { "type": "string" }, "obtenant": { "type": "string" }, "outputColumns": { "type": "array", "items": { "type": "string" } }, "sqlId": { "type": "string" }, "startTime": { "type": "integer" }, "user": { "type": "string" } } }, "sql.SqlInfo": { "type": "object", "required": [ "executionStatistics", "latencyStatistics" ], "properties": { "causeType": { "type": "integer" }, "clientIp": { "type": "string" }, "dbId": { "type": "integer" }, "dbName": { "type": "string" }, "diagnoseInfo": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlDiagnoseInfo" } }, "effectiveTenantId": { "type": "integer" }, "event": { "type": "string" }, "executionStatistics": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlStatisticMetric" } }, "formatSqlId": { "type": "string" }, "lastFailInfo": { "type": "integer" }, "latencyStatistics": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlStatisticMetric" } }, "planId": { "type": "integer" }, "querySql": { "type": "string" }, "sid": { "type": "integer" }, "sqlId": { "type": "string" }, "subPlanCount": { "type": "integer" }, "svrIp": { "type": "string" }, "svrPort": { "type": "integer" }, "tenantId": { "type": "integer" }, "tenantName": { "type": "string" }, "traceId": { "type": "string" }, "txId": { "type": "string" }, "userClientIp": { "type": "string" }, "userId": { "type": "integer" }, "userName": { "type": "string" } } }, "sql.SqlMetricMeta": { "type": "object", "required": [ "description", "displayByDefault", "immutable", "key", "name", "unit" ], "properties": { "description": { "type": "string" }, "displayByDefault": { "type": "boolean" }, "immutable": { "type": "boolean" }, "key": { "type": "string" }, "name": { "type": "string" }, "unit": { "type": "string" } } }, "sql.SqlMetricMetaCategory": { "type": "object", "required": [ "category", "metrics" ], "properties": { "category": { "$ref": "#/definitions/sql.MetricCategory" }, "metrics": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlMetricMeta" } } } }, "sql.SqlRequestStatisticParam": { "type": "object", "required": [ "namespace", "obtenant", "statisticScopes" ], "properties": { "database": { "type": "string" }, "endTime": { "type": "integer" }, "includeInnerSql": { "type": "boolean" }, "namespace": { "type": "string" }, "obtenant": { "type": "string" }, "pageNum": { "type": "integer" }, "pageSize": { "type": "integer" }, "sortColumn": { "type": "string" }, "sortOrder": { "type": "string" }, "startTime": { "type": "integer" }, "statisticScopes": { "type": "array", "items": { "type": "string" } }, "user": { "type": "string" } } }, "sql.SqlStatisticMetric": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "number" } } }, "sql.SqlStatsList": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/sql.SqlInfo" } }, "totalCount": { "type": "integer" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Cookie", "in": "header" } } }