411 lines
11 KiB
JSON
411 lines
11 KiB
JSON
{
|
|
"openapi": "3.0.1",
|
|
"info": {
|
|
"title": "默认模块",
|
|
"description": "新增跨服务虚拟机数据迁移接口,支持通过 rsync + SSH tunneluser 在两个 kvm-virtctl 之间进行虚拟机数据传输和恢复。",
|
|
"version": "1.0.0"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "VNC指令管理"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/api/v1/admin/server/vnc_command/group/list": {
|
|
"get": {
|
|
"summary": "获取指令分组列表(含指令项)",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandGroupList",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "查询成功",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/server/vnc_command/group/create": {
|
|
"post": {
|
|
"summary": "创建指令分组",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandGroupCreate",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "分组名称",
|
|
"example": ""
|
|
},
|
|
"sort": {
|
|
"type": "integer",
|
|
"description": "排序",
|
|
"example": 0
|
|
},
|
|
"default_icon": {
|
|
"description": "分组文本图标(如 📚),当无文件图标时使用",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"icon_file_id": {
|
|
"description": "分组图标文件ID",
|
|
"example": "",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
},
|
|
"examples": {}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "创建成功",
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/server/vnc_command/group/update": {
|
|
"post": {
|
|
"summary": "修改指令分组",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandGroupUpdate",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"description": "分组ID",
|
|
"example": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": ""
|
|
},
|
|
"sort": {
|
|
"type": "integer",
|
|
"example": 0
|
|
},
|
|
"default_icon": {
|
|
"description": "分组文本图标(如 📚),当无文件图标时使用",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"icon_file_id": {
|
|
"type": "integer",
|
|
"description": "分组图标文件ID",
|
|
"example": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"id"
|
|
]
|
|
},
|
|
"examples": {}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "修改成功",
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/server/vnc_command/group/delete": {
|
|
"delete": {
|
|
"summary": "删除指令分组(级联删除指令项)",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandGroupDelete",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "query",
|
|
"description": "",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "删除成功",
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/server/vnc_command/item/create": {
|
|
"post": {
|
|
"summary": "创建指令项",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandItemCreate",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group_id": {
|
|
"type": "integer",
|
|
"description": "所属分组ID",
|
|
"example": 0
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"description": "指令名称",
|
|
"example": ""
|
|
},
|
|
"cmd": {
|
|
"type": "string",
|
|
"description": "指令内容(支持 %var% 变量占位符)",
|
|
"example": ""
|
|
},
|
|
"vars": {
|
|
"type": "string",
|
|
"description": "变量列表 JSON,格式 [{\"k\":\"path\",\"p\":\"目录路径\"}]",
|
|
"example": ""
|
|
},
|
|
"sort": {
|
|
"type": "integer",
|
|
"description": "排序",
|
|
"example": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"group_id",
|
|
"label",
|
|
"cmd"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "创建成功",
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/server/vnc_command/item/update": {
|
|
"post": {
|
|
"summary": "修改指令项",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandItemUpdate",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"description": "指令项ID",
|
|
"example": 0
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"example": ""
|
|
},
|
|
"cmd": {
|
|
"type": "string",
|
|
"example": ""
|
|
},
|
|
"vars": {
|
|
"type": "string",
|
|
"example": ""
|
|
},
|
|
"sort": {
|
|
"type": "integer",
|
|
"example": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"id"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "修改成功",
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/server/vnc_command/item/delete": {
|
|
"delete": {
|
|
"summary": "删除指令项",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"operationId": "VncCommandItemDelete",
|
|
"tags": [
|
|
"VNC指令管理"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "query",
|
|
"description": "",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "删除成功",
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {},
|
|
"responses": {},
|
|
"securitySchemes": {}
|
|
},
|
|
"servers": [],
|
|
"security": []
|
|
} |