diff --git a/agent/app/api/v2/ai.go b/agent/app/api/v2/ai.go index 8b24a0a93..11bdd22c7 100644 --- a/agent/app/api/v2/ai.go +++ b/agent/app/api/v2/ai.go @@ -60,7 +60,7 @@ func (b *BaseApi) RecreateOllamaModel(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /ai/ollama/model/close [post] +// @Router /ai/ollama/close [post] // @x-panel-log {"bodyKeys":["name"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"关闭 Ollama 模型连接 [name]","formatEN":"close conn for Ollama model [name]"} func (b *BaseApi) CloseOllamaModel(c *gin.Context) { var req dto.OllamaModelName diff --git a/agent/app/api/v2/app_install.go b/agent/app/api/v2/app_install.go index e12e2a365..7d8b840c1 100644 --- a/agent/app/api/v2/app_install.go +++ b/agent/app/api/v2/app_install.go @@ -109,7 +109,7 @@ func (b *BaseApi) LoadPort(c *gin.Context) { // @Success 200 {object} response.DatabaseConn // @Security ApiKeyAuth // @Security Timestamp -// @Router /apps/installed/conninfo/:key [get] +// @Router /apps/installed/conninfo [POST] func (b *BaseApi) LoadConnInfo(c *gin.Context) { var req dto.OperationWithNameAndType if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/backup.go b/agent/app/api/v2/backup.go index dc298ea37..6f0cf6b28 100644 --- a/agent/app/api/v2/backup.go +++ b/agent/app/api/v2/backup.go @@ -74,7 +74,7 @@ func (b *BaseApi) RefreshToken(c *gin.Context) { // @Success 200 {array} object // @Security ApiKeyAuth // @Security Timestamp -// @Router /buckets [post] +// @Router /backups/buckets [post] func (b *BaseApi) ListBuckets(c *gin.Context) { var req dto.ForBuckets if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -295,7 +295,7 @@ func (b *BaseApi) SearchBackupRecordsByCronjob(c *gin.Context) { // @Success 200 {string} filePath // @Security ApiKeyAuth // @Security Timestamp -// @Router /backup/record/download [post] +// @Router /backups/record/download [post] // @x-panel-log {"bodyKeys":["source","fileName"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"下载备份记录 [source][fileName]","formatEN":"download backup records [source][fileName]"} func (b *BaseApi) DownloadRecord(c *gin.Context) { var req dto.DownloadRecord @@ -318,7 +318,7 @@ func (b *BaseApi) DownloadRecord(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /backup/record/description/update [post] +// @Router /backups/record/description/update [post] func (b *BaseApi) UpdateRecordDescription(c *gin.Context) { var req dto.UpdateDescription if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -339,7 +339,7 @@ func (b *BaseApi) UpdateRecordDescription(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /record/del [post] +// @Router /backups/record/del [post] // @x-panel-log {"bodyKeys":["ids"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"ids","isList":true,"db":"backup_records","output_column":"file_name","output_value":"files"}],"formatZH":"删除备份记录 [files]","formatEN":"delete backup records [files]"} func (b *BaseApi) DeleteBackupRecord(c *gin.Context) { var req dto.BatchDeleteReq diff --git a/agent/app/api/v2/clam.go b/agent/app/api/v2/clam.go index bf0f40ff7..d6c59a63e 100644 --- a/agent/app/api/v2/clam.go +++ b/agent/app/api/v2/clam.go @@ -104,7 +104,7 @@ func (b *BaseApi) SearchClam(c *gin.Context) { // @Success 200 {object} dto.ClamBaseInfo // @Security ApiKeyAuth // @Security Timestamp -// @Router /toolbox/clam/base [get] +// @Router /toolbox/clam/base [post] func (b *BaseApi) LoadClamBaseInfo(c *gin.Context) { info, err := clamService.LoadBaseInfo() if err != nil { diff --git a/agent/app/api/v2/container.go b/agent/app/api/v2/container.go index 54030e895..d9c7d1ba6 100644 --- a/agent/app/api/v2/container.go +++ b/agent/app/api/v2/container.go @@ -697,7 +697,7 @@ func (b *BaseApi) ComposeUpdate(c *gin.Context) { // @Param tail query string false "显示行号" // @Security ApiKeyAuth // @Security Timestamp -// @Router /containers/search/log [post] +// @Router /containers/search/log [get] func (b *BaseApi) ContainerStreamLogs(c *gin.Context) { c.Header("Content-Type", "text/event-stream") c.Header("Cache-Control", "no-cache") diff --git a/agent/app/api/v2/dashboard.go b/agent/app/api/v2/dashboard.go index 7ccd0ae9e..3271b9095 100644 --- a/agent/app/api/v2/dashboard.go +++ b/agent/app/api/v2/dashboard.go @@ -88,7 +88,7 @@ func (b *BaseApi) UpdateAppLauncher(c *gin.Context) { // @Success 200 {Array} dto.QuickJump // @Security ApiKeyAuth // @Security Timestamp -// @Router /dashboard/quick/option [post] +// @Router /dashboard/quick/option [get] func (b *BaseApi) LoadQuickOption(c *gin.Context) { helper.SuccessWithData(c, dashboardService.LoadQuickOptions()) } diff --git a/agent/app/api/v2/database.go b/agent/app/api/v2/database.go index 4a9207b28..82ac83594 100644 --- a/agent/app/api/v2/database.go +++ b/agent/app/api/v2/database.go @@ -160,7 +160,7 @@ func (b *BaseApi) GetDatabase(c *gin.Context) { // @Success 200 {array} string // @Security ApiKeyAuth // @Security Timestamp -// @Router /db/remote/del/check [post] +// @Router /databases/db/del/check [post] func (b *BaseApi) DeleteCheckDatabase(c *gin.Context) { var req dto.OperateByID if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/disk.go b/agent/app/api/v2/disk.go index b0a28d096..2bddd2c69 100644 --- a/agent/app/api/v2/disk.go +++ b/agent/app/api/v2/disk.go @@ -13,7 +13,7 @@ import ( // @Success 200 {object} response.CompleteDiskInfo // @Security ApiKeyAuth // @Security Timestamp -// @Router /disks [get] +// @Router /hosts/disks [get] func (b *BaseApi) GetCompleteDiskInfo(c *gin.Context) { diskInfo, err := diskService.GetCompleteDiskInfo() if err != nil { @@ -31,7 +31,7 @@ func (b *BaseApi) GetCompleteDiskInfo(c *gin.Context) { // @Success 200 {string} string "Partition created successfully" // @Security ApiKeyAuth // @Security Timestamp -// @Router /disks/partition [post] +// @Router /hosts/disks/partition [post] // @x-panel-log {"bodyKeys":["device", "filesystem", "mountPoint"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"对磁盘 [device] 进行分区,文件系统 [filesystem],挂载点 [mountPoint]","formatEN":"Partition disk [device] with filesystem [filesystem], mount point [mountPoint]"} func (b *BaseApi) PartitionDisk(c *gin.Context) { var req request.DiskPartitionRequest @@ -56,7 +56,7 @@ func (b *BaseApi) PartitionDisk(c *gin.Context) { // @Success 200 {string} string "Disk mounted successfully" // @Security ApiKeyAuth // @Security Timestamp -// @Router /disks/mount [post] +// @Router /hosts/disks/mount [post] // @x-panel-log {"bodyKeys":["device", "mountPoint"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"挂载磁盘 [device] 到 [mountPoint]","formatEN":"Mount disk [device] to [mountPoint]"} func (b *BaseApi) MountDisk(c *gin.Context) { var req request.DiskMountRequest @@ -81,7 +81,7 @@ func (b *BaseApi) MountDisk(c *gin.Context) { // @Success 200 {string} string "Disk unmounted successfully" // @Security ApiKeyAuth // @Security Timestamp -// @Router /disks/unmount [post] +// @Router /hosts/disks/unmount [post] // @x-panel-log {"bodyKeys":["device", "mountPoint"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"卸载磁盘 [device] 从 [mountPoint]","formatEN":"Unmount disk [device] from [mountPoint]"} func (b *BaseApi) UnmountDisk(c *gin.Context) { var req request.DiskUnmountRequest diff --git a/agent/app/api/v2/file.go b/agent/app/api/v2/file.go index e113279f9..9afb2b181 100644 --- a/agent/app/api/v2/file.go +++ b/agent/app/api/v2/file.go @@ -880,7 +880,7 @@ func (b *BaseApi) GetPathByType(c *gin.Context) { // @Success 200 {object} dto.DiskInfo // @Security ApiKeyAuth // @Security Timestamp -// @Router /mount [post] +// @Router /files/mount [post] func (b *BaseApi) GetHostMount(c *gin.Context) { disks := fileService.GetHostMount() helper.SuccessWithData(c, disks) @@ -892,7 +892,7 @@ func (b *BaseApi) GetHostMount(c *gin.Context) { // @Success 200 {object} response.UserGroupResponse // @Security ApiKeyAuth // @Security Timestamp -// @Router /user/group [post] +// @Router /files/user/group [post] func (b *BaseApi) GetUsersAndGroups(c *gin.Context) { res, err := fileService.GetUsersAndGroups() if err != nil { diff --git a/agent/app/api/v2/host_tool.go b/agent/app/api/v2/host_tool.go index 7132163ef..ec181051d 100644 --- a/agent/app/api/v2/host_tool.go +++ b/agent/app/api/v2/host_tool.go @@ -35,7 +35,7 @@ func (b *BaseApi) GetToolStatus(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /hosts/tool/create [post] +// @Router /hosts/tool/init [post] // @x-panel-log {"bodyKeys":["type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"创建 [type] 配置","formatEN":"create [type] config"} func (b *BaseApi) InitToolConfig(c *gin.Context) { var req request.HostToolCreate diff --git a/agent/app/api/v2/image_repo.go b/agent/app/api/v2/image_repo.go index 73ed02063..a8f3df23c 100644 --- a/agent/app/api/v2/image_repo.go +++ b/agent/app/api/v2/image_repo.go @@ -58,7 +58,7 @@ func (b *BaseApi) ListRepo(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /containers/repo/status [get] +// @Router /containers/repo/status [post] func (b *BaseApi) CheckRepoStatus(c *gin.Context) { var req dto.OperateByID if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/mcp_server.go b/agent/app/api/v2/mcp_server.go index 3b96e290a..19d05224a 100644 --- a/agent/app/api/v2/mcp_server.go +++ b/agent/app/api/v2/mcp_server.go @@ -13,7 +13,7 @@ import ( // @Success 200 {object} response.McpServersRes // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/search [post] +// @Router /ai/mcp/search [post] func (b *BaseApi) PageMcpServers(c *gin.Context) { var req request.McpServerSearch if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -30,7 +30,7 @@ func (b *BaseApi) PageMcpServers(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/server [post] +// @Router /ai/mcp/server [post] func (b *BaseApi) CreateMcpServer(c *gin.Context) { var req request.McpServerCreate if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -51,7 +51,7 @@ func (b *BaseApi) CreateMcpServer(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/server/update [post] +// @Router /ai/mcp/server/update [post] func (b *BaseApi) UpdateMcpServer(c *gin.Context) { var req request.McpServerUpdate if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -72,7 +72,7 @@ func (b *BaseApi) UpdateMcpServer(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/server/del [post] +// @Router /ai/mcp/server/del [post] func (b *BaseApi) DeleteMcpServer(c *gin.Context) { var req request.McpServerDelete if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -93,7 +93,7 @@ func (b *BaseApi) DeleteMcpServer(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/server/op [post] +// @Router /ai/mcp/server/op [post] func (b *BaseApi) OperateMcpServer(c *gin.Context) { var req request.McpServerOperate if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -114,7 +114,7 @@ func (b *BaseApi) OperateMcpServer(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/domain/bind [post] +// @Router /ai/mcp/domain/bind [post] func (b *BaseApi) BindMcpDomain(c *gin.Context) { var req request.McpBindDomain if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -135,7 +135,7 @@ func (b *BaseApi) BindMcpDomain(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/domain/update [post] +// @Router /ai/mcp/domain/update [post] func (b *BaseApi) UpdateMcpBindDomain(c *gin.Context) { var req request.McpBindDomainUpdate if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -155,7 +155,7 @@ func (b *BaseApi) UpdateMcpBindDomain(c *gin.Context) { // @Success 200 {object} response.McpBindDomainRes // @Security ApiKeyAuth // @Security Timestamp -// @Router /mcp/domain/get [get] +// @Router /ai/mcp/domain/get [get] func (b *BaseApi) GetMcpBindDomain(c *gin.Context) { res, err := mcpServerService.GetBindDomain() if err != nil { diff --git a/agent/app/api/v2/nginx.go b/agent/app/api/v2/nginx.go index 8d92a9fa7..051de488e 100644 --- a/agent/app/api/v2/nginx.go +++ b/agent/app/api/v2/nginx.go @@ -129,7 +129,7 @@ func (b *BaseApi) BuildNginx(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /openresty/module/update [post] +// @Router /openresty/modules/update [post] // @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"更新 OpenResty 模块","formatEN":"Update OpenResty module"} func (b *BaseApi) UpdateNginxModule(c *gin.Context) { var req request.NginxModuleUpdate diff --git a/agent/app/api/v2/runtime.go b/agent/app/api/v2/runtime.go index 03c8bef60..d5c8e4784 100644 --- a/agent/app/api/v2/runtime.go +++ b/agent/app/api/v2/runtime.go @@ -81,7 +81,7 @@ func (b *BaseApi) DeleteRuntime(c *gin.Context) { // @Success 200 {array} dto.AppResource // @Security ApiKeyAuth // @Security Timestamp -// @Router /installed/delete/check/:id [get] +// @Router /runtimes/installed/delete/check/:id [get] func (b *BaseApi) DeleteRuntimeCheck(c *gin.Context) { runTimeId, err := helper.GetIntParamByKey(c, "id") if err != nil { @@ -459,7 +459,7 @@ func (b *BaseApi) GetSupervisorProcess(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /runtimes/supervisor/process/operate [post] +// @Router /runtimes/supervisor/process [post] func (b *BaseApi) OperateSupervisorProcess(c *gin.Context) { var req request.PHPSupervisorProcessConfig if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -480,7 +480,7 @@ func (b *BaseApi) OperateSupervisorProcess(c *gin.Context) { // @Success 200 {string} content // @Security ApiKeyAuth // @Security Timestamp -// @Router /runtimes/supervisor/process/file/operate [post] +// @Router /runtimes/supervisor/process/file [post] func (b *BaseApi) OperateSupervisorProcessFile(c *gin.Context) { var req request.PHPSupervisorProcessFileReq if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/agent/app/api/v2/snapshot.go b/agent/app/api/v2/snapshot.go index 497bedab8..16d7603c7 100644 --- a/agent/app/api/v2/snapshot.go +++ b/agent/app/api/v2/snapshot.go @@ -50,7 +50,7 @@ func (b *BaseApi) CreateSnapshot(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /settings/snapshot/recrete [post] +// @Router /settings/snapshot/recreate [post] // @x-panel-log {"bodyKeys":["id"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"id","isList":false,"db":"snapshots","output_column":"name","output_value":"name"}],"formatZH":"重试创建快照 [name]","formatEN":"recrete the snapshot [name]"} func (b *BaseApi) RecreateSnapshot(c *gin.Context) { var req dto.OperateByID diff --git a/agent/app/api/v2/ssh.go b/agent/app/api/v2/ssh.go index 279d0d072..0f0d47c71 100644 --- a/agent/app/api/v2/ssh.go +++ b/agent/app/api/v2/ssh.go @@ -74,7 +74,7 @@ func (b *BaseApi) UpdateSSH(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /hosts/conffile/update [post] +// @Router /hosts/ssh/conffile/update [post] // @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置文件","formatEN":"update SSH conf"} func (b *BaseApi) UpdateSSHByfile(c *gin.Context) { var req dto.SSHConf diff --git a/agent/app/api/v2/website.go b/agent/app/api/v2/website.go index 3292a0ce5..9c9e6b05a 100644 --- a/agent/app/api/v2/website.go +++ b/agent/app/api/v2/website.go @@ -527,7 +527,7 @@ func (b *BaseApi) UpdateProxyConfig(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /websites/proxy/file [post] +// @Router /websites/proxies/file [post] // @x-panel-log {"bodyKeys":["websiteID"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"websiteID","isList":false,"db":"websites","output_column":"primary_domain","output_value":"domain"}],"formatZH":"更新反向代理文件 [domain]","formatEN":"Nginx conf proxy file update [domain]"} func (b *BaseApi) UpdateProxyConfigFile(c *gin.Context) { var req request.NginxProxyUpdate @@ -840,7 +840,7 @@ func (b *BaseApi) CreateLoadBalance(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /websites/lbs/delete [post] +// @Router /websites/lbs/del [post] func (b *BaseApi) DeleteLoadBalance(c *gin.Context) { var req request.WebsiteLBDelete if err := helper.CheckBindAndValidate(&req, c); err != nil { @@ -953,7 +953,7 @@ func (b *BaseApi) GetProxyCache(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Security Timestamp -// @Router /websites/realip [post] +// @Router /websites/realip/config [post] // @x-panel-log {"bodyKeys":["websiteID"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"websiteID","isList":false,"db":"websites","output_column":"primary_domain","output_value":"domain"}],"formatZH":"修改 [domain] 网站真实IP配置 ","formatEN":"Modify the real IP configuration of [domain] website"} func (b *BaseApi) SetRealIPConfig(c *gin.Context) { var req request.WebsiteRealIP diff --git a/core/cmd/server/docs/docs.go b/core/cmd/server/docs/docs.go index 4e12691d2..057d01056 100644 --- a/core/cmd/server/docs/docs.go +++ b/core/cmd/server/docs/docs.go @@ -115,6 +115,325 @@ const docTemplate = `{ ] } }, + "/ai/mcp/domain/bind": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpBindDomain" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Bind Domain for mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/domain/get": { + "get": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.McpBindDomainRes" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get bin Domain for mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/domain/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpBindDomainUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update bind Domain for mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/search": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.McpServersRes" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List mcp servers", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Create mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server/del": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerDelete" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server/op": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Operate mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/ollama/close": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OllamaModelName" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Close Ollama model conn", + "tags": [ + "AI" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "close conn for Ollama model [name]", + "formatZH": "关闭 Ollama 模型连接 [name]", + "paramKeys": [] + } + } + }, "/ai/ollama/model": { "post": { "consumes": [ @@ -159,50 +478,6 @@ const docTemplate = `{ } } }, - "/ai/ollama/model/close": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OllamaModelName" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Close Ollama model conn", - "tags": [ - "AI" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name" - ], - "formatEN": "close conn for Ollama model [name]", - "formatZH": "关闭 Ollama 模型连接 [name]", - "paramKeys": [] - } - } - }, "/ai/ollama/model/del": { "post": { "consumes": [ @@ -796,8 +1071,8 @@ const docTemplate = `{ } } }, - "/apps/installed/conninfo/:key": { - "get": { + "/apps/installed/conninfo": { + "post": { "consumes": [ "application/json" ], @@ -1453,89 +1728,6 @@ const docTemplate = `{ } } }, - "/backup/record/description/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.UpdateDescription" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update backup record description", - "tags": [ - "Backup Account" - ] - } - }, - "/backup/record/download": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.DownloadRecord" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Download backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "source", - "fileName" - ], - "formatEN": "download backup records [source][fileName]", - "formatZH": "下载备份记录 [source][fileName]", - "paramKeys": [] - } - } - }, "/backups": { "post": { "consumes": [ @@ -1626,6 +1818,47 @@ const docTemplate = `{ } } }, + "/backups/buckets": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ForBuckets" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "object" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List buckets", + "tags": [ + "Backup Account" + ] + } + }, "/backups/del": { "post": { "consumes": [ @@ -1733,6 +1966,142 @@ const docTemplate = `{ ] } }, + "/backups/record/del": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.BatchDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "backup_records", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "file_name", + "output_value": "files" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete backup records [files]", + "formatZH": "删除备份记录 [files]", + "paramKeys": [] + } + } + }, + "/backups/record/description/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.UpdateDescription" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update backup record description", + "tags": [ + "Backup Account" + ] + } + }, + "/backups/record/download": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.DownloadRecord" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Download backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "source", + "fileName" + ], + "formatEN": "download backup records [source][fileName]", + "formatZH": "下载备份记录 [source][fileName]", + "paramKeys": [] + } + } + }, "/backups/record/search": { "post": { "consumes": [ @@ -2143,47 +2512,6 @@ const docTemplate = `{ } } }, - "/buckets": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ForBuckets" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "object" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "List buckets", - "tags": [ - "Backup Account" - ] - } - }, "/containers": { "post": { "consumes": [ @@ -3961,7 +4289,7 @@ const docTemplate = `{ } }, "/containers/repo/status": { - "get": { + "post": { "consumes": [ "application/json" ], @@ -4096,7 +4424,7 @@ const docTemplate = `{ } }, "/containers/search/log": { - "post": { + "get": { "parameters": [ { "description": "容器名称", @@ -8141,7 +8469,7 @@ const docTemplate = `{ } }, "/dashboard/quick/option": { - "post": { + "get": { "responses": { "200": { "description": "OK", @@ -8683,6 +9011,47 @@ const docTemplate = `{ } } }, + "/databases/db/del/check": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Check before delete remote database", + "tags": [ + "Database" + ] + } + }, "/databases/db/item/:type": { "get": { "responses": { @@ -9898,223 +10267,6 @@ const docTemplate = `{ } } }, - "/db/remote/del/check": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Check before delete remote database", - "tags": [ - "Database" - ] - } - }, - "/disks": { - "get": { - "description": "Get information about all disks including partitioned and unpartitioned disks", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.CompleteDiskInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get complete disk information", - "tags": [ - "Disk Management" - ] - } - }, - "/disks/mount": { - "post": { - "consumes": [ - "application/json" - ], - "description": "Mount partition to specified mount point", - "parameters": [ - { - "description": "mount request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.DiskMountRequest" - } - } - ], - "responses": { - "200": { - "description": "Disk mounted successfully", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Mount disk", - "tags": [ - "Disk Management" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "device", - "mountPoint" - ], - "formatEN": "Mount disk [device] to [mountPoint]", - "formatZH": "挂载磁盘 [device] 到 [mountPoint]", - "paramKeys": [] - } - } - }, - "/disks/partition": { - "post": { - "consumes": [ - "application/json" - ], - "description": "Create partition and format disk with specified filesystem", - "parameters": [ - { - "description": "partition request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.DiskPartitionRequest" - } - } - ], - "responses": { - "200": { - "description": "Partition created successfully", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Partition disk", - "tags": [ - "Disk Management" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "device", - "filesystem", - "mountPoint" - ], - "formatEN": "Partition disk [device] with filesystem [filesystem], mount point [mountPoint]", - "formatZH": "对磁盘 [device] 进行分区,文件系统 [filesystem],挂载点 [mountPoint]", - "paramKeys": [] - } - } - }, - "/disks/unmount": { - "post": { - "consumes": [ - "application/json" - ], - "description": "Unmount partition from mount point", - "parameters": [ - { - "description": "unmount request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.DiskUnmountRequest" - } - } - ], - "responses": { - "200": { - "description": "Disk unmounted successfully", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Unmount disk", - "tags": [ - "Disk Management" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "device", - "mountPoint" - ], - "formatEN": "Unmount disk [device] from [mountPoint]", - "formatZH": "卸载磁盘 [device] 从 [mountPoint]", - "paramKeys": [] - } - } - }, "/files": { "post": { "consumes": [ @@ -10839,6 +10991,33 @@ const docTemplate = `{ } } }, + "/files/mount": { + "post": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.DiskInfo" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "system mount", + "tags": [ + "File" + ] + } + }, "/files/move": { "post": { "consumes": [ @@ -11398,6 +11577,33 @@ const docTemplate = `{ ] } }, + "/files/user/group": { + "post": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.UserGroupResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "system user and group", + "tags": [ + "File" + ] + } + }, "/files/wget": { "post": { "consumes": [ @@ -11675,25 +11881,18 @@ const docTemplate = `{ ] } }, - "/hosts/conffile/update": { - "post": { - "consumes": [ + "/hosts/disks": { + "get": { + "description": "Get information about all disks including partitioned and unpartitioned disks", + "produces": [ "application/json" ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SSHConf" - } - } - ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/response.CompleteDiskInfo" + } } }, "security": [ @@ -11704,15 +11903,156 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Update host SSH setting by file", + "summary": "Get complete disk information", "tags": [ - "SSH" + "Disk Management" + ] + } + }, + "/hosts/disks/mount": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Mount partition to specified mount point", + "parameters": [ + { + "description": "mount request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.DiskMountRequest" + } + } + ], + "responses": { + "200": { + "description": "Disk mounted successfully", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Mount disk", + "tags": [ + "Disk Management" ], "x-panel-log": { "BeforeFunctions": [], - "bodyKeys": [], - "formatEN": "update SSH conf", - "formatZH": "修改 SSH 配置文件", + "bodyKeys": [ + "device", + "mountPoint" + ], + "formatEN": "Mount disk [device] to [mountPoint]", + "formatZH": "挂载磁盘 [device] 到 [mountPoint]", + "paramKeys": [] + } + } + }, + "/hosts/disks/partition": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Create partition and format disk with specified filesystem", + "parameters": [ + { + "description": "partition request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.DiskPartitionRequest" + } + } + ], + "responses": { + "200": { + "description": "Partition created successfully", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Partition disk", + "tags": [ + "Disk Management" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "device", + "filesystem", + "mountPoint" + ], + "formatEN": "Partition disk [device] with filesystem [filesystem], mount point [mountPoint]", + "formatZH": "对磁盘 [device] 进行分区,文件系统 [filesystem],挂载点 [mountPoint]", + "paramKeys": [] + } + } + }, + "/hosts/disks/unmount": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Unmount partition from mount point", + "parameters": [ + { + "description": "unmount request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.DiskUnmountRequest" + } + } + ], + "responses": { + "200": { + "description": "Disk unmounted successfully", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Unmount disk", + "tags": [ + "Disk Management" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "device", + "mountPoint" + ], + "formatEN": "Unmount disk [device] from [mountPoint]", + "formatZH": "卸载磁盘 [device] 从 [mountPoint]", "paramKeys": [] } } @@ -12403,6 +12743,48 @@ const docTemplate = `{ ] } }, + "/hosts/ssh/conffile/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SSHConf" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update host SSH setting by file", + "tags": [ + "SSH" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "update SSH conf", + "formatZH": "修改 SSH 配置文件", + "paramKeys": [] + } + } + }, "/hosts/ssh/log": { "post": { "consumes": [ @@ -12677,7 +13059,7 @@ const docTemplate = `{ } } }, - "/hosts/tool/create": { + "/hosts/tool/init": { "post": { "consumes": [ "application/json" @@ -12920,36 +13302,6 @@ const docTemplate = `{ } } }, - "/installed/delete/check/:id": { - "get": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.AppResource" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete runtime", - "tags": [ - "Website" - ] - } - }, "/logs/system/files": { "get": { "responses": { @@ -13039,308 +13391,6 @@ const docTemplate = `{ ] } }, - "/mcp/domain/bind": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpBindDomain" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Bind Domain for mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/domain/get": { - "get": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.McpBindDomainRes" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get bin Domain for mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/domain/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpBindDomainUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update bind Domain for mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/search": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerSearch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.McpServersRes" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "List mcp servers", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerCreate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Create mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server/del": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerDelete" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server/op": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Operate mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mount": { - "post": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.DiskInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "system mount", - "tags": [ - "File" - ] - } - }, "/openresty": { "get": { "responses": { @@ -13506,7 +13556,31 @@ const docTemplate = `{ ] } }, - "/openresty/module/update": { + "/openresty/modules": { + "get": { + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.NginxBuildConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get OpenResty modules", + "tags": [ + "OpenResty" + ] + } + }, + "/openresty/modules/update": { "post": { "consumes": [ "application/json" @@ -13548,30 +13622,6 @@ const docTemplate = `{ } } }, - "/openresty/modules": { - "get": { - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.NginxBuildConfig" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get OpenResty modules", - "tags": [ - "OpenResty" - ] - } - }, "/openresty/scope": { "post": { "consumes": [ @@ -13764,59 +13814,6 @@ const docTemplate = `{ ] } }, - "/record/del": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "backup_records", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "file_name", - "output_value": "files" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete backup records [files]", - "formatZH": "删除备份记录 [files]", - "paramKeys": [] - } - } - }, "/runtimes": { "post": { "consumes": [ @@ -13944,6 +13941,36 @@ const docTemplate = `{ } } }, + "/runtimes/installed/delete/check/:id": { + "get": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AppResource" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete runtime", + "tags": [ + "Website" + ] + } + }, "/runtimes/node/modules": { "post": { "consumes": [ @@ -14786,6 +14813,41 @@ const docTemplate = `{ ] } }, + "/runtimes/supervisor/process": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPSupervisorProcessConfig" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Operate supervisor process", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/supervisor/process/:id": { "get": { "consumes": [ @@ -14825,7 +14887,7 @@ const docTemplate = `{ ] } }, - "/runtimes/supervisor/process/file/operate": { + "/runtimes/supervisor/process/file": { "post": { "consumes": [ "application/json" @@ -14863,41 +14925,6 @@ const docTemplate = `{ ] } }, - "/runtimes/supervisor/process/operate": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.PHPSupervisorProcessConfig" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Operate supervisor process", - "tags": [ - "Runtime" - ] - } - }, "/runtimes/sync": { "post": { "consumes": [ @@ -15339,7 +15366,7 @@ const docTemplate = `{ } } }, - "/settings/snapshot/recrete": { + "/settings/snapshot/recreate": { "post": { "consumes": [ "application/json" @@ -15643,7 +15670,7 @@ const docTemplate = `{ } }, "/toolbox/clam/base": { - "get": { + "post": { "consumes": [ "application/json" ], @@ -17103,33 +17130,6 @@ const docTemplate = `{ } } }, - "/user/group": { - "post": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.UserGroupResponse" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "system user and group", - "tags": [ - "File" - ] - } - }, "/websites": { "post": { "consumes": [ @@ -19040,7 +19040,7 @@ const docTemplate = `{ ] } }, - "/websites/lbs/delete": { + "/websites/lbs/del": { "post": { "consumes": [ "application/json" @@ -19530,6 +19530,59 @@ const docTemplate = `{ ] } }, + "/websites/proxies/file": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxProxyUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update proxy file", + "tags": [ + "Website" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "websiteID", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteID" + ], + "formatEN": "Nginx conf proxy file update [domain]", + "formatZH": "更新反向代理文件 [domain]", + "paramKeys": [] + } + } + }, "/websites/proxies/update": { "post": { "consumes": [ @@ -19679,60 +19732,7 @@ const docTemplate = `{ "summary": "Get website proxy cache config" } }, - "/websites/proxy/file": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.NginxProxyUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update proxy file", - "tags": [ - "Website" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteID", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteID" - ], - "formatEN": "Nginx conf proxy file update [domain]", - "formatZH": "更新反向代理文件 [domain]", - "paramKeys": [] - } - } - }, - "/websites/realip": { + "/websites/realip/config": { "post": { "consumes": [ "application/json" @@ -32016,20 +32016,20 @@ const docTemplate = `{ "PID": { "type": "integer" }, + "localaddr": { + "type": "object" + }, "name": { "type": "string" }, + "remoteaddr": { + "type": "object" + }, "status": { "type": "string" }, "type": { "type": "string" - }, - "localaddr": { - "type": "object" - }, - "remoteaddr": { - "type": "object" } }, "type": "object" @@ -32087,6 +32087,12 @@ const docTemplate = `{ "numThreads": { "type": "integer" }, + "openFiles": { + "items": { + "type": "object" + }, + "type": "array" + }, "rss": { "type": "string" }, @@ -32110,12 +32116,6 @@ const docTemplate = `{ }, "vms": { "type": "string" - }, - "openFiles": { - "items": { - "type": "object" - }, - "type": "array" } }, "type": "object" diff --git a/core/cmd/server/docs/swagger.json b/core/cmd/server/docs/swagger.json index 4758af70f..02620bf21 100644 --- a/core/cmd/server/docs/swagger.json +++ b/core/cmd/server/docs/swagger.json @@ -111,6 +111,325 @@ ] } }, + "/ai/mcp/domain/bind": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpBindDomain" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Bind Domain for mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/domain/get": { + "get": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.McpBindDomainRes" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get bin Domain for mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/domain/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpBindDomainUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update bind Domain for mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/search": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerSearch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.McpServersRes" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List mcp servers", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerCreate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Create mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server/del": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerDelete" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server/op": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerOperate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Operate mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/mcp/server/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.McpServerUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update mcp server", + "tags": [ + "McpServer" + ] + } + }, + "/ai/ollama/close": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OllamaModelName" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Close Ollama model conn", + "tags": [ + "AI" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "name" + ], + "formatEN": "close conn for Ollama model [name]", + "formatZH": "关闭 Ollama 模型连接 [name]", + "paramKeys": [] + } + } + }, "/ai/ollama/model": { "post": { "consumes": [ @@ -155,50 +474,6 @@ } } }, - "/ai/ollama/model/close": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OllamaModelName" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Close Ollama model conn", - "tags": [ - "AI" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name" - ], - "formatEN": "close conn for Ollama model [name]", - "formatZH": "关闭 Ollama 模型连接 [name]", - "paramKeys": [] - } - } - }, "/ai/ollama/model/del": { "post": { "consumes": [ @@ -792,8 +1067,8 @@ } } }, - "/apps/installed/conninfo/:key": { - "get": { + "/apps/installed/conninfo": { + "post": { "consumes": [ "application/json" ], @@ -1449,89 +1724,6 @@ } } }, - "/backup/record/description/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.UpdateDescription" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update backup record description", - "tags": [ - "Backup Account" - ] - } - }, - "/backup/record/download": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.DownloadRecord" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Download backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "source", - "fileName" - ], - "formatEN": "download backup records [source][fileName]", - "formatZH": "下载备份记录 [source][fileName]", - "paramKeys": [] - } - } - }, "/backups": { "post": { "consumes": [ @@ -1622,6 +1814,47 @@ } } }, + "/backups/buckets": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ForBuckets" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "object" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List buckets", + "tags": [ + "Backup Account" + ] + } + }, "/backups/del": { "post": { "consumes": [ @@ -1729,6 +1962,142 @@ ] } }, + "/backups/record/del": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.BatchDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "backup_records", + "input_column": "id", + "input_value": "ids", + "isList": true, + "output_column": "file_name", + "output_value": "files" + } + ], + "bodyKeys": [ + "ids" + ], + "formatEN": "delete backup records [files]", + "formatZH": "删除备份记录 [files]", + "paramKeys": [] + } + } + }, + "/backups/record/description/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.UpdateDescription" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update backup record description", + "tags": [ + "Backup Account" + ] + } + }, + "/backups/record/download": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.DownloadRecord" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Download backup record", + "tags": [ + "Backup Account" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "source", + "fileName" + ], + "formatEN": "download backup records [source][fileName]", + "formatZH": "下载备份记录 [source][fileName]", + "paramKeys": [] + } + } + }, "/backups/record/search": { "post": { "consumes": [ @@ -2139,47 +2508,6 @@ } } }, - "/buckets": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ForBuckets" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "object" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "List buckets", - "tags": [ - "Backup Account" - ] - } - }, "/containers": { "post": { "consumes": [ @@ -3957,7 +4285,7 @@ } }, "/containers/repo/status": { - "get": { + "post": { "consumes": [ "application/json" ], @@ -4092,7 +4420,7 @@ } }, "/containers/search/log": { - "post": { + "get": { "parameters": [ { "description": "容器名称", @@ -8137,7 +8465,7 @@ } }, "/dashboard/quick/option": { - "post": { + "get": { "responses": { "200": { "description": "OK", @@ -8679,6 +9007,47 @@ } } }, + "/databases/db/del/check": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.OperateByID" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Check before delete remote database", + "tags": [ + "Database" + ] + } + }, "/databases/db/item/:type": { "get": { "responses": { @@ -9894,223 +10263,6 @@ } } }, - "/db/remote/del/check": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Check before delete remote database", - "tags": [ - "Database" - ] - } - }, - "/disks": { - "get": { - "description": "Get information about all disks including partitioned and unpartitioned disks", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.CompleteDiskInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get complete disk information", - "tags": [ - "Disk Management" - ] - } - }, - "/disks/mount": { - "post": { - "consumes": [ - "application/json" - ], - "description": "Mount partition to specified mount point", - "parameters": [ - { - "description": "mount request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.DiskMountRequest" - } - } - ], - "responses": { - "200": { - "description": "Disk mounted successfully", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Mount disk", - "tags": [ - "Disk Management" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "device", - "mountPoint" - ], - "formatEN": "Mount disk [device] to [mountPoint]", - "formatZH": "挂载磁盘 [device] 到 [mountPoint]", - "paramKeys": [] - } - } - }, - "/disks/partition": { - "post": { - "consumes": [ - "application/json" - ], - "description": "Create partition and format disk with specified filesystem", - "parameters": [ - { - "description": "partition request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.DiskPartitionRequest" - } - } - ], - "responses": { - "200": { - "description": "Partition created successfully", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Partition disk", - "tags": [ - "Disk Management" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "device", - "filesystem", - "mountPoint" - ], - "formatEN": "Partition disk [device] with filesystem [filesystem], mount point [mountPoint]", - "formatZH": "对磁盘 [device] 进行分区,文件系统 [filesystem],挂载点 [mountPoint]", - "paramKeys": [] - } - } - }, - "/disks/unmount": { - "post": { - "consumes": [ - "application/json" - ], - "description": "Unmount partition from mount point", - "parameters": [ - { - "description": "unmount request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.DiskUnmountRequest" - } - } - ], - "responses": { - "200": { - "description": "Disk unmounted successfully", - "schema": { - "type": "string" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Unmount disk", - "tags": [ - "Disk Management" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "device", - "mountPoint" - ], - "formatEN": "Unmount disk [device] from [mountPoint]", - "formatZH": "卸载磁盘 [device] 从 [mountPoint]", - "paramKeys": [] - } - } - }, "/files": { "post": { "consumes": [ @@ -10835,6 +10987,33 @@ } } }, + "/files/mount": { + "post": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.DiskInfo" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "system mount", + "tags": [ + "File" + ] + } + }, "/files/move": { "post": { "consumes": [ @@ -11394,6 +11573,33 @@ ] } }, + "/files/user/group": { + "post": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.UserGroupResponse" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "system user and group", + "tags": [ + "File" + ] + } + }, "/files/wget": { "post": { "consumes": [ @@ -11671,25 +11877,18 @@ ] } }, - "/hosts/conffile/update": { - "post": { - "consumes": [ + "/hosts/disks": { + "get": { + "description": "Get information about all disks including partitioned and unpartitioned disks", + "produces": [ "application/json" ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SSHConf" - } - } - ], "responses": { "200": { - "description": "OK" + "description": "OK", + "schema": { + "$ref": "#/definitions/response.CompleteDiskInfo" + } } }, "security": [ @@ -11700,15 +11899,156 @@ "Timestamp": [] } ], - "summary": "Update host SSH setting by file", + "summary": "Get complete disk information", "tags": [ - "SSH" + "Disk Management" + ] + } + }, + "/hosts/disks/mount": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Mount partition to specified mount point", + "parameters": [ + { + "description": "mount request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.DiskMountRequest" + } + } + ], + "responses": { + "200": { + "description": "Disk mounted successfully", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Mount disk", + "tags": [ + "Disk Management" ], "x-panel-log": { "BeforeFunctions": [], - "bodyKeys": [], - "formatEN": "update SSH conf", - "formatZH": "修改 SSH 配置文件", + "bodyKeys": [ + "device", + "mountPoint" + ], + "formatEN": "Mount disk [device] to [mountPoint]", + "formatZH": "挂载磁盘 [device] 到 [mountPoint]", + "paramKeys": [] + } + } + }, + "/hosts/disks/partition": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Create partition and format disk with specified filesystem", + "parameters": [ + { + "description": "partition request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.DiskPartitionRequest" + } + } + ], + "responses": { + "200": { + "description": "Partition created successfully", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Partition disk", + "tags": [ + "Disk Management" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "device", + "filesystem", + "mountPoint" + ], + "formatEN": "Partition disk [device] with filesystem [filesystem], mount point [mountPoint]", + "formatZH": "对磁盘 [device] 进行分区,文件系统 [filesystem],挂载点 [mountPoint]", + "paramKeys": [] + } + } + }, + "/hosts/disks/unmount": { + "post": { + "consumes": [ + "application/json" + ], + "description": "Unmount partition from mount point", + "parameters": [ + { + "description": "unmount request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.DiskUnmountRequest" + } + } + ], + "responses": { + "200": { + "description": "Disk unmounted successfully", + "schema": { + "type": "string" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Unmount disk", + "tags": [ + "Disk Management" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "device", + "mountPoint" + ], + "formatEN": "Unmount disk [device] from [mountPoint]", + "formatZH": "卸载磁盘 [device] 从 [mountPoint]", "paramKeys": [] } } @@ -12399,6 +12739,48 @@ ] } }, + "/hosts/ssh/conffile/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SSHConf" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update host SSH setting by file", + "tags": [ + "SSH" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [], + "formatEN": "update SSH conf", + "formatZH": "修改 SSH 配置文件", + "paramKeys": [] + } + } + }, "/hosts/ssh/log": { "post": { "consumes": [ @@ -12673,7 +13055,7 @@ } } }, - "/hosts/tool/create": { + "/hosts/tool/init": { "post": { "consumes": [ "application/json" @@ -12916,36 +13298,6 @@ } } }, - "/installed/delete/check/:id": { - "get": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.AppResource" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete runtime", - "tags": [ - "Website" - ] - } - }, "/logs/system/files": { "get": { "responses": { @@ -13035,308 +13387,6 @@ ] } }, - "/mcp/domain/bind": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpBindDomain" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Bind Domain for mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/domain/get": { - "get": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.McpBindDomainRes" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get bin Domain for mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/domain/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpBindDomainUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update bind Domain for mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/search": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerSearch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.McpServersRes" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "List mcp servers", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerCreate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Create mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server/del": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerDelete" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server/op": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerOperate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Operate mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mcp/server/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.McpServerUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update mcp server", - "tags": [ - "McpServer" - ] - } - }, - "/mount": { - "post": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.DiskInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "system mount", - "tags": [ - "File" - ] - } - }, "/openresty": { "get": { "responses": { @@ -13502,7 +13552,31 @@ ] } }, - "/openresty/module/update": { + "/openresty/modules": { + "get": { + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.NginxBuildConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get OpenResty modules", + "tags": [ + "OpenResty" + ] + } + }, + "/openresty/modules/update": { "post": { "consumes": [ "application/json" @@ -13544,30 +13618,6 @@ } } }, - "/openresty/modules": { - "get": { - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.NginxBuildConfig" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get OpenResty modules", - "tags": [ - "OpenResty" - ] - } - }, "/openresty/scope": { "post": { "consumes": [ @@ -13760,59 +13810,6 @@ ] } }, - "/record/del": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.BatchDeleteReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete backup record", - "tags": [ - "Backup Account" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "backup_records", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "file_name", - "output_value": "files" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete backup records [files]", - "formatZH": "删除备份记录 [files]", - "paramKeys": [] - } - } - }, "/runtimes": { "post": { "consumes": [ @@ -13940,6 +13937,36 @@ } } }, + "/runtimes/installed/delete/check/:id": { + "get": { + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AppResource" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete runtime", + "tags": [ + "Website" + ] + } + }, "/runtimes/node/modules": { "post": { "consumes": [ @@ -14782,6 +14809,41 @@ ] } }, + "/runtimes/supervisor/process": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.PHPSupervisorProcessConfig" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Operate supervisor process", + "tags": [ + "Runtime" + ] + } + }, "/runtimes/supervisor/process/:id": { "get": { "consumes": [ @@ -14821,7 +14883,7 @@ ] } }, - "/runtimes/supervisor/process/file/operate": { + "/runtimes/supervisor/process/file": { "post": { "consumes": [ "application/json" @@ -14859,41 +14921,6 @@ ] } }, - "/runtimes/supervisor/process/operate": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.PHPSupervisorProcessConfig" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Operate supervisor process", - "tags": [ - "Runtime" - ] - } - }, "/runtimes/sync": { "post": { "consumes": [ @@ -15335,7 +15362,7 @@ } } }, - "/settings/snapshot/recrete": { + "/settings/snapshot/recreate": { "post": { "consumes": [ "application/json" @@ -15639,7 +15666,7 @@ } }, "/toolbox/clam/base": { - "get": { + "post": { "consumes": [ "application/json" ], @@ -17099,33 +17126,6 @@ } } }, - "/user/group": { - "post": { - "consumes": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/response.UserGroupResponse" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "system user and group", - "tags": [ - "File" - ] - } - }, "/websites": { "post": { "consumes": [ @@ -19036,7 +19036,7 @@ ] } }, - "/websites/lbs/delete": { + "/websites/lbs/del": { "post": { "consumes": [ "application/json" @@ -19526,6 +19526,59 @@ ] } }, + "/websites/proxies/file": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.NginxProxyUpdate" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update proxy file", + "tags": [ + "Website" + ], + "x-panel-log": { + "BeforeFunctions": [ + { + "db": "websites", + "input_column": "id", + "input_value": "websiteID", + "isList": false, + "output_column": "primary_domain", + "output_value": "domain" + } + ], + "bodyKeys": [ + "websiteID" + ], + "formatEN": "Nginx conf proxy file update [domain]", + "formatZH": "更新反向代理文件 [domain]", + "paramKeys": [] + } + } + }, "/websites/proxies/update": { "post": { "consumes": [ @@ -19675,60 +19728,7 @@ "summary": "Get website proxy cache config" } }, - "/websites/proxy/file": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/request.NginxProxyUpdate" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update proxy file", - "tags": [ - "Website" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "websites", - "input_column": "id", - "input_value": "websiteID", - "isList": false, - "output_column": "primary_domain", - "output_value": "domain" - } - ], - "bodyKeys": [ - "websiteID" - ], - "formatEN": "Nginx conf proxy file update [domain]", - "formatZH": "更新反向代理文件 [domain]", - "paramKeys": [] - } - } - }, - "/websites/realip": { + "/websites/realip/config": { "post": { "consumes": [ "application/json" @@ -32012,20 +32012,20 @@ "PID": { "type": "integer" }, + "localaddr": { + "type": "object" + }, "name": { "type": "string" }, + "remoteaddr": { + "type": "object" + }, "status": { "type": "string" }, "type": { "type": "string" - }, - "localaddr": { - "type": "object" - }, - "remoteaddr": { - "type": "object" } }, "type": "object" @@ -32083,6 +32083,12 @@ "numThreads": { "type": "integer" }, + "openFiles": { + "items": { + "type": "object" + }, + "type": "array" + }, "rss": { "type": "string" }, @@ -32106,12 +32112,6 @@ }, "vms": { "type": "string" - }, - "openFiles": { - "items": { - "type": "object" - }, - "type": "array" } }, "type": "object" diff --git a/core/cmd/server/main.go b/core/cmd/server/main.go index 2a0d875ab..08585c1c0 100644 --- a/core/cmd/server/main.go +++ b/core/cmd/server/main.go @@ -23,7 +23,7 @@ import ( // @description Custom Token Format, Format: md5('1panel' + API-Key + UnixTimestamp). // @description ``` // @description eg: -// @description curl -X GET "http://localhost:4004/api/v1/dashboard/current" \ +// @description curl -X GET "http://{host}:{port}/api/v2/toolbox/device/base" \ // @description -H "1Panel-Token: <1panel_token>" \ // @description -H "1Panel-Timestamp: " // @description ```