{ "swagger": "2.0", "info": { "description": "This is a KubeFATE.", "title": "KubeFATE service API", "contact": { "name": "API Support", "url": "https://github.com/FederatedAI/KubeFATE" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "v1" }, "basePath": "/v1", "paths": { "/chart": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Chart" ], "summary": "List all historical Charts", "parameters": [ { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/modules.HelmChart" } } } } ] } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Chart" ], "summary": "Upload a Chart", "parameters": [ { "type": "file", "description": "Cluster Chart", "name": "file", "in": "formData", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.HelmUUID" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/chart/{chartId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Chart" ], "summary": "Get Chart by chartId", "parameters": [ { "type": "string", "description": "Chart Id", "name": "chartId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.HelmChart" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Chart" ], "summary": "Delete Chart by chartId", "parameters": [ { "type": "string", "description": "chart Id", "name": "chartId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/api.JSONEMSGResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONEMSGResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/cluster": { "put": { "security": [ { "ApiKeyAuth": [] }, { "OAuth2Application": [ "write", "admin" ] } ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "Updates a Cluster in the store with form data", "parameters": [ { "description": "Cluster Args", "name": "ClusterArgs", "in": "body", "required": true, "schema": { "$ref": "#/definitions/modules.ClusterArgs" } }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.Job" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] }, { "OAuth2Application": [ "write", "admin" ] } ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "Create a new Cluster", "parameters": [ { "description": "Cluster Args", "name": "clusterArgs", "in": "body", "required": true, "schema": { "$ref": "#/definitions/modules.ClusterArgs" } }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.Job" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/cluster/": { "get": { "security": [ { "ApiKeyAuth": [] }, { "OAuth2Application": [ "write", "admin" ] } ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "List all available Clusters", "parameters": [ { "type": "boolean", "default": false, "description": "get All Cluster", "name": "all", "in": "query", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/modules.Cluster" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/cluster/{clusterId}": { "get": { "security": [ { "ApiKeyAuth": [] }, { "OAuth2Application": [ "write", "admin" ] } ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "create Cluster", "parameters": [ { "type": "string", "description": "Cluster Id", "name": "clusterId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.Cluster" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] }, { "OAuth2Application": [ "write", "admin" ] } ], "produces": [ "application/json" ], "tags": [ "Cluster" ], "summary": "Delete a Cluster", "parameters": [ { "type": "string", "description": "Cluster Id", "name": "clusterId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.Job" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/job/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "List all historical jobs", "parameters": [ { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/modules.Job" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/job/{jobId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Get job by jobId", "parameters": [ { "type": "string", "description": "Job ID", "name": "jobId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.Job" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Update job status to stop, stop job", "parameters": [ { "type": "string", "description": "Job ID", "name": "jobId", "in": "path", "required": true }, { "type": "string", "default": "stop", "description": "jobStatus=stop", "name": "jobStatus", "in": "query", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Delete Job by jobId", "parameters": [ { "type": "string", "description": "Job ID", "name": "jobId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/api.JSONEMSGResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/log/{clusterID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "When the container of requestArgs is not set, the logs of all components will be obtained", "produces": [ "application/json" ], "tags": [ "Log" ], "summary": "Get Cluster log by clusterID", "parameters": [ { "type": "integer", "description": "Cluster ID", "name": "clusterID", "in": "path", "required": true }, { "type": "string", "description": "container name", "name": "container", "in": "query", "required": true }, { "type": "boolean", "default": false, "description": "previous", "name": "previous", "in": "query", "required": true }, { "type": "string", "description": "since", "name": "since", "in": "query", "required": true }, { "type": "string", "description": "since-time", "name": "since-time", "in": "query", "required": true }, { "type": "boolean", "default": false, "description": "timestamps", "name": "timestamps", "in": "query", "required": true }, { "type": "string", "description": "tail", "name": "tail", "in": "query", "required": true }, { "type": "string", "description": "limit-bytes", "name": "limit-bytes", "in": "query", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/log/{clusterID}/ws": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Log" ], "summary": "Get Cluster Log flow (http1.1)", "parameters": [ { "type": "integer", "description": "Cluster ID", "name": "clusterID", "in": "path", "required": true }, { "type": "string", "description": "container name", "name": "container", "in": "query", "required": true }, { "type": "boolean", "description": "previous", "name": "previous", "in": "query", "required": true }, { "type": "string", "description": "since", "name": "since", "in": "query", "required": true }, { "type": "string", "description": "since-time", "name": "since-time", "in": "query", "required": true }, { "type": "boolean", "description": "timestamps", "name": "timestamps", "in": "query", "required": true }, { "type": "string", "description": "tail", "name": "tail", "in": "query", "required": true }, { "type": "string", "description": "limit-bytes", "name": "limit-bytes", "in": "query", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/namespace/": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Namespace" ], "summary": "Get Namespace List of Kubernetes", "parameters": [ { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.Namespace" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/user": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "List all available user", "parameters": [ { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/modules.User" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Update user", "parameters": [ { "description": "User", "name": "User", "in": "body", "required": true, "schema": { "$ref": "#/definitions/modules.User" } }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.User" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Create a user", "parameters": [ { "description": "User", "name": "User", "in": "body", "required": true, "schema": { "$ref": "#/definitions/modules.User" } }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.User" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/user/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "login", "parameters": [ { "description": "Login", "name": "login", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.Login" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.TokenResult" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.JSONEMSGResult" } } } } }, "/user/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "logout", "parameters": [ { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.JSONEMSGResult" } } } } }, "/user/{userId}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Get user by userId", "parameters": [ { "type": "string", "description": "User", "name": "userId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/modules.User" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Delete user by userId", "parameters": [ { "type": "string", "description": "User", "name": "userId", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/api.JSONEMSGResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/valueTemplateExample/{chartName}/{chartVersion}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Chart" ], "summary": "return valueTemplateExample string by chart name and version", "parameters": [ { "type": "string", "description": "chart name", "name": "chartName", "in": "path", "required": true }, { "type": "string", "description": "chart version", "name": "chartVersion", "in": "path", "required": true }, { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "Success", "schema": { "allOf": [ { "$ref": "#/definitions/api.JSONResult" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "401": { "description": "Unauthorized operation", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } }, "500": { "description": "Internal server error", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } }, "/version": { "get": { "security": [ { "ApiKeyAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Version" ], "summary": "Get build version", "parameters": [ { "type": "string", "default": "Bearer \u003cToken\u003e", "description": "Authentication header", "name": "Authorization", "in": "header", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/api.VersionResult" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/api.JSONERRORResult" } } } } } }, "definitions": { "api.HelmUUID": { "type": "object", "properties": { "helmUUID": { "type": "string" } } }, "api.JSONEMSGResult": { "type": "object", "properties": { "code": { "type": "integer", "example": 401 }, "msg": { "type": "string", "example": "cookie token is empty" } } }, "api.JSONERRORResult": { "type": "object", "properties": { "code": { "type": "integer" }, "error": { "type": "string" } } }, "api.JSONResult": { "type": "object", "properties": { "msg": { "type": "string", "example": "Success" } } }, "api.Login": { "type": "object", "properties": { "password": { "type": "string", "example": "admin" }, "username": { "type": "string", "example": "admin" } } }, "api.TokenResult": { "type": "object", "properties": { "code": { "type": "integer", "example": 200 }, "expire": { "type": "string", "example": "2021-01-28T14:48:53+08:00" }, "token": { "type": "string", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } } }, "api.VersionResult": { "type": "object", "properties": { "msg": { "type": "string", "example": "getVersion Success" }, "version": { "type": "string", "example": "v1.3.0" } } }, "gorm.DeletedAt": { "type": "object", "properties": { "time": { "type": "string" }, "valid": { "description": "Valid is true if Time is not NULL", "type": "boolean" } } }, "modules.Cluster": { "type": "object", "properties": { "Info": { "description": "Info is the corresponding information of Cluster in k8s", "$ref": "#/definitions/modules.MapStringInterface" }, "Spec": { "description": "Spec corresponding to values(of Cluster) is decoded into interface by yaml", "$ref": "#/definitions/modules.MapStringInterface" }, "chart_name": { "type": "string" }, "chart_values": { "description": "Values through the values in the Chart file- template.yaml The file generates the corresponding helm values file", "$ref": "#/definitions/modules.MapStringInterface" }, "chart_version": { "type": "string" }, "createdAt": { "type": "string" }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "helm_revision": { "description": "Cluster revision of helm", "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "namespaces": { "type": "string" }, "revision": { "description": "Cluster revision", "type": "integer" }, "status": { "description": "The status of the Cluster, including: \"Creating\",\"Deleting\",\"Updating\",\"Running\",\"Unavailable\",\"Deleted\"", "type": "integer" }, "updatedAt": { "type": "string" }, "uuid": { "description": "UUID is created by github.com/satori/go A combination of 36 bit strings generated by. UUID", "type": "string" }, "values": { "description": "Values field storage cluster.yaml File content of", "type": "string" } } }, "modules.ClusterArgs": { "type": "object", "properties": { "Keep_upgrade_job": { "type": "boolean" }, "chart_name": { "type": "string" }, "chart_version": { "type": "string" }, "cover": { "type": "boolean" }, "data": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "namespace": { "type": "string" } } }, "modules.HelmChart": { "type": "object", "properties": { "app_version": { "type": "string" }, "chart": { "type": "string" }, "createdAt": { "type": "string" }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updatedAt": { "type": "string" }, "uuid": { "type": "string" }, "values": { "type": "string" }, "values_template": { "type": "string" }, "values_template_example": { "type": "string" }, "version": { "type": "string" } } }, "modules.Job": { "type": "object", "properties": { "cluster_id": { "type": "string" }, "createdAt": { "type": "string" }, "creator": { "type": "string" }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "end_time": { "type": "string" }, "id": { "type": "integer" }, "meta_data": { "$ref": "#/definitions/modules.ClusterArgs" }, "method": { "type": "string" }, "start_time": { "type": "string" }, "states": { "type": "array", "items": { "type": "string" } }, "status": { "type": "integer" }, "sub_jobs": { "$ref": "#/definitions/modules.SubJobs" }, "time_limit": { "type": "string" }, "updatedAt": { "type": "string" }, "uuid": { "type": "string" } } }, "modules.MapStringInterface": { "type": "object", "additionalProperties": true }, "modules.Namespace": { "type": "object", "properties": { "age": { "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" } }, "labels": { "type": "object", "additionalProperties": { "type": "string" } }, "name": { "type": "string" }, "status": { "type": "string" } } }, "modules.SubJob": { "type": "object", "properties": { "endTime": { "type": "string" }, "moduleName": { "type": "string" }, "modulesStatus": { "type": "string" }, "startTime": { "type": "string" }, "status": { "type": "string" } } }, "modules.SubJobs": { "type": "object", "additionalProperties": { "$ref": "#/definitions/modules.SubJob" } }, "modules.User": { "type": "object", "properties": { "createdAt": { "type": "string" }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "email": { "type": "string" }, "id": { "type": "integer" }, "password": { "type": "string" }, "salt": { "type": "string" }, "updatedAt": { "type": "string" }, "userStatus": { "type": "integer" }, "username": { "type": "string" }, "uuid": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }