diff --git a/internal/api/v1/docs/swagger.json b/internal/api/v1/docs/swagger.json index 1cdf3a8b..8b0f4df9 100644 --- a/internal/api/v1/docs/swagger.json +++ b/internal/api/v1/docs/swagger.json @@ -165,377 +165,6 @@ "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": { "post": { "description": "Handles the callback from the provider after successful authentication", @@ -2448,6 +2077,377 @@ "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": { "post": { "description": "Reload config", diff --git a/internal/api/v1/docs/swagger.yaml b/internal/api/v1/docs/swagger.yaml index 314598d6..4e8d2b33 100644 --- a/internal/api/v1/docs/swagger.yaml +++ b/internal/api/v1/docs/swagger.yaml @@ -2088,249 +2088,6 @@ paths: tags: - agent 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: post: description: Handles the callback from the provider after successful authentication @@ -3604,6 +3361,249 @@ paths: - metrics - websocket 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: post: consumes: diff --git a/internal/api/v1/proxmox/journalctl.go b/internal/api/v1/proxmox/journalctl.go index 611c27b3..8a512b00 100644 --- a/internal/api/v1/proxmox/journalctl.go +++ b/internal/api/v1/proxmox/journalctl.go @@ -31,8 +31,8 @@ type JournalctlRequest struct { // @Failure 403 {object} apitypes.ErrorResponse "Unauthorized" // @Failure 404 {object} apitypes.ErrorResponse "Node not found" // @Failure 500 {object} apitypes.ErrorResponse "Internal server error" -// @Router /api/v1/proxmox/journalctl/{node}/{vmid} [get] -// @Router /api/v1/proxmox/journalctl/{node}/{vmid}/{service} [get] +// @Router /proxmox/journalctl/{node}/{vmid} [get] +// @Router /proxmox/journalctl/{node}/{vmid}/{service} [get] func Journalctl(c *gin.Context) { var request JournalctlRequest if err := c.ShouldBindUri(&request); err != nil { diff --git a/internal/api/v1/proxmox/restart.go b/internal/api/v1/proxmox/restart.go index fb6a7a4b..7ed2f585 100644 --- a/internal/api/v1/proxmox/restart.go +++ b/internal/api/v1/proxmox/restart.go @@ -19,7 +19,7 @@ import ( // @Failure 400 {object} apitypes.ErrorResponse "Invalid request" // @Failure 404 {object} apitypes.ErrorResponse "Node not found" // @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) { var req ActionRequest if err := c.ShouldBindUri(&req); err != nil { diff --git a/internal/api/v1/proxmox/start.go b/internal/api/v1/proxmox/start.go index 1f2dfe3f..a88cb7a9 100644 --- a/internal/api/v1/proxmox/start.go +++ b/internal/api/v1/proxmox/start.go @@ -19,7 +19,7 @@ import ( // @Failure 400 {object} apitypes.ErrorResponse "Invalid request" // @Failure 404 {object} apitypes.ErrorResponse "Node not found" // @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) { var req ActionRequest if err := c.ShouldBindUri(&req); err != nil { diff --git a/internal/api/v1/proxmox/stats.go b/internal/api/v1/proxmox/stats.go index 6d6886f0..e016770b 100644 --- a/internal/api/v1/proxmox/stats.go +++ b/internal/api/v1/proxmox/stats.go @@ -29,7 +29,7 @@ type StatsRequest struct { // @Failure 403 {object} apitypes.ErrorResponse "Unauthorized" // @Failure 404 {object} apitypes.ErrorResponse "Node not found" // @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) { var request StatsRequest if err := c.ShouldBindUri(&request); err != nil { diff --git a/internal/api/v1/proxmox/stop.go b/internal/api/v1/proxmox/stop.go index 363d5e73..b1347904 100644 --- a/internal/api/v1/proxmox/stop.go +++ b/internal/api/v1/proxmox/stop.go @@ -19,7 +19,7 @@ import ( // @Failure 400 {object} apitypes.ErrorResponse "Invalid request" // @Failure 404 {object} apitypes.ErrorResponse "Node not found" // @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) { var req ActionRequest if err := c.ShouldBindUri(&req); err != nil {