mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:48:49 +02:00
fix(swagger): remove /api/v1 prefix from Proxmox endpoints
Streamline Proxmox API route paths by removing incorrect /api/v1 prefix.
Changed endpoints:
- /api/v1/proxmox/journalctl/{node}/{vmid} → /proxmox/journalctl/{node}/{vmid}
- /api/v1/proxmox/journalctl/{node}/{vmid}/{service} → /proxmox/journalctl/{node}/{vmid}/{service}
- /api/v1/proxmox/lxc/:node/:vmid/restart → /proxmox/lxc/:node/:vmid/restart
- /api/v1/proxmox/lxc/:node/:vmid/start → /proxmox/lxc/:node/:vmid/start
- /api/v1/proxmox/lxc/:node/:vmid/stop → /proxmox/lxc/:node/:vmid/stop
- /api/v1/proxmox/stats/{node}/{vmid} → /proxmox/stats/{node}/{vmid}
Updated:
- Swagger annotations in 5 Go source files
- Generated swagger.json and swagger.yaml documentation
This commit is contained in:
@@ -165,377 +165,6 @@
|
|||||||
"operationId": "verify"
|
"operationId": "verify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/v1/proxmox/journalctl/{node}/{vmid}": {
|
|
||||||
"get": {
|
|
||||||
"description": "Get journalctl output",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"proxmox",
|
|
||||||
"websocket"
|
|
||||||
],
|
|
||||||
"summary": "Get journalctl output",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "node",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "vmid",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "limit",
|
|
||||||
"name": "limit",
|
|
||||||
"in": "query"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Journalctl output",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Invalid request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"403": {
|
|
||||||
"description": "Unauthorized",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Node not found",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal server error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-id": "journalctl",
|
|
||||||
"operationId": "journalctl"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/proxmox/journalctl/{node}/{vmid}/{service}": {
|
|
||||||
"get": {
|
|
||||||
"description": "Get journalctl output",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"proxmox",
|
|
||||||
"websocket"
|
|
||||||
],
|
|
||||||
"summary": "Get journalctl output",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "node",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "service",
|
|
||||||
"in": "path"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "vmid",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "limit",
|
|
||||||
"name": "limit",
|
|
||||||
"in": "query"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Journalctl output",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Invalid request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"403": {
|
|
||||||
"description": "Unauthorized",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Node not found",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal server error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-id": "journalctl",
|
|
||||||
"operationId": "journalctl"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/proxmox/lxc/:node/:vmid/restart": {
|
|
||||||
"post": {
|
|
||||||
"description": "Restart LXC container by node and vmid",
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"proxmox"
|
|
||||||
],
|
|
||||||
"summary": "Restart LXC container",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "node",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "vmid",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/SuccessResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Invalid request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Node not found",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-id": "lxcRestart",
|
|
||||||
"operationId": "lxcRestart"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/proxmox/lxc/:node/:vmid/start": {
|
|
||||||
"post": {
|
|
||||||
"description": "Start LXC container by node and vmid",
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"proxmox"
|
|
||||||
],
|
|
||||||
"summary": "Start LXC container",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "node",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "vmid",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/SuccessResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Invalid request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Node not found",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-id": "lxcStart",
|
|
||||||
"operationId": "lxcStart"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/proxmox/lxc/:node/:vmid/stop": {
|
|
||||||
"post": {
|
|
||||||
"description": "Stop LXC container by node and vmid",
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"proxmox"
|
|
||||||
],
|
|
||||||
"summary": "Stop LXC container",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "node",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "vmid",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/SuccessResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Invalid request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Node not found",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal Server Error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-id": "lxcStop",
|
|
||||||
"operationId": "lxcStop"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/v1/proxmox/stats/{node}/{vmid}": {
|
|
||||||
"get": {
|
|
||||||
"description": "Get proxmox stats in format of \"STATUS|CPU%%|MEM USAGE/LIMIT|MEM%%|NET I/O|BLOCK I/O\"",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"proxmox",
|
|
||||||
"websocket"
|
|
||||||
],
|
|
||||||
"summary": "Get proxmox stats",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"name": "node",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "vmid",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "Stats output",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "Invalid request",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"403": {
|
|
||||||
"description": "Unauthorized",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "Node not found",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal server error",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ErrorResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"x-id": "stats",
|
|
||||||
"operationId": "stats"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/auth/callback": {
|
"/auth/callback": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Handles the callback from the provider after successful authentication",
|
"description": "Handles the callback from the provider after successful authentication",
|
||||||
@@ -2448,6 +2077,377 @@
|
|||||||
"operationId": "uptime"
|
"operationId": "uptime"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/proxmox/journalctl/{node}/{vmid}": {
|
||||||
|
"get": {
|
||||||
|
"description": "Get journalctl output",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"proxmox",
|
||||||
|
"websocket"
|
||||||
|
],
|
||||||
|
"summary": "Get journalctl output",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "node",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "vmid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "limit",
|
||||||
|
"name": "limit",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Journalctl output",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Node not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-id": "journalctl",
|
||||||
|
"operationId": "journalctl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/proxmox/journalctl/{node}/{vmid}/{service}": {
|
||||||
|
"get": {
|
||||||
|
"description": "Get journalctl output",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"proxmox",
|
||||||
|
"websocket"
|
||||||
|
],
|
||||||
|
"summary": "Get journalctl output",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "node",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "service",
|
||||||
|
"in": "path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "vmid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "limit",
|
||||||
|
"name": "limit",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Journalctl output",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Node not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-id": "journalctl",
|
||||||
|
"operationId": "journalctl"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/proxmox/lxc/:node/:vmid/restart": {
|
||||||
|
"post": {
|
||||||
|
"description": "Restart LXC container by node and vmid",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"proxmox"
|
||||||
|
],
|
||||||
|
"summary": "Restart LXC container",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "node",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "vmid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/SuccessResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Node not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-id": "lxcRestart",
|
||||||
|
"operationId": "lxcRestart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/proxmox/lxc/:node/:vmid/start": {
|
||||||
|
"post": {
|
||||||
|
"description": "Start LXC container by node and vmid",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"proxmox"
|
||||||
|
],
|
||||||
|
"summary": "Start LXC container",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "node",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "vmid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/SuccessResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Node not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-id": "lxcStart",
|
||||||
|
"operationId": "lxcStart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/proxmox/lxc/:node/:vmid/stop": {
|
||||||
|
"post": {
|
||||||
|
"description": "Stop LXC container by node and vmid",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"proxmox"
|
||||||
|
],
|
||||||
|
"summary": "Stop LXC container",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "node",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "vmid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/SuccessResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Node not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-id": "lxcStop",
|
||||||
|
"operationId": "lxcStop"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/proxmox/stats/{node}/{vmid}": {
|
||||||
|
"get": {
|
||||||
|
"description": "Get proxmox stats in format of \"STATUS|CPU%%|MEM USAGE/LIMIT|MEM%%|NET I/O|BLOCK I/O\"",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"proxmox",
|
||||||
|
"websocket"
|
||||||
|
],
|
||||||
|
"summary": "Get proxmox stats",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "node",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "vmid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Stats output",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Node not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-id": "stats",
|
||||||
|
"operationId": "stats"
|
||||||
|
}
|
||||||
|
},
|
||||||
"/reload": {
|
"/reload": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Reload config",
|
"description": "Reload config",
|
||||||
|
|||||||
@@ -2088,249 +2088,6 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- agent
|
- agent
|
||||||
x-id: verify
|
x-id: verify
|
||||||
/api/v1/proxmox/journalctl/{node}/{vmid}:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Get journalctl output
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: node
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: vmid
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: limit
|
|
||||||
in: query
|
|
||||||
name: limit
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Journalctl output
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"400":
|
|
||||||
description: Invalid request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"403":
|
|
||||||
description: Unauthorized
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"404":
|
|
||||||
description: Node not found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal server error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
summary: Get journalctl output
|
|
||||||
tags:
|
|
||||||
- proxmox
|
|
||||||
- websocket
|
|
||||||
x-id: journalctl
|
|
||||||
/api/v1/proxmox/journalctl/{node}/{vmid}/{service}:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Get journalctl output
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: node
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: service
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: vmid
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
- description: limit
|
|
||||||
in: query
|
|
||||||
name: limit
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Journalctl output
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"400":
|
|
||||||
description: Invalid request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"403":
|
|
||||||
description: Unauthorized
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"404":
|
|
||||||
description: Node not found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal server error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
summary: Get journalctl output
|
|
||||||
tags:
|
|
||||||
- proxmox
|
|
||||||
- websocket
|
|
||||||
x-id: journalctl
|
|
||||||
/api/v1/proxmox/lxc/:node/:vmid/restart:
|
|
||||||
post:
|
|
||||||
description: Restart LXC container by node and vmid
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: node
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: vmid
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/SuccessResponse'
|
|
||||||
"400":
|
|
||||||
description: Invalid request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"404":
|
|
||||||
description: Node not found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
summary: Restart LXC container
|
|
||||||
tags:
|
|
||||||
- proxmox
|
|
||||||
x-id: lxcRestart
|
|
||||||
/api/v1/proxmox/lxc/:node/:vmid/start:
|
|
||||||
post:
|
|
||||||
description: Start LXC container by node and vmid
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: node
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: vmid
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/SuccessResponse'
|
|
||||||
"400":
|
|
||||||
description: Invalid request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"404":
|
|
||||||
description: Node not found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
summary: Start LXC container
|
|
||||||
tags:
|
|
||||||
- proxmox
|
|
||||||
x-id: lxcStart
|
|
||||||
/api/v1/proxmox/lxc/:node/:vmid/stop:
|
|
||||||
post:
|
|
||||||
description: Stop LXC container by node and vmid
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: node
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: vmid
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/SuccessResponse'
|
|
||||||
"400":
|
|
||||||
description: Invalid request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"404":
|
|
||||||
description: Node not found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal Server Error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
summary: Stop LXC container
|
|
||||||
tags:
|
|
||||||
- proxmox
|
|
||||||
x-id: lxcStop
|
|
||||||
/api/v1/proxmox/stats/{node}/{vmid}:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Get proxmox stats in format of "STATUS|CPU%%|MEM USAGE/LIMIT|MEM%%|NET
|
|
||||||
I/O|BLOCK I/O"
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: node
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: vmid
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Stats output
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"400":
|
|
||||||
description: Invalid request
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"403":
|
|
||||||
description: Unauthorized
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"404":
|
|
||||||
description: Node not found
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
"500":
|
|
||||||
description: Internal server error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ErrorResponse'
|
|
||||||
summary: Get proxmox stats
|
|
||||||
tags:
|
|
||||||
- proxmox
|
|
||||||
- websocket
|
|
||||||
x-id: stats
|
|
||||||
/auth/callback:
|
/auth/callback:
|
||||||
post:
|
post:
|
||||||
description: Handles the callback from the provider after successful authentication
|
description: Handles the callback from the provider after successful authentication
|
||||||
@@ -3604,6 +3361,249 @@ paths:
|
|||||||
- metrics
|
- metrics
|
||||||
- websocket
|
- websocket
|
||||||
x-id: uptime
|
x-id: uptime
|
||||||
|
/proxmox/journalctl/{node}/{vmid}:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get journalctl output
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: node
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: vmid
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
- description: limit
|
||||||
|
in: query
|
||||||
|
name: limit
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Journalctl output
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
"400":
|
||||||
|
description: Invalid request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"403":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"404":
|
||||||
|
description: Node not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal server error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
summary: Get journalctl output
|
||||||
|
tags:
|
||||||
|
- proxmox
|
||||||
|
- websocket
|
||||||
|
x-id: journalctl
|
||||||
|
/proxmox/journalctl/{node}/{vmid}/{service}:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get journalctl output
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: node
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: service
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: vmid
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
- description: limit
|
||||||
|
in: query
|
||||||
|
name: limit
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Journalctl output
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
"400":
|
||||||
|
description: Invalid request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"403":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"404":
|
||||||
|
description: Node not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal server error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
summary: Get journalctl output
|
||||||
|
tags:
|
||||||
|
- proxmox
|
||||||
|
- websocket
|
||||||
|
x-id: journalctl
|
||||||
|
/proxmox/lxc/:node/:vmid/restart:
|
||||||
|
post:
|
||||||
|
description: Restart LXC container by node and vmid
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: node
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: vmid
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/SuccessResponse'
|
||||||
|
"400":
|
||||||
|
description: Invalid request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"404":
|
||||||
|
description: Node not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
summary: Restart LXC container
|
||||||
|
tags:
|
||||||
|
- proxmox
|
||||||
|
x-id: lxcRestart
|
||||||
|
/proxmox/lxc/:node/:vmid/start:
|
||||||
|
post:
|
||||||
|
description: Start LXC container by node and vmid
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: node
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: vmid
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/SuccessResponse'
|
||||||
|
"400":
|
||||||
|
description: Invalid request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"404":
|
||||||
|
description: Node not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
summary: Start LXC container
|
||||||
|
tags:
|
||||||
|
- proxmox
|
||||||
|
x-id: lxcStart
|
||||||
|
/proxmox/lxc/:node/:vmid/stop:
|
||||||
|
post:
|
||||||
|
description: Stop LXC container by node and vmid
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: node
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: vmid
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/SuccessResponse'
|
||||||
|
"400":
|
||||||
|
description: Invalid request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"404":
|
||||||
|
description: Node not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
summary: Stop LXC container
|
||||||
|
tags:
|
||||||
|
- proxmox
|
||||||
|
x-id: lxcStop
|
||||||
|
/proxmox/stats/{node}/{vmid}:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Get proxmox stats in format of "STATUS|CPU%%|MEM USAGE/LIMIT|MEM%%|NET
|
||||||
|
I/O|BLOCK I/O"
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: node
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: vmid
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Stats output
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
"400":
|
||||||
|
description: Invalid request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"403":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"404":
|
||||||
|
description: Node not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
"500":
|
||||||
|
description: Internal server error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ErrorResponse'
|
||||||
|
summary: Get proxmox stats
|
||||||
|
tags:
|
||||||
|
- proxmox
|
||||||
|
- websocket
|
||||||
|
x-id: stats
|
||||||
/reload:
|
/reload:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ type JournalctlRequest struct {
|
|||||||
// @Failure 403 {object} apitypes.ErrorResponse "Unauthorized"
|
// @Failure 403 {object} apitypes.ErrorResponse "Unauthorized"
|
||||||
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
||||||
// @Failure 500 {object} apitypes.ErrorResponse "Internal server error"
|
// @Failure 500 {object} apitypes.ErrorResponse "Internal server error"
|
||||||
// @Router /api/v1/proxmox/journalctl/{node}/{vmid} [get]
|
// @Router /proxmox/journalctl/{node}/{vmid} [get]
|
||||||
// @Router /api/v1/proxmox/journalctl/{node}/{vmid}/{service} [get]
|
// @Router /proxmox/journalctl/{node}/{vmid}/{service} [get]
|
||||||
func Journalctl(c *gin.Context) {
|
func Journalctl(c *gin.Context) {
|
||||||
var request JournalctlRequest
|
var request JournalctlRequest
|
||||||
if err := c.ShouldBindUri(&request); err != nil {
|
if err := c.ShouldBindUri(&request); err != nil {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import (
|
|||||||
// @Failure 400 {object} apitypes.ErrorResponse "Invalid request"
|
// @Failure 400 {object} apitypes.ErrorResponse "Invalid request"
|
||||||
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
||||||
// @Failure 500 {object} apitypes.ErrorResponse
|
// @Failure 500 {object} apitypes.ErrorResponse
|
||||||
// @Router /api/v1/proxmox/lxc/:node/:vmid/restart [post]
|
// @Router /proxmox/lxc/:node/:vmid/restart [post]
|
||||||
func Restart(c *gin.Context) {
|
func Restart(c *gin.Context) {
|
||||||
var req ActionRequest
|
var req ActionRequest
|
||||||
if err := c.ShouldBindUri(&req); err != nil {
|
if err := c.ShouldBindUri(&req); err != nil {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import (
|
|||||||
// @Failure 400 {object} apitypes.ErrorResponse "Invalid request"
|
// @Failure 400 {object} apitypes.ErrorResponse "Invalid request"
|
||||||
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
||||||
// @Failure 500 {object} apitypes.ErrorResponse
|
// @Failure 500 {object} apitypes.ErrorResponse
|
||||||
// @Router /api/v1/proxmox/lxc/:node/:vmid/start [post]
|
// @Router /proxmox/lxc/:node/:vmid/start [post]
|
||||||
func Start(c *gin.Context) {
|
func Start(c *gin.Context) {
|
||||||
var req ActionRequest
|
var req ActionRequest
|
||||||
if err := c.ShouldBindUri(&req); err != nil {
|
if err := c.ShouldBindUri(&req); err != nil {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ type StatsRequest struct {
|
|||||||
// @Failure 403 {object} apitypes.ErrorResponse "Unauthorized"
|
// @Failure 403 {object} apitypes.ErrorResponse "Unauthorized"
|
||||||
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
||||||
// @Failure 500 {object} apitypes.ErrorResponse "Internal server error"
|
// @Failure 500 {object} apitypes.ErrorResponse "Internal server error"
|
||||||
// @Router /api/v1/proxmox/stats/{node}/{vmid} [get]
|
// @Router /proxmox/stats/{node}/{vmid} [get]
|
||||||
func Stats(c *gin.Context) {
|
func Stats(c *gin.Context) {
|
||||||
var request StatsRequest
|
var request StatsRequest
|
||||||
if err := c.ShouldBindUri(&request); err != nil {
|
if err := c.ShouldBindUri(&request); err != nil {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import (
|
|||||||
// @Failure 400 {object} apitypes.ErrorResponse "Invalid request"
|
// @Failure 400 {object} apitypes.ErrorResponse "Invalid request"
|
||||||
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
// @Failure 404 {object} apitypes.ErrorResponse "Node not found"
|
||||||
// @Failure 500 {object} apitypes.ErrorResponse
|
// @Failure 500 {object} apitypes.ErrorResponse
|
||||||
// @Router /api/v1/proxmox/lxc/:node/:vmid/stop [post]
|
// @Router /proxmox/lxc/:node/:vmid/stop [post]
|
||||||
func Stop(c *gin.Context) {
|
func Stop(c *gin.Context) {
|
||||||
var req ActionRequest
|
var req ActionRequest
|
||||||
if err := c.ShouldBindUri(&req); err != nil {
|
if err := c.ShouldBindUri(&req); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user