Files
ApiServer-Web-admin_dashboa…/默认模块.openapi.json
T
lin 25d782b050
Build and Deploy Vue3 / build (push) Successful in 1m35s
Build and Deploy Vue3 / deploy (push) Successful in 1m5s
feat: 将页面添加分页
2026-03-21 17:37:06 +08:00

9108 lines
258 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "",
"version": "1.0.0"
},
"tags": [
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务管理"
},
{
"name": "KvmService"
},
{
"name": "admin/微服务管理/虚拟化平台管理/宿主机组映射管理"
},
{
"name": "KvmServiceHostGroup"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理"
},
{
"name": "Point.HostGroup"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理"
},
{
"name": "Point.Host"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理"
},
{
"name": "Point.Image"
},
{
"name": "镜像管理"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理"
},
{
"name": "Point.Network"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理"
},
{
"name": "Point.Volume"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理"
},
{
"name": "Point.VM"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理"
},
{
"name": "Point.PostGroup"
},
{
"name": "安全组"
},
{
"name": "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理"
},
{
"name": "Point.VNC"
},
{
"name": "快照"
},
{
"name": "管理员-快照"
},
{
"name": "备份"
},
{
"name": "管理员-备份"
},
{
"name": "KVM-UserNetworking"
}
],
"paths": {
"/api/v1/admin/server/host_service/list": {
"get": {
"summary": "获取 KVM 主控服务列表",
"deprecated": false,
"description": "",
"operationId": "GetKvmServiceList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务管理",
"KvmService"
],
"parameters": [
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "count",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "key",
"in": "query",
"description": "搜索关键字",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/detail": {
"get": {
"summary": "获取 KVM 主控服务详情",
"deprecated": false,
"description": "",
"operationId": "GetKvmServiceDetail",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务管理",
"KvmService"
],
"parameters": [
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/create": {
"post": {
"summary": "创建 KVM 主控服务",
"deprecated": false,
"description": "",
"operationId": "CreateKvmService",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务管理",
"KvmService"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "服务名称",
"example": "",
"type": "string"
},
"note": {
"description": "备注说明",
"example": "",
"type": "string"
},
"host": {
"description": "服务地址",
"example": "",
"type": "string"
},
"port": {
"description": "服务端口",
"example": "",
"type": "string"
},
"token": {
"description": "认证 Token",
"example": "",
"type": "string"
}
},
"required": [
"name",
"host",
"port"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/update": {
"post": {
"summary": "修改 KVM 主控服务",
"deprecated": false,
"description": "",
"operationId": "UpdateKvmService",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务管理",
"KvmService"
],
"parameters": [
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"name": {
"example": "",
"type": "string"
},
"note": {
"example": "",
"type": "string"
},
"host": {
"example": "",
"type": "string"
},
"port": {
"example": "",
"type": "string"
},
"token": {
"example": "",
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/delete": {
"delete": {
"summary": "删除 KVM 主控服务",
"deprecated": false,
"description": "",
"operationId": "DeleteKvmService",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务管理",
"KvmService"
],
"parameters": [
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/host_group/list": {
"get": {
"summary": "获取本地主机组列表",
"deprecated": false,
"description": "",
"operationId": "GetKvmServiceHostGroupList",
"tags": [
"admin/微服务管理/虚拟化平台管理/宿主机组映射管理",
"KvmServiceHostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/host_group/sync": {
"post": {
"summary": "从远程同步主机组到本地",
"deprecated": false,
"description": "",
"operationId": "SyncKvmServiceHostGroup",
"tags": [
"admin/微服务管理/虚拟化平台管理/宿主机组映射管理",
"KvmServiceHostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
}
},
"required": [
"service_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/host_group/bind": {
"post": {
"summary": "绑定主机组到商品组或商品",
"deprecated": false,
"description": "",
"operationId": "BindKvmServiceHostGroup",
"tags": [
"admin/微服务管理/虚拟化平台管理/宿主机组映射管理",
"KvmServiceHostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "本地主机组 ID",
"example": 8,
"type": "integer"
},
"good_group_id": {
"description": "绑定的商品分组 ID(与 good_id 二选一)",
"example": 51,
"type": "integer"
},
"good_id": {
"description": "绑定的商品id(与 good_group_id 二选一)",
"example": 0,
"type": "integer"
}
},
"required": [
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/host_group/update": {
"post": {
"summary": "修改本地主机组信息",
"deprecated": false,
"description": "",
"operationId": "UpdateKvmServiceHostGroup",
"tags": [
"admin/微服务管理/虚拟化平台管理/宿主机组映射管理",
"KvmServiceHostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"id": {
"example": 0,
"type": "integer"
},
"name": {
"example": "",
"type": "string"
},
"note": {
"example": "",
"type": "string"
}
},
"required": [
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/host_group/generate_goods": {
"post": {
"summary": "根据主机组树自动生成 GoodGroup/Goods/Args",
"deprecated": false,
"description": "",
"operationId": "GenerateGoodsByHostGroup",
"tags": [
"admin/微服务管理/虚拟化平台管理/宿主机组映射管理",
"KvmServiceHostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "起始 KvmServiceHostGroup ID",
"example": 0,
"type": "integer"
},
"parent_group_id": {
"description": "挂载到已有 GoodGroup 父级 ID",
"example": 0,
"type": "integer"
},
"tag_id": {
"description": "根节点 GoodGroup 标签 ID",
"example": 0,
"type": "integer"
},
"table": {
"description": "Goods 的 Table 标识",
"example": "kvm_service",
"type": "string"
}
},
"required": [
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/list": {
"get": {
"summary": "获取远程主机组列表",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "parent_id",
"in": "query",
"description": "筛选父级宿主机组",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "page_size",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/detail": {
"get": {
"summary": "获取远程主机组详情",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "主机组id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/tree": {
"get": {
"summary": "获取远程主机组树形结构",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupGetTree",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/optimal_host": {
"get": {
"summary": "获取主机组最优主机配置信息",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupGetOptimalHostInfo",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "host_group_id",
"in": "query",
"description": "主机组id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/create": {
"post": {
"summary": "创建远程主机组",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupCreate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"parent_id": {
"description": "筛选父级宿主机组",
"example": 0,
"type": "integer"
},
"name": {
"example": "",
"type": "string"
},
"note": {
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/update": {
"post": {
"summary": "修改远程主机组",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupUpdate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"name": {
"example": "",
"type": "string"
},
"note": {
"example": "",
"type": "string"
},
"parent_id": {
"description": "父级宿主机组id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host_group/delete": {
"delete": {
"summary": "删除远程主机组",
"deprecated": false,
"description": "",
"operationId": "PointHostGroupDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理",
"Point.HostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host/list": {
"get": {
"summary": "获取宿主机列表",
"deprecated": false,
"description": "",
"operationId": "PointHostList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理",
"Point.Host"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "page_size",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "host_group_id",
"in": "query",
"description": "筛选父级宿主机组",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host/detail": {
"get": {
"summary": "获取宿主机详情",
"deprecated": false,
"description": "",
"operationId": "PointHostGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理",
"Point.Host"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host/metrics": {
"get": {
"summary": "获取宿主机指标数据",
"deprecated": false,
"description": "",
"operationId": "PointHostGetMetrics",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理",
"Point.Host"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host/add": {
"post": {
"summary": "新增宿主机",
"deprecated": false,
"description": "",
"operationId": "PointHostAdd",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理",
"Point.Host"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"description": {
"description": "介绍",
"example": "",
"type": "string"
},
"base_url": {
"description": "宿主机服务url",
"example": "",
"type": "string"
},
"token": {
"description": "宿主机服务Token",
"example": "",
"type": "string"
},
"ip": {
"description": "宿主机 Ip",
"example": "",
"type": "string"
},
"port": {
"description": "宿主机 ssh端口",
"example": 0,
"type": "integer"
},
"user": {
"description": "宿主机 ssh用户名(使用远程专用用户 默认为 tunneluser",
"example": "",
"type": "string"
},
"password": {
"description": "宿主机 ssh密码",
"example": "",
"type": "string"
},
"private_key": {
"description": "宿主机 ssh私钥",
"example": "",
"type": "string"
},
"max_cpu": {
"description": "宿主机 最大cpu核心限制(不是真实cpu核心,只是允许开多少核心)",
"example": 0,
"type": "integer"
},
"max_memory": {
"description": "宿主机 最大内存限制",
"example": 0,
"type": "integer"
},
"max_disk": {
"description": "宿主机 最大硬盘限制",
"example": 0,
"type": "integer"
},
"rx_bandwidth": {
"description": "宿主机 最大下行带宽",
"example": 0,
"type": "integer"
},
"tx_bandwidth": {
"description": "宿主机 最大上行带宽",
"example": 0,
"type": "integer"
},
"host_group_id": {
"description": "所属宿主机组",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"name",
"base_url",
"ip"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host/update": {
"post": {
"summary": "修改宿主机",
"deprecated": false,
"description": "",
"operationId": "PointHostUpdate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理",
"Point.Host"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"id": {
"example": 0,
"type": "integer"
},
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"description": {
"description": "介绍",
"example": "",
"type": "string"
},
"base_url": {
"description": "宿主机服务url",
"example": "",
"type": "string"
},
"token": {
"description": "宿主机服务Token",
"example": "",
"type": "string"
},
"ip": {
"description": "宿主机 Ip",
"example": "",
"type": "string"
},
"port": {
"description": "宿主机 ssh端口",
"example": 0,
"type": "integer"
},
"user": {
"description": "宿主机 ssh用户名(使用远程专用用户 默认为 tunneluser",
"example": "",
"type": "string"
},
"password": {
"description": "宿主机 ssh密码",
"example": "",
"type": "string"
},
"private_key": {
"description": "宿主机 ssh私钥",
"example": "",
"type": "string"
},
"max_cpu": {
"description": "宿主机 最大cpu核心限制(不是真实cpu核心,只是允许开多少核心)",
"example": 0,
"type": "integer"
},
"max_memory": {
"description": "宿主机 最大内存限制",
"example": 0,
"type": "integer"
},
"max_disk": {
"description": "宿主机 最大硬盘限制",
"example": 0,
"type": "integer"
},
"rx_bandwidth": {
"description": "宿主机 最大下行带宽",
"example": 0,
"type": "integer"
},
"tx_bandwidth": {
"description": "宿主机 最大上行带宽",
"example": 0,
"type": "integer"
},
"host_group_id": {
"description": "所属宿主机组",
"example": 0,
"type": "integer"
}
},
"required": [
"id",
"service_id",
"name",
"base_url",
"ip"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/host/delete": {
"delete": {
"summary": "删除宿主机",
"deprecated": false,
"description": "",
"operationId": "PointHostDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理",
"Point.Host"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/list": {
"get": {
"summary": "获取镜像列表",
"deprecated": false,
"description": "",
"operationId": "PointImageList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "count",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "os_type",
"in": "query",
"description": "筛选系统类型(linux\\windows",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "type",
"in": "query",
"description": "筛选镜像类型 system 系统 \\ data 数据)",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "status",
"in": "query",
"description": "筛选状态(pending\\downloading\\ready\\error",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "keyword",
"in": "query",
"description": "筛选关键词",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/detail": {
"get": {
"summary": "获取镜像详情",
"deprecated": false,
"description": "",
"operationId": "PointImageGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "image_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/image/compare_host": {
"get": {
"summary": "获取宿主机镜像列表与状态",
"deprecated": false,
"description": "对比主控服务器与指定宿主机的镜像列表,返回每个镜像的同步状态(synced/not_synced/downloading/error/pending)以及汇总统计",
"operationId": "PointImageCompareHost",
"tags": [
"镜像管理"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM 服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {
"type": "object",
"properties": {
"host_id": {
"type": "integer",
"description": "宿主机ID"
},
"total": {
"type": "integer",
"description": "镜像总数"
},
"synced": {
"type": "integer",
"description": "已同步数量"
},
"not_synced": {
"type": "integer",
"description": "未同步数量"
},
"data": {
"type": "array",
"description": "镜像对比详情列表",
"items": {
"type": "object",
"properties": {
"image": {
"type": "object",
"description": "镜像信息",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"os_type": {
"type": "string"
},
"type": {
"type": "string"
},
"path": {
"type": "string"
},
"status": {
"type": "string"
},
"description": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"sync_status": {
"type": "string",
"description": "同步状态: synced | not_synced | downloading | error | pending"
},
"host_status": {
"type": "string",
"description": "宿主机侧镜像状态,未同步时为空"
}
}
}
}
}
}
}
}
}
},
"headers": {}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 400
},
"message": {
"type": "string"
},
"error": {
"type": "string"
}
}
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/host_status": {
"get": {
"summary": "获取在指定宿主机上的状态",
"deprecated": false,
"description": "",
"operationId": "PointImageGetHostStatus",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "image_id",
"in": "query",
"description": "镜像id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"os_type": {
"type": "string"
},
"type": {
"type": "string"
},
"path": {
"type": "string"
},
"status": {
"type": "string"
},
"description": {
"type": "string"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"os_type",
"type",
"path",
"status",
"description",
"created_at",
"updated_at"
]
},
"status": {
"type": "string"
}
},
"required": [
"image",
"status"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/create": {
"post": {
"summary": "创建镜像",
"deprecated": false,
"description": "",
"operationId": "PointImageCreate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"path": {
"description": "地址(可以是url也可以是在服务器上的路径)\nhttp://........\n/root/data/...",
"example": "",
"type": "string"
},
"os_type": {
"description": "系统类型(linux\\windows",
"example": "",
"type": "string"
},
"type": {
"description": "镜像类型 system 系统 \\ data 数据)",
"example": "",
"type": "string"
},
"description": {
"description": "介绍",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"name",
"path"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/update": {
"post": {
"summary": "修改镜像",
"deprecated": false,
"description": "",
"operationId": "PointImageUpdate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"image_id": {
"description": "镜像id",
"example": 0,
"type": "integer"
},
"status": {
"description": "镜像状态(pending\\downloading\\ready\\error",
"example": "",
"type": "string"
},
"size": {
"description": "镜像大小",
"example": 0,
"type": "integer"
},
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"image_name": {
"description": "名称",
"example": "",
"type": "string"
},
"path": {
"description": "地址(可以是url也可以是在服务器上的路径)\nhttp://........\n/root/data/...",
"example": "",
"type": "string"
},
"os_type": {
"description": "系统类型(linux\\windows",
"example": "",
"type": "string"
},
"type": {
"description": "镜像类型 system 系统 \\ data 数据)",
"example": "",
"type": "string"
},
"description": {
"description": "介绍",
"example": "",
"type": "string"
}
},
"required": [
"image_id",
"service_id",
"image_name",
"path"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/delete": {
"delete": {
"summary": "删除镜像",
"deprecated": false,
"description": "",
"operationId": "PointImageDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "image_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/reload": {
"post": {
"summary": "重新下载镜像",
"deprecated": false,
"description": "",
"operationId": "PointImageReload",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"image_id": {
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"image_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/sync": {
"post": {
"summary": "向宿主机同步镜像",
"deprecated": false,
"description": "",
"operationId": "PointImageSync",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"host_id": {
"description": "宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/image/reload_host": {
"post": {
"summary": "指定宿主机重新下载指定镜像",
"deprecated": false,
"description": "",
"operationId": "PointImageReloadHost",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理",
"Point.Image"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"image_id": {
"description": "镜像id",
"example": 0,
"type": "integer"
},
"host_id": {
"description": "宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"image_id",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"os_type": {
"type": "string"
},
"type": {
"type": "string"
},
"path": {
"type": "string"
},
"status": {
"type": "string"
},
"description": {
"type": "string"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"os_type",
"type",
"path",
"status",
"description",
"created_at",
"updated_at"
]
},
"status": {
"type": "string"
}
},
"required": [
"image",
"status"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/network/list": {
"get": {
"summary": "获取网络列表",
"deprecated": false,
"description": "",
"operationId": "PointNetworkList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理",
"Point.Network"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "count",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "key",
"in": "query",
"description": "关键字筛选",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "type",
"in": "query",
"description": "网络类型(bridge(网桥) \\ nat(内网)",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "used",
"in": "query",
"description": "筛选是否被占用",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "name",
"in": "query",
"description": "筛选名称",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "bridge_name",
"in": "query",
"description": "筛选网桥名称",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
},
"required": [
"count"
]
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"gateway": {
"type": "string"
},
"nameservers": {
"type": "string"
},
"type": {
"type": "string"
},
"mac_address": {
"type": "string"
},
"bridge_name": {
"type": "string"
},
"ls_bridge_name": {
"type": "string"
},
"ls_name": {
"type": "string"
},
"target_device": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"address",
"gateway",
"nameservers",
"type",
"mac_address",
"bridge_name",
"ls_bridge_name",
"ls_name",
"target_device",
"host_id",
"created_at",
"updated_at"
]
}
}
},
"required": [
"meta",
"data"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/network/detail": {
"get": {
"summary": "获取网络详情",
"deprecated": false,
"description": "",
"operationId": "PointNetworkGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理",
"Point.Network"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "network_id",
"in": "query",
"description": "网络id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"gateway": {
"type": "string"
},
"nameservers": {
"type": "string"
},
"type": {
"type": "string"
},
"mac_address": {
"type": "string"
},
"bridge_name": {
"type": "string"
},
"ls_bridge_name": {
"type": "string"
},
"ls_name": {
"type": "string"
},
"target_device": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"address",
"gateway",
"nameservers",
"type",
"mac_address",
"bridge_name",
"ls_bridge_name",
"ls_name",
"target_device",
"host_id",
"created_at",
"updated_at"
]
}
},
"required": [
"data"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/network/create": {
"post": {
"summary": "创建网络",
"deprecated": false,
"description": "",
"operationId": "PointNetworkCreate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理",
"Point.Network"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"address": {
"description": "ip地址 CIDR类型 192.168.1.1/24",
"example": "",
"type": "string"
},
"gateway": {
"description": "网关地址 如 192.168.1.1",
"example": "",
"type": "string"
},
"nameservers": {
"description": "dns服务器(不填默认114.114.114.114,8.8.8.8 ",
"example": "",
"type": "string"
},
"type": {
"description": "网络类型 bridge(网桥|外网) \\ nat(内网)",
"example": "",
"type": "string"
},
"mac_address": {
"description": "虚拟网卡MAC地址(不填随机)",
"example": "",
"type": "string"
},
"bridge_name": {
"description": "虚拟网桥名称(不填默认)",
"example": "",
"type": "string"
},
"ls_bridge_name": {
"description": "宿主机逻辑网桥名称(不填默认)",
"example": "",
"type": "string"
},
"ls_name": {
"description": "宿主机逻辑端口名称(不填默认)",
"example": "",
"type": "string"
},
"host_id": {
"description": "宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"name",
"address",
"gateway",
"type",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"gateway": {
"type": "string"
},
"nameservers": {
"type": "string"
},
"type": {
"type": "string"
},
"mac_address": {
"type": "string"
},
"bridge_name": {
"type": "string"
},
"ls_bridge_name": {
"type": "string"
},
"ls_name": {
"type": "string"
},
"target_device": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"address",
"gateway",
"nameservers",
"type",
"mac_address",
"bridge_name",
"ls_bridge_name",
"ls_name",
"target_device",
"host_id",
"created_at",
"updated_at"
]
}
},
"required": [
"data"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/network/update": {
"post": {
"summary": "修改网络",
"deprecated": false,
"description": "",
"operationId": "PointNetworkUpdate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理",
"Point.Network"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"address": {
"description": "ip地址 CIDR类型 192.168.1.1/24",
"example": "",
"type": "string"
},
"gateway": {
"description": "网关地址 如 192.168.1.1",
"example": "",
"type": "string"
},
"nameservers": {
"description": "dns服务器(不填默认114.114.114.114,8.8.8.8",
"example": "",
"type": "string"
},
"type": {
"description": "网络类型 bridge(网桥) \\ nat(内网)",
"example": "",
"type": "string"
},
"mac_address": {
"description": "虚拟网卡MAC地址(不填随机)",
"example": "",
"type": "string"
},
"bridge_name": {
"description": "虚拟网桥名称(不填默认)",
"example": "",
"type": "string"
},
"ls_bridge_name": {
"description": "宿主机逻辑网桥名称(不填默认)",
"example": "",
"type": "string"
},
"ls_name": {
"description": "宿主机逻辑端口名称(不填默认)",
"example": "",
"type": "string"
},
"host_id": {
"description": "宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/network/delete": {
"delete": {
"summary": "删除网络",
"deprecated": false,
"description": "",
"operationId": "PointNetworkDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理",
"Point.Network"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "network_id",
"in": "query",
"description": "网络id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/list": {
"get": {
"summary": "获取数据卷列表",
"deprecated": false,
"description": "",
"operationId": "PointVolumeList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"example": 1,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "count",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "status",
"in": "query",
"description": "筛选数据卷状态( pending \\ ready \\ error \\ unknown",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id(单个请求虚拟机需要)",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "筛选所属虚拟机id",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "image_id",
"in": "query",
"description": "筛选镜像id",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/detail": {
"get": {
"summary": "获取数据卷详情",
"deprecated": false,
"description": "",
"operationId": "PointVolumeGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "volume_id",
"in": "query",
"description": "数据卷id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"size": {
"type": "integer"
},
"is_system": {
"type": "boolean"
},
"path": {
"type": "string"
},
"status": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"host_volume_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"size",
"is_system",
"path",
"status",
"host_id",
"host_volume_id",
"created_at",
"updated_at"
]
}
},
"required": [
"data"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/create": {
"post": {
"summary": "创建数据卷",
"deprecated": false,
"description": "",
"operationId": "PointVolumeCreate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"size": {
"description": "数据卷大小 GB",
"example": 0,
"type": "integer"
},
"is_system": {
"description": "是否系统镜像",
"example": "",
"type": "boolean"
},
"target_device": {
"description": "挂载虚拟机目标设备名称(不填自动生成)",
"example": "",
"type": "string"
},
"vm_id": {
"description": "挂载的虚拟机id",
"example": 0,
"type": "integer"
},
"image_id": {
"description": "所属镜像id",
"example": 0,
"type": "integer"
},
"host_id": {
"description": "宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"name",
"size",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"size": {
"type": "integer"
},
"path": {
"type": "string"
},
"status": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"host_volume_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"name",
"size",
"path",
"status",
"host_id",
"host_volume_id",
"created_at",
"updated_at"
]
}
},
"required": [
"data"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/resize": {
"post": {
"summary": "调整数据卷大小",
"deprecated": false,
"description": "",
"operationId": "PointVolumeResize",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"volume_id": {
"description": "数据卷id",
"example": 0,
"type": "integer"
},
"size": {
"description": "大小 GB",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"volume_id",
"size"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
}
},
"required": [
"seconds"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
}
},
"required": [
"seconds"
]
}
},
"required": [
"id",
"host_id",
"created_at",
"updated_at"
]
},
"task": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"task_id": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"tag": {
"type": "string"
},
"message": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"task_id",
"name",
"status",
"tag",
"message",
"host_id",
"created_at",
"updated_at"
]
}
},
"required": [
"data",
"task"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/mount": {
"post": {
"summary": "挂载卷到虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVolumeMount",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"volume_id": {
"description": "数据卷id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"volume_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/unmount": {
"post": {
"summary": "卸载卷",
"deprecated": false,
"description": "",
"operationId": "PointVolumeUnmount",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"volume_id": {
"description": "数据卷id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"volume_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/transfer": {
"post": {
"summary": "迁移卷",
"deprecated": false,
"description": "",
"operationId": "PointVolumeTransfer",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"volume_id": {
"description": "数据卷id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "目标虚拟机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"volume_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
}
},
"required": [
"seconds"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
}
},
"required": [
"seconds"
]
}
},
"required": [
"id",
"host_id",
"created_at",
"updated_at"
]
},
"task": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"task_id": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"tag": {
"type": "string"
},
"message": {
"type": "string"
},
"host_id": {
"type": "integer"
},
"created_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
},
"updated_at": {
"type": "object",
"properties": {
"seconds": {
"type": "integer"
},
"nanos": {
"type": "integer"
}
},
"required": [
"seconds",
"nanos"
]
}
},
"required": [
"id",
"task_id",
"name",
"status",
"tag",
"message",
"host_id",
"created_at",
"updated_at"
]
}
},
"required": [
"data",
"task"
]
}
},
"required": [
"code",
"message",
"data"
]
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/volume/delete": {
"delete": {
"summary": "删除卷",
"deprecated": false,
"description": "",
"operationId": "PointVolumeDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理",
"Point.Volume"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "volume_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/list": {
"get": {
"summary": "获取虚拟机列表",
"deprecated": false,
"description": "",
"operationId": "PointVMList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "count",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "key",
"in": "query",
"description": "筛选关键词",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "host_id",
"in": "query",
"description": "宿主机id",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "image_id",
"in": "query",
"description": "筛选镜像",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "port_group_id",
"in": "query",
"description": "筛选安全组",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "status",
"in": "query",
"description": "筛选状态 pending \\ creating \\ ready \\ running \\ stopped \\ error \\ paused \\ reboot \\ poweroff \\ unknown",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "user_id",
"in": "query",
"description": "筛选用户",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/detail": {
"get": {
"summary": "获取虚拟机详情",
"deprecated": false,
"description": "",
"operationId": "PointVMGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "虚拟机id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/status": {
"get": {
"summary": "获取虚拟机状态",
"deprecated": false,
"description": "",
"operationId": "PointVMGetStatus",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "虚拟机id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/metrics": {
"get": {
"summary": "获取虚拟机状态指标数据",
"deprecated": false,
"description": "",
"operationId": "PointVMGetMetrics",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_name",
"in": "query",
"description": "虚拟机名称",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/create": {
"post": {
"summary": "创建虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMCreate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称(不传随机)",
"example": "",
"type": "string"
},
"memory": {
"description": "内存 (KB)",
"example": 0,
"type": "integer"
},
"vcpu": {
"description": "虚拟 CPU 核数",
"example": 0,
"type": "integer"
},
"system_size": {
"description": "系统盘大小 (GB)",
"example": 0,
"type": "integer"
},
"rx_bandwidth": {
"description": "入向带宽",
"example": 0,
"type": "integer"
},
"tx_bandwidth": {
"description": "出向带宽",
"example": 0,
"type": "integer"
},
"image_id": {
"description": "镜像id",
"example": 0,
"type": "integer"
},
"host_id": {
"description": "宿主机id(与 host_group_id 二选一)",
"example": 0,
"type": "integer"
},
"host_group_id": {
"description": "宿主机组id(与 host_id 二选一)",
"example": 0,
"type": "integer"
},
"user_id": {
"description": "用户id",
"example": 0,
"type": "integer"
},
"ip_num": {
"description": "ip数量(与 network_ids 二选一)",
"example": 0,
"type": "integer"
},
"network_ids": {
"description": "网络ip列表 (与 ip_num 二选一)",
"example": "",
"type": "array"
}
},
"required": [
"service_id",
"name",
"memory",
"vcpu",
"system_size",
"image_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/update": {
"post": {
"summary": "修改虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMUpdate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"rx_bandwidth": {
"description": "入向带宽",
"example": 0,
"type": "integer"
},
"tx_bandwidth": {
"description": "出向带宽",
"example": 0,
"type": "integer"
},
"root_password": {
"description": "root密码",
"example": "",
"type": "string"
},
"ssh_port": {
"description": "ssh端口",
"example": 0,
"type": "integer"
},
"network_ids": {
"description": "网络id列表(使用 , 分割)",
"example": "",
"type": "array"
},
"internet_network_id": {
"description": "内网id",
"example": 0,
"type": "integer"
},
"port_group_id": {
"description": "安全组id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/rebuild": {
"post": {
"summary": "重装虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMRebuild",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"image_id": {
"description": "镜像id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"vm_id",
"image_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/refactor": {
"post": {
"summary": "重构虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMRefactor",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"memory": {
"description": "内存 KB",
"example": 0,
"type": "integer"
},
"vcpu": {
"description": "cpu数量",
"example": 0,
"type": "integer"
},
"rx_bandwidth": {
"description": "入向带宽",
"example": 0,
"type": "integer"
},
"tx_bandwidth": {
"description": "出向带宽",
"example": 0,
"type": "integer"
},
"root_password": {
"description": "root密码",
"example": "",
"type": "string"
},
"uuid": {
"description": "虚拟机uuid(不填随机)",
"example": "",
"type": "string"
},
"mate_data_id": {
"description": "虚拟机元数据uuid(不填随机)",
"example": "",
"type": "string"
},
"physical_name": {
"description": "物理网卡名称(不填默认)",
"example": "",
"type": "string"
},
"config_path": {
"description": "配置文件保存地址(不填默认)",
"example": "",
"type": "string"
},
"ssh_port": {
"description": "ssh端口(不填默认)",
"example": 0,
"type": "integer"
},
"vnc_port": {
"description": "vnc端口(不填默认)",
"example": 0,
"type": "integer"
},
"vnc_password": {
"description": "vnc密码(不填随机)",
"example": "",
"type": "string"
},
"network_ids": {
"description": "网络id列表(使用 , 分割)",
"example": "",
"type": "array"
},
"internet_network_id": {
"description": "内网网络id",
"example": 0,
"type": "integer"
},
"port_group_id": {
"description": "安全组id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/update_traffic": {
"post": {
"summary": "修改虚拟机带宽",
"deprecated": false,
"description": "",
"operationId": "PointVMUpdateTraffic",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"rx_bandwidth": {
"description": "入向带宽",
"example": 0,
"type": "integer"
},
"tx_bandwidth": {
"description": "出向带宽",
"example": 0,
"type": "integer"
},
"traffic_max": {
"description": "每月最大流量 KB",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/start": {
"post": {
"summary": "启动虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMStart",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "是否强制",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/stop": {
"post": {
"summary": "停止虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMStop",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "是否强制",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/reboot": {
"post": {
"summary": "重启虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMReboot",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "是否强制",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/suspend": {
"post": {
"summary": "暂停虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMSuspend",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "主控服务id",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/resume": {
"post": {
"summary": "恢复虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMResume",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "是否强制",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/rescue": {
"post": {
"summary": "虚拟机进入救援系统",
"deprecated": false,
"description": "",
"operationId": "PointVMRescue",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "是否强制",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/exit_rescue": {
"post": {
"summary": "虚拟机退出救援系统",
"deprecated": false,
"description": "",
"operationId": "PointVMExitRescue",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
},
"force": {
"description": "是否强制",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vm/delete": {
"delete": {
"summary": "删除虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointVMDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理",
"Point.VM"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/list": {
"get": {
"summary": "获取安全组列表",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "主控服务id",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "page_size",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "关键词筛选",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "lock",
"in": "query",
"description": "筛选是否锁定(锁定后用户无法修改)",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "drop_all",
"in": "query",
"description": "筛选是否开启白名单模式",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "shared",
"in": "query",
"description": "是否为共享安全组",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "user_id",
"in": "query",
"description": "筛选用户ID",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/detail": {
"get": {
"summary": "获取安全组详情",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupGet",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/create": {
"post": {
"summary": "创建安全组",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupCreate",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"direction": {
"description": "方向 in\\out",
"example": "",
"type": "string"
},
"lock": {
"description": "是否锁定(锁定后用户无法修改)",
"example": "",
"type": "boolean"
},
"drop_all": {
"description": "是否开启白名单模式",
"example": "",
"type": "boolean"
},
"host_id": {
"description": "所属宿主机id",
"example": 0,
"type": "integer"
},
"user_id": {
"description": "所属用户ID",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"name",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/update": {
"post": {
"summary": "修改安全组",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupUpdate",
"tags": [
"安全组"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"id": {
"description": "安全组id",
"example": 0,
"type": "integer"
},
"name": {
"description": "安全组名称",
"example": "",
"type": "string"
},
"direction": {
"description": "方向 in\\out",
"example": "",
"type": "string"
},
"lock": {
"description": "是否锁定(锁定后用户无法修改)",
"example": "",
"type": "boolean"
},
"drop_all": {
"description": "是否开启白名单模式",
"example": "",
"type": "boolean"
},
"user_id": {
"description": "用户ID",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/sync": {
"post": {
"summary": "同步安全组",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupSync",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"host_id": {
"description": "同步到的宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/bind": {
"post": {
"summary": "绑定安全组到虚拟机",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupBind",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/unbind": {
"post": {
"summary": "解绑安全组",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupUnbind",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"vm_id": {
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/delete": {
"delete": {
"summary": "删除安全组",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupDelete",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/enable_whitelist": {
"post": {
"summary": "开启安全组白名单",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupEnableWhitelist",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/disable_whitelist": {
"post": {
"summary": "关闭安全组白名单",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupDisableWhitelist",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/create_rule": {
"post": {
"summary": "新增安全组规则",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupCreateRule",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"group_id": {
"description": "所属安全组",
"example": 0,
"type": "integer"
},
"priority": {
"description": "优先级",
"example": 0,
"type": "integer"
},
"protocol": {
"description": "协议(tcp \\ udp",
"example": "",
"type": "string"
},
"action": {
"description": "动作 allow \\ deny",
"example": "",
"type": "string"
},
"port_range": {
"description": "端口范围,两种写法: 80-90(范围写法) \\ 80(指定写法)",
"example": "",
"type": "string"
},
"ip_range": {
"description": "ip范围 192.168.1.1/24 ",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"group_id",
"protocol",
"action"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/update_rule": {
"post": {
"summary": "修改安全组规则",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupUpdateRule",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"port_group_id": {
"example": 0,
"type": "integer"
},
"priority": {
"example": 0,
"type": "integer"
},
"protocol": {
"example": "",
"type": "string"
},
"action": {
"example": "",
"type": "string"
},
"port_range": {
"example": "",
"type": "string"
},
"ip_range": {
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"id",
"port_group_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/delete_rule": {
"delete": {
"summary": "删除安全组规则",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupDeleteRule",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/apply": {
"post": {
"summary": "应用安全组",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupApply",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理",
"Point.PostGroup"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/post_group/set_shared": {
"post": {
"summary": "设置安全组共享状态",
"deprecated": false,
"description": "",
"operationId": "PointPostGroupSetShared",
"tags": [
"安全组"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"id": {
"description": "安全组ID",
"example": 0,
"type": "integer"
},
"shared": {
"description": "是否共享",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vnc/list": {
"get": {
"summary": "获取 VNC 节点列表",
"deprecated": false,
"description": "",
"operationId": "PointVNCGetNodeList",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理",
"Point.VNC"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "page_size",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vnc/vm_vnc": {
"get": {
"summary": "获取虚拟机 VNC 连接信息",
"deprecated": false,
"description": "",
"operationId": "PointVNCGetVmVNC",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理",
"Point.VNC"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vnc/add": {
"post": {
"summary": "新增 VNC 节点",
"deprecated": false,
"description": "",
"operationId": "PointVNCAddNode",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理",
"Point.VNC"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"name": {
"description": "名称",
"example": "",
"type": "string"
},
"ip": {
"description": "服务ip",
"example": "",
"type": "string"
},
"port": {
"description": "服务端口",
"example": "",
"type": "string"
},
"token": {
"description": "服务token",
"example": "",
"type": "string"
},
"use_ssl": {
"description": "是否启用ssl",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"name",
"ip",
"port"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vnc/test": {
"post": {
"summary": "测试 VNC 节点连接",
"deprecated": false,
"description": "",
"operationId": "PointVNCTestNode",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理",
"Point.VNC"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "主控服务id",
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"host_id": {
"description": "测试的宿主机id",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"id",
"host_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vnc/update": {
"post": {
"summary": "修改 VNC 节点",
"deprecated": false,
"description": "",
"operationId": "PointVNCUpdateNode",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理",
"Point.VNC"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"example": 0,
"type": "integer"
},
"id": {
"example": 0,
"type": "integer"
},
"name": {
"example": "",
"type": "string"
},
"ip": {
"example": "",
"type": "string"
},
"port": {
"example": "",
"type": "string"
},
"token": {
"example": "",
"type": "string"
},
"use_ssl": {
"description": "是否启用ssl",
"example": "",
"type": "boolean"
}
},
"required": [
"service_id",
"id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
},
"headers": {}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/vnc/delete": {
"delete": {
"summary": "删除 VNC 节点",
"deprecated": false,
"description": "",
"operationId": "PointVNCDeleteNode",
"tags": [
"admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理",
"Point.VNC"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "id",
"in": "query",
"description": "",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"required": false,
"example": "Bearer {{token}}",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/list": {
"get": {
"summary": "获取快照列表",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotList",
"tags": [
"快照"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "虚拟机ID",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "搜索关键字",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "status",
"in": "query",
"description": "快照状态",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/progress": {
"get": {
"summary": "获取快照任务进度",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotProgress",
"tags": [
"快照"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "task_id",
"in": "query",
"description": "任务ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/create": {
"post": {
"summary": "创建快照",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotCreate",
"tags": [
"快照"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "快照名称",
"example": "",
"type": "string"
},
"description": {
"description": "快照描述",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"vm_id",
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/restore": {
"post": {
"summary": "恢复快照",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotRestore",
"tags": [
"快照"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"snapshot_id": {
"description": "快照ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "快照名称",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"snapshot_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/delete": {
"post": {
"summary": "删除快照",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotDelete",
"tags": [
"快照"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"snapshot_id": {
"description": "快照ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "快照名称",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"snapshot_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/count": {
"get": {
"summary": "获取快照数量与上限",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotGetCount",
"tags": [
"管理员-快照"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "虚拟机ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {
"type": "object",
"properties": {
"vm_id": {
"type": "integer",
"format": "int64",
"description": "虚拟机ID"
},
"count": {
"type": "integer",
"format": "uint32",
"description": "当前快照数量"
},
"limit": {
"type": "integer",
"format": "uint32",
"description": "快照上限"
}
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/snapshot/set_limit": {
"post": {
"summary": "设置快照数量上限",
"deprecated": false,
"description": "",
"operationId": "PointSnapshotSetLimit",
"tags": [
"管理员-快照"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"limit": {
"description": "快照数量上限",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"vm_id",
"limit"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {
"type": "object",
"properties": {
"vm_id": {
"type": "integer",
"format": "int64"
},
"count": {
"type": "integer",
"format": "uint32"
},
"limit": {
"type": "integer",
"format": "uint32"
}
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/list": {
"get": {
"summary": "获取备份列表",
"deprecated": false,
"description": "",
"operationId": "PointBackupList",
"tags": [
"备份"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "虚拟机ID",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "搜索关键字",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "status",
"in": "query",
"description": "备份状态",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/progress": {
"get": {
"summary": "获取备份任务进度",
"deprecated": false,
"description": "",
"operationId": "PointBackupProgress",
"tags": [
"备份"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "task_id",
"in": "query",
"description": "任务ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/create": {
"post": {
"summary": "创建备份",
"deprecated": false,
"description": "",
"operationId": "PointBackupCreate",
"tags": [
"备份"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "备份名称",
"example": "",
"type": "string"
},
"description": {
"description": "备份描述",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"vm_id",
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/restore": {
"post": {
"summary": "恢复备份",
"deprecated": false,
"description": "",
"operationId": "PointBackupRestore",
"tags": [
"备份"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"backup_id": {
"description": "备份ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "备份名称",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"backup_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/delete": {
"post": {
"summary": "删除备份",
"deprecated": false,
"description": "",
"operationId": "PointBackupDelete",
"tags": [
"备份"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"backup_id": {
"description": "备份ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "备份名称",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"backup_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/count": {
"get": {
"summary": "获取备份数量与上限",
"deprecated": false,
"description": "",
"operationId": "PointBackupGetCount",
"tags": [
"管理员-备份"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM服务ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "vm_id",
"in": "query",
"description": "虚拟机ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {
"type": "object",
"properties": {
"vm_id": {
"type": "integer",
"format": "int64",
"description": "虚拟机ID"
},
"count": {
"type": "integer",
"format": "uint32",
"description": "当前备份数量"
},
"limit": {
"type": "integer",
"format": "uint32",
"description": "备份上限"
}
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admin/server/host_service/point/backup/set_limit": {
"post": {
"summary": "设置备份数量上限",
"deprecated": false,
"description": "",
"operationId": "PointBackupSetLimit",
"tags": [
"管理员-备份"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM服务ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机ID",
"example": 0,
"type": "integer"
},
"limit": {
"description": "备份数量上限",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"vm_id",
"limit"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"data": {
"type": "object",
"properties": {
"vm_id": {
"type": "integer",
"format": "int64"
},
"count": {
"type": "integer",
"format": "uint32"
},
"limit": {
"type": "integer",
"format": "uint32"
}
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/networking/create": {
"post": {
"summary": "创建用户组网",
"deprecated": false,
"description": "",
"tags": [
"KVM-UserNetworking"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM 服务 ID",
"example": 0,
"type": "integer"
},
"name": {
"description": "组网名称",
"example": "",
"type": "string"
},
"description": {
"description": "组网描述",
"example": "",
"type": "string"
},
"user_id": {
"description": "用户 ID",
"example": 0,
"type": "integer"
},
"host_id": {
"description": "宿主机 ID",
"example": 0,
"type": "integer"
},
"bridge_name": {
"description": "网桥名称",
"example": "",
"type": "string"
},
"gateway": {
"description": "网关地址",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"name",
"user_id",
"host_id",
"bridge_name",
"gateway"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/UserNetworkingData"
}
}
}
}
}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/networking/assign": {
"post": {
"summary": "为虚拟机分配组网 IP",
"deprecated": false,
"description": "",
"tags": [
"KVM-UserNetworking"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM 服务 ID",
"example": 0,
"type": "integer"
},
"networking_id": {
"description": "组网 ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机 ID",
"example": 0,
"type": "integer"
},
"ip": {
"description": "指定 IP,不传则自动分配",
"example": "",
"type": "string"
}
},
"required": [
"service_id",
"networking_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"networking": {
"$ref": "#/components/schemas/UserNetworkingData"
},
"network": {
"$ref": "#/components/schemas/Network"
},
"task": {
"$ref": "#/components/schemas/Task"
}
}
}
}
}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/networking/list": {
"get": {
"summary": "获取组网列表",
"deprecated": false,
"description": "",
"tags": [
"KVM-UserNetworking"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM 服务 ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "page",
"in": "query",
"description": "页码",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "count",
"in": "query",
"description": "每页数量",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "host_id",
"in": "query",
"description": "按宿主机 ID 筛选",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "user_id",
"in": "query",
"description": "按用户 ID 筛选",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "keyword",
"in": "query",
"description": "关键词搜索",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "总数"
}
}
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserNetworkingData"
}
}
}
}
}
}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/networking/detail": {
"get": {
"summary": "获取组网详情",
"deprecated": false,
"description": "",
"tags": [
"KVM-UserNetworking"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM 服务 ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "networking_id",
"in": "query",
"description": "组网 ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/UserNetworkingData"
},
"networks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NetworkingNetworkItem"
}
}
}
}
}
}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/networking/delete": {
"delete": {
"summary": "删除组网",
"deprecated": false,
"description": "",
"tags": [
"KVM-UserNetworking"
],
"parameters": [
{
"name": "service_id",
"in": "query",
"description": "KVM 服务 ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "networking_id",
"in": "query",
"description": "组网 ID",
"required": true,
"schema": {
"type": "integer"
}
},
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/UserNetworkingData"
}
}
}
}
}
}
},
"security": []
}
},
"/api/v1/admins/service/host_service/point/networking/remove_network": {
"post": {
"summary": "删除组网下的指定网络",
"deprecated": false,
"description": "",
"tags": [
"KVM-UserNetworking"
],
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "",
"example": "Bearer {{token}}",
"schema": {
"type": "string",
"default": "Bearer {{token}}"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"service_id": {
"description": "KVM 服务 ID",
"example": 0,
"type": "integer"
},
"networking_id": {
"description": "组网 ID",
"example": 0,
"type": "integer"
},
"network_id": {
"description": "网络 ID",
"example": 0,
"type": "integer"
},
"vm_id": {
"description": "虚拟机 ID(用于从 VM 中移除网络)",
"example": 0,
"type": "integer"
}
},
"required": [
"service_id",
"networking_id",
"network_id",
"vm_id"
]
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/UserNetworkingData"
}
}
}
}
}
}
},
"security": []
}
}
},
"components": {
"schemas": {
"Success": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"message": {
"type": "string",
"example": "Success"
},
"data": {
"type": "object",
"properties": {}
},
"error": {
"type": "string"
}
}
},
"SuccessResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 200
},
"message": {
"type": "string",
"example": "success"
},
"data": {
"type": "object",
"properties": {}
}
}
},
"UserNetworkingData": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"user_id": {
"type": "integer",
"format": "int64"
},
"host_id": {
"type": "integer",
"format": "int64"
},
"bridge_name": {
"type": "string"
},
"gateway": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
},
"NetworkingNetworkItem": {
"type": "object",
"properties": {
"network": {
"$ref": "#/components/schemas/Network"
},
"vm_id": {
"type": "integer",
"format": "int64"
},
"vm_name": {
"type": "string"
},
"vm_status": {
"type": "string"
}
}
},
"ErrorResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"example": 400
},
"message": {
"type": "string"
},
"error": {
"type": "string"
}
}
},
"Network": {
"type": "object",
"description": "网络对象(来自 gRPC Network message",
"properties": {}
},
"Task": {
"type": "object",
"description": "异步任务对象(来自 gRPC Task message",
"properties": {}
}
},
"responses": {},
"securitySchemes": {}
},
"servers": [],
"security": []
}