From 4024f48d7ddf91f15c4367cd4a29ee996e4efe5a Mon Sep 17 00:00:00 2001 From: Fiahblade Date: Fri, 16 Jan 2026 18:28:55 +0100 Subject: [PATCH] Update api docs (v2.4.1) --- apis/v2.yml | 4224 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 2454 insertions(+), 1770 deletions(-) diff --git a/apis/v2.yml b/apis/v2.yml index 44392321..3807b6a4 100644 --- a/apis/v2.yml +++ b/apis/v2.yml @@ -1,158 +1,60 @@ openapi: 3.0.0 info: title: MCSS API v13 - description: |- - - Documentation for the official MC Server Soft API. - - This for MCSS v13.7.0 and higher. - - Other versions: - - The API used in v13 - v13.4 can be found at - [v1 (legacy)](/apis/v1) - Note that since v13.9.0 this version is no longer accessible/distributed with mcss. - - - The API used in V12 can be found at - [https://documenter.getpostman.com/view/7749159/TzJsexSC](https://documenter.getpostman.com/view/7749159/TzJsexSC) - ## Introduction - * * * * * - - Since version 12, MCSS includes an API that allows you to interact with your servers remotely. This documentation is aimed at developers wanting to create apps that utilize the API. - - As of right now you can: - - Run power actions - Start, Stop, Restart or Kill your servers - - Send commands - run minecraft commands in the console - - Return server information like the icon, status and description - - Scheduler CRUD operations (create, read, update & delete tasks) - - Backup CRUD operations (create, read, update & delete backups) - - Panel users CRUD operations (create, read, update & delete users) - - By default, the API is disabled. - - > It can be enabled from the settings `file > options`. Tick the box labeled `Enable Web API`. After exiting the settings, the API will become available. - - ## Authentication - * * * * * - - All API calls require an API key.
This is a header called: `apiKey` -
-    GET /api/v2 HTTP/1.1
-    Host: YOUR_IP_ADDRESS:YOUR_PANEL_PORT
-    apiKey: YOUR_API_KEY
-    
- - > If your key is compromised or lost, it's crucial to act swiftly. In case of exposure, regenerate the key immediately. If lost, delete the old one and generate a new key. Always keep your keys confidential and secure. - - API keys can be created in the 'Web Panel' section of mcss: - - ![Screenshot of the "Create new API Key" window, ready to create an API key](/img/docs/api/remote-access-manager-create-key.png) - ![Screenshot of the "Create new API Key" window, where an API key has been created](/img/docs/api/remote-access-manager-key-created.png) - - ## Permissions - * * * * * - - Permissions can be applied to different users and API keys. This limits the amount of functionality that becomes available for that user/API key. - - - viewStats - - viewConsole - - useConsole - - useServerActions - - editServer - - viewBackups - - createBackup - - editBackup - - deleteBackups - - triggerBackup - - viewSchedulerTasks - - createSchedulerTasks - - editSchedulerTask - - deleteSchedulerTasks - - triggerSchedulerTask - - These permissions are overwritten when the user or API key has the [Admin Permission](/api/admin). - - > Important note: the Admin permission does not grant you instant access to all servers. - - ## Contributing - * * * * * - - Please take into account that these docs are auto generated. Don't spend too much time creating a PR, as most of the changes will probably get overwritten. Create a suggestion based PR instead, so that we can change the source directly and prevent you wasting a lot of time. - - version: API_2.4.0 + description: "Documentation for the official MC Server Soft API. \nThis for MCSS v13.7.0 and higher.\n\nOther versions:\n\n- The API used in v13 - v13.4 can be found at [https://apidocs-v1.mcserversoft.com](https://apidocs-v1.mcserversoft.com) \n Note that since v13.9.0 this version is no longer accessible/distributed with mcss.\n \n- The API used in V12 can be found at [https://documenter.getpostman.com/view/7749159/TzJsexSC](https://documenter.getpostman.com/view/7749159/TzJsexSC)\n \n\n\\## Introduction\_ \_ \\* \\* \\* \\* \\* \n\_ \_ Since version 12, MCSS includes an API that allows you to interact with your servers remotely. This documentation is aimed at developers wanting to create apps that utilize the API. \n\_ \_ As of right now you can:\_ \_ - Run power actions - Start, Stop, Restart or Kill your servers\_ \_ - Send commands - run minecraft commands in the console\_ \_ - Return server information like the icon, status and description\_ \_ - Scheduler CRUD operations (create, read, update & delete tasks) \_\_ \_ - Backup CRUD operations (create, read, update & delete backups) \_\_ \_ - Panel users CRUD operations (create, read, update & delete users) \_ \n\_ \_ By default, the API is disabled. \n\_ \_ > It can be enabled from the settings \\`file > options\\`. Tick the box labeled \\`Enable Web API\\`. After exiting the settings, the API will become available. \n\_ \_ ## Authentication\_ \_ \\* \\* \\* \\* \\* \n\_ \_ All API calls require an API key. \nThis is a header called: \\`apiKey\\`\_ \_\n\n\_ \_ GET /api/v2 HTTP/1.1\_ \_ Host: YOUR_IP_ADDRESS:YOUR_PANEL_PORT\_ \_ apiKey: YOUR_API_KEY\_ \_ \n\n \n\_ \_ > If your key is compromised or lost, it's crucial to act swiftly. In case of exposure, regenerate the key immediately. If lost, delete the old one and generate a new key. Always keep your keys confidential and secure. \n\_ \_ API keys can be created in the 'Web Panel' section of mcss: \n\_ \_ !\\[Screenshot of the \"Create new API Key\" window, ready to create an API key\\](/img/docs/api/remote-access-manager-create-key.png)\_ \_ !\\[Screenshot of the \"Create new API Key\" window, where an API key has been created\\](/img/docs/api/remote-access-manager-key-created.png) \n\_ \_ ## Permissions\_ \_ \\* \\* \\* \\* \\* \n\_ \_ Permissions can be applied to different users and API keys. This limits the amount of functionality that becomes available for that user/API key. \n\_ \_ - viewStats\_ \_ - viewConsole\_ \_ - useConsole\_ \_ - useServerActions\_ \_ - editServer\_ \_ - viewBackups\_ \_ - createBackup\_ \_ - editBackup\_ \_ - deleteBackups\_ \_ - triggerBackup\_ \_ - viewSchedulerTasks\_ \_ - createSchedulerTasks\_ \_ - editSchedulerTask\_ \_ - deleteSchedulerTasks\_ \_ - triggerSchedulerTask \n\_ \_ These permissions are overwritten when the user or API key has the \\[Admin Permission\\](/api/admin). \n\_ \_ > Important note: the Admin permission does not grant you instant access to all servers. \n\_ \_ ## Contributing\_ \_ \\* \\* \\* \\* \\* \n\_ \_ Please take into account that these docs are auto generated. Don't spend too much time creating a PR, as most of the changes will probably get overwritten. Create a suggestion based PR instead, so that we can change the source directly and prevent you wasting a lot of time" + version: API_2.4.1 servers: - url: https://localhost:25560 description: Your local MCSS API server -components: - securitySchemes: - apiKey: - description: > - For this sample, you can use the api key `apiKey` to access this endpoint. - type: apiKey - name: apiKey - in: header -security: - - apiKey: [] -tags: - - name: General - description: General API calls that interact with mcss directly. - - name: Servers - description: API calls that involve multiple servers. - - name: Server - description: API calls that involve a single server. - - name: Console - description: API calls that involve the console from a single server. - - name: Scheduler - description: API calls that involve the scheduler from a single server. - - name: Backups - description: API calls that involve backup from a single server. - - name: Webhooks - description: (API Key must have admin rights) - - name: Users - description: |- - API calls that involve the web panel users. - (API Key must have admin rights) - - name: ApiKeys - description: (API Key must have admin rights) - - name: Mcss paths: /api/v2: get: - tags: - - General summary: Get API version - description: Get version info about mcss. responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object + properties: + isDevBuild: + type: boolean + mcssVersion: + type: string + mcssApiVersion: + type: string + uniqueIdentifier: + type: string + youAreAwesome: + type: boolean example: isDevBuild: false mcssVersion: 13.0.0 - mcssApiVersion: 2.0.0 + mcssApiVersion: 1.0.0 uniqueIdentifier: 3664ac4e-23a5-4877-ab75-8412884acdb7 youAreAwesome: true - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers: + '401': + description: '401' + tags: + - General + description: Get version info about mcss. + /events: get: + summary: Get Events + parameters: + - name: servers + in: header + schema: + type: string + example: sssdfdsfsd + responses: {} tags: - - Servers + - General + description: WIP + /api/v3/servers: + get: summary: Get list of servers - description: |- - Return info of all servers. - - **filter (optional) : enum** - 0 = None - 1 = Minimal - 2 = Status parameters: - name: filter in: query @@ -160,80 +62,169 @@ paths: type: string example: None responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: - type: object + type: array + items: + type: object + properties: + serverId: + type: string + status: + type: integer + name: + type: string + description: + type: string + pathToFolder: + type: string + format: uri + folderName: + type: string + type: + type: string + creationDate: + type: string + format: date-time + isSetToAutoStart: + type: boolean + forceSaveOnStop: + type: boolean + keepOnline: + type: integer + javaAllocatedMemory: + type: integer + javaStartupLine: + type: string example: - serverId: 69361e31-2ac8-43b5-9377-0cb5e40e75ac status: 0 name: Server Pool - description: Your Minecraft, your way - pathToFolder: P:\path\to\mcss\servers\Purpur\ + description: 'Your Minecraft, your way' + pathToFolder: 'P:\path\to\mcss\servers\Purpur\' folderName: Purpur type: Purpur - creationDate: "2022-07-05T15:56:21.0991114+02:00" + creationDate: '2022-07-05T15:56:21.0991114+02:00' isSetToAutoStart: false forceSaveOnStop: false keepOnline: 0 javaAllocatedMemory: 1024 - javaStartupLine: java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar + javaStartupLine: 'java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar' - serverId: bd03d993-e052-4196-bf04-bdc3754efc3d status: 0 name: My Bungee Network description: Jump jump - pathToFolder: P:\path\to\mcss\servers\bungee\ + pathToFolder: 'P:\path\to\mcss\servers\bungee\' folderName: bungee type: BungeeCord - creationDate: "2021-11-19T20:24:02.3105235+01:00" + creationDate: '2021-11-19T20:24:02.3105235+01:00' isSetToAutoStart: false forceSaveOnStop: false keepOnline: 0 javaAllocatedMemory: 2048 - javaStartupLine: java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access + javaStartupLine: 'java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar' + '401': + description: '401' + '403': + description: '403' content: application/json: schema: - type: object + type: array + items: + type: object + properties: + guid: + type: string + status: + type: integer + name: + type: string + description: + type: string + pathToFolder: + type: string + format: uri + folderName: + type: string + creationDate: + type: string + format: date-time + isSetToAutoStart: + type: boolean + keepOnline: + type: integer + javaAllocatedMemory: + type: integer + javaStartupLine: + type: string example: - guid: 69361e31-2ac8-43b5-9377-0cb5e40e75ac status: 0 name: Server Pool - description: Your Minecraft, your way - pathToFolder: P:\path\to\mcss\servers\Purpur\ + description: 'Your Minecraft, your way' + pathToFolder: 'P:\path\to\mcss\servers\Purpur\' folderName: Purpur - creationDate: "2022-07-05T15:56:21.0991114+02:00" + creationDate: '2022-07-05T15:56:21.0991114+02:00' isSetToAutoStart: false keepOnline: 0 javaAllocatedMemory: 1024 - javaStartupLine: java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar + javaStartupLine: 'java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar' - guid: bd03d993-e052-4196-bf04-bdc3754efc3d status: 0 name: My Bungee Network description: Jump jump - pathToFolder: P:\path\to\mcss\servers\bungee\ + pathToFolder: 'P:\path\to\mcss\servers\bungee\' folderName: bungee - creationDate: "2021-11-19T20:24:02.3105235+01:00" + creationDate: '2021-11-19T20:24:02.3105235+01:00' isSetToAutoStart: false keepOnline: 0 javaAllocatedMemory: 2048 - javaStartupLine: java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar + javaStartupLine: 'java -Xms256M -Xmx[RAM]M -jar [SERVERTYPE.NAME].jar' + tags: + - Servers + description: |- + Return info of all servers. + + **filter (optional) : enum** + 0 = None + 1 = Minimal + 2 = Status /api/v2/servers/count: get: + summary: Get server count + parameters: + - name: filter + in: query + schema: + type: integer + example: '3' + - name: serverTypeId + in: query + schema: + type: string + example: f738fb40-223e-4010-bd07-af4caabdf3dd + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + count: + type: integer + example: + count: 5 + '401': + description: '401' + '403': + description: '403' tags: - Servers - summary: Get server count description: |- Get the total amount of servers. @@ -277,45 +268,95 @@ paths: Purpur 984ed3d3-636d-4535-82b2-7c1048782c64 - parameters: - - name: filter - in: query - schema: - type: integer - example: "3" - - name: serverTypeId - in: query - schema: - type: string - example: f738fb40-223e-4010-bd07-af4caabdf3dd + /api/v2/servers/execute/action: + post: + summary: Mass execute server action responses: - "200": - description: OK - content: - application/json: + '200': + description: '200' + '207': + description: '207' + headers: + Server: schema: - type: object - example: - count: 5 - "401": - description: Unauthorized - content: - text/plain: + type: string + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: 'Tue, 31 Jan 2023 10:33:26 GMT' + Connection: schema: type: string - example: null - /api/v2/servers/execute/action: - post: + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding + content: + application/json: + schema: + type: object + properties: + responses: + type: array + items: + type: object + properties: + serverId: + type: string + status: + type: integer + message: + type: string + example: + responses: + - serverId: 69361e31-2ac8-43b5-9377-0cb5e40e75ac + status: 200 + message: OK + - serverId: 19f7b040-cc2d-4b61-bf32-334b4eb091f9 + status: 403 + message: No Server Access + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Servers - summary: Mass execute server action description: |- Change the status of multiple servers. @@ -333,25 +374,91 @@ paths: application/json: schema: type: object - example: + properties: serverIds: - - 69361e31-2ac8-43b5-9377-0cb5e40e75ac - - 19f7b040-cc2d-4b61-bf32-334b4eb091f9 - action: 1 + type: array + items: + type: string + action: + type: integer + example: + serverIds: + - 69361e31-2ac8-43b5-9377-0cb5e40e75ac + - 19f7b040-cc2d-4b61-bf32-334b4eb091f9 + action: 1 + /api/v2/servers/execute/command: + post: + summary: Mass execute server command responses: - "200": - description: OK - content: - text/plain: + '200': + description: '200' + '207': + description: '207' + headers: + Server: + schema: + type: string + example: GenHTTP/6.4.0.0 + Date: + schema: + type: string + example: 'Tue, 31 Jan 2023 10:33:26 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: schema: type: string - example: null - "207": - description: Multi-Status + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: type: object + properties: + responses: + type: array + items: + type: object + properties: + serverId: + type: string + status: + type: integer + message: + type: string example: responses: - serverId: 69361e31-2ac8-43b5-9377-0cb5e40e75ac @@ -360,32 +467,14 @@ paths: - serverId: 19f7b040-cc2d-4b61-bf32-334b4eb091f9 status: 403 message: No Server Access - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/execute/command: - post: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Servers - summary: Mass execute server command description: |- Run a server command on a multiple server. @@ -399,25 +488,91 @@ paths: application/json: schema: type: object - example: + properties: serverIds: - - 69361e31-2ac8-43b5-9377-0cb5e40e75ac - - 19f7b040-cc2d-4b61-bf32-334b4eb091f9 - command: say hi + type: array + items: + type: string + command: + type: string + example: + serverIds: + - 69361e31-2ac8-43b5-9377-0cb5e40e75ac + - 19f7b040-cc2d-4b61-bf32-334b4eb091f9 + command: say hi + /api/v2/servers/execute/commands: + post: + summary: Mass execute server commands responses: - "200": - description: OK - content: - text/plain: + '200': + description: '200' + '207': + description: '207' + headers: + Server: + schema: + type: string + example: GenHTTP/6.4.0.0 + Date: + schema: + type: string + example: 'Tue, 31 Jan 2023 10:33:26 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: schema: type: string - example: null - "207": - description: Multi-Status + example: Accept-Encoding content: application/json: schema: type: object + properties: + responses: + type: array + items: + type: object + properties: + serverId: + type: string + status: + type: integer + message: + type: string example: responses: - serverId: 69361e31-2ac8-43b5-9377-0cb5e40e75ac @@ -426,32 +581,14 @@ paths: - serverId: 19f7b040-cc2d-4b61-bf32-334b4eb091f9 status: 403 message: No Server Access - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/execute/commands: - post: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Servers - summary: Mass execute server commands description: |- Run multiple server commands on a multiple server. @@ -465,69 +602,26 @@ paths: application/json: schema: type: object - example: + properties: serverIds: - - 69361e31-2ac8-43b5-9377-0cb5e40e75ac - - 19f7b040-cc2d-4b61-bf32-334b4eb091f9 + type: array + items: + type: string commands: - - say Je suis mcss - - say Qui - - say C'est moi - responses: - "200": - description: OK - content: - text/plain: - schema: - type: string - example: null - "207": - description: Multi-Status - content: - application/json: - schema: - type: object - example: - responses: - - serverId: 69361e31-2ac8-43b5-9377-0cb5e40e75ac - status: 200 - message: OK - - serverId: 19f7b040-cc2d-4b61-bf32-334b4eb091f9 - status: 403 - message: No Server Access - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null + type: array + items: + type: string + example: + serverIds: + - 69361e31-2ac8-43b5-9377-0cb5e40e75ac + - 19f7b040-cc2d-4b61-bf32-334b4eb091f9 + commands: + - say Je suis mcss + - say Qui + - say C'est moi /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a: get: - tags: - - Server summary: Get server details - description: |- - Return info of a specific server. - - **filter (optional) : enum** - 0 = None - 1 = Minimal - 2 = Status parameters: - name: filter in: query @@ -535,21 +629,51 @@ paths: type: string example: Minimal responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object + properties: + serverId: + type: string + status: + type: integer + name: + type: string + description: + type: string + pathToFolder: + type: string + format: uri + folderName: + type: string + type: + type: string + creationDate: + type: string + format: date-time + isSetToAutoStart: + type: boolean + forceSaveOnStop: + type: boolean + keepOnline: + type: integer + javaAllocatedMemory: + type: integer + javaStartupLine: + type: string + format: style example: serverId: e0ae4902-10ed-481f-aed0-fa1170ec779a status: 0 name: Server Pool description: Pvp & Minigames - pathToFolder: P:\path\to\mcss\servers\Purpur\ + pathToFolder: 'P:\path\to\mcss\servers\Purpur\' folderName: Purpur type: Purpur - creationDate: "2021-12-12T12:09:02.820296+01:00" + creationDate: '2021-12-12T12:09:02.820296+01:00' isSetToAutoStart: false forceSaveOnStop: false keepOnline: 0 @@ -567,41 +691,48 @@ paths: -XX:InitiatingHeapOccupancyPercent=15 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar nogui - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/69361e31-2ac8-43b5-9377-0cb5e40e75ac: - put: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Server - summary: Edit Server description: |- - Update a specific server. + Return info of a specific server. - **server (required)** - \- name (optional) : string - \- description (optional) : string - \- isSetToAutoStart (optional) : boolean - \- forceSaveOnStop (optional) : boolean - \- javaAllocatedMemory (optional) : int + **filter (optional) : enum** + 0 = None + 1 = Minimal + 2 = Status + /api/v2/servers/69361e31-2ac8-43b5-9377-0cb5e40e75ac: + put: + summary: Edit Server + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Server + description: |- + Update a specific server. + + **server (required)** + \- name (optional) : string + \- description (optional) : string + \- isSetToAutoStart (optional) : boolean + \- forceSaveOnStop (optional) : boolean + \- javaAllocatedMemory (optional) : int \- keepOnline (optional) : object ### KeepOnline Object @@ -614,50 +745,37 @@ paths: application/json: schema: type: object - example: - KeepOnline: Elevated - responses: - "200": - description: OK - content: - application/json: - schema: - type: object - example: {} - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null + properties: + KeepOnline: + type: string + example: + KeepOnline: Elevated /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/stats: get: - tags: - - Server summary: Get server stats - description: Return stats of a specific server. responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object + properties: + latest: + type: object + properties: + cpu: + type: integer + memoryUsed: + type: integer + memoryLimit: + type: integer + playersOnline: + type: integer + playerLimit: + type: integer + startDate: + type: integer example: latest: cpu: 0 @@ -666,67 +784,48 @@ paths: playersOnline: 0 playerLimit: 21 startDate: 0 - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/3054aac3-dbf5-4e10-94d2-f4b83577d9b4/icon: - get: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Server + description: Return stats of a specific server. + /api/v2/servers/3054aac3-dbf5-4e10-94d2-f4b83577d9b4/icon: + get: summary: Get server icon - description: Return the server-icon.png of a specific server. responses: - "200": - description: OK + '200': + description: '200' content: - image/png: + application/json: schema: type: object - example: {} - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Server + description: Return the server-icon.png of a specific server. /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/execute/action: post: + summary: Execute server action + responses: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Server - summary: Execute server action description: |- Change the status of a specific server. @@ -741,42 +840,25 @@ paths: application/json: schema: type: object - example: - action: 1 - responses: - "200": - description: OK - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null + properties: + action: + type: integer + example: + action: 1 /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/execute/command: post: + summary: Execute server command + responses: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Server - summary: Execute server command description: |- Run a server command on a specific server. @@ -787,42 +869,25 @@ paths: application/json: schema: type: object - example: - command: say My name’s not Kirk..It’s Skywalker. Luke Skywalker. - responses: - "200": - description: OK - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null + properties: + command: + type: string + example: + command: say My name’s not Kirk..It’s Skywalker. Luke Skywalker. /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/execute/commands: post: + summary: Execute server commands + responses: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Server - summary: Execute server commands description: |- Run multiple server commands on a specific server. @@ -833,79 +898,45 @@ paths: application/json: schema: type: object - example: + properties: commands: - - say Je suis mcss - - say Qui - - say C'est moi - responses: - "200": - description: OK - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null + type: array + items: + type: string + example: + commands: + - say Je suis mcss + - say Qui + - say C'est moi /api/v2/servers/3054aac3-dbf5-4e10-94d2-f4b83577d9b4/console: get: - tags: - - Console summary: Get server console - description: |- - Return the console of a specific server. - - **amountOfLines (required) : integer** - Amount of lines you want to fetch, -1 to fetch everything. - - **takeFromBeginning (optional) : boolean** - Specify if you want to start fetching from the oldest lines first. - - **reversed (optional) : boolean** - Option to flip the line order. parameters: - name: AmountOfLines in: query schema: type: integer - example: "5" + example: '5' - name: Reversed in: query schema: type: boolean - example: "true" + example: 'true' - name: takeFromBeginning in: query schema: type: boolean - example: "true" + example: 'true' responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: - type: object + type: array + items: + type: string + format: style example: - >- [21:24:12] [Server thread/INFO]: [CraftBook] CraftBook 3.10.6 @@ -924,153 +955,157 @@ paths: - >- [21:24:12] [Server thread/INFO]: [CraftBook] 1875 chunk(s) for 3 world(s) processed (109ms elapsed) - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/console/outdated: - get: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Console - summary: Check if console is outdated - description: >- - Check if your version of the console is outdated. This by sending the - last 2 last lines for comparison. - - - **secondLastLine (required)** - - Second last line you want to check. + description: |- + Return the console of a specific server. + **amountOfLines (required) : integer** + Amount of lines you want to fetch, -1 to fetch everything. - **lastLine (required)** + **takeFromBeginning (optional) : boolean** + Specify if you want to start fetching from the oldest lines first. - Last line you want to check. + **reversed (optional) : boolean** + Option to flip the line order. + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/console/outdated: + get: + summary: Check if console is outdated parameters: - name: secondLastLine in: query schema: type: string - example: >- - %5B19%3A25%3A31%5D%20%5BServer%20thread%2FINFO%5D%3A%20Closing%20Thread%20Pool + example: '[19:25:31] [Server thread/INFO]: Closing Thread Pool' - name: lastLine in: query schema: type: string - example: >- - %5B19%3A25%3A31%5D%20%5BServer%20thread%2FINFO%5D%3A%20Closing%20Server + example: '[19:25:31] [Server thread/INFO]: Closing Server' responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object + properties: + isOutdated: + type: boolean example: isOutdated: false - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler: - get: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - - Scheduler + - Console + description: >- + Check if your version of the console is outdated. This by sending the + last 2 last lines for comparison. + + + **secondLastLine (required)** + + Second last line you want to check. + + + **lastLine (required)** + + Last line you want to check. + /api/v2/servers/3377e93e-8359-4d43-8d28-177f8b7d96f2/scheduler: + get: summary: Get scheduler details - description: Return basic info about the scheduler of a specific server. responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object + properties: + tasks: + type: integer + triggers: + type: object + properties: + fixedTime: + type: integer + interval: + type: integer + playerEvent: + type: integer + noTrigger: + type: integer example: - tasks: 8 - interval: 4 - fixedTime: 3 - timeless: 1 - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks: - get: + tasks: 15 + triggers: + fixedTime: 0 + interval: 0 + playerEvent: 0 + noTrigger: 15 + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Scheduler + description: Return basic info about the scheduler of a specific server. + /api/v2/servers/3377e93e-8359-4d43-8d28-177f8b7d96f2/scheduler/tasks: + get: summary: Get list of tasks - description: |- - Return all tasks from a specific server. - - **filter (optional) : enum** - 0 = None - 1 = FixedTime - 2 = Interval - 3 = Timeless parameters: - name: filter in: query - schema: - type: string + required: false + deprecated: false + schema: {} example: None responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: - type: object + type: array + items: + type: object + properties: + serverId: + type: string + taskId: + type: string + name: + type: string + enabled: + type: boolean + playerRequirement: + type: integer + timing: + type: object + properties: + time: + type: string + format: time + repeat: + type: boolean + job: + type: object + properties: + commands: + type: array + items: + type: string example: - serverId: e0ae4902-10ed-481f-aed0-fa1170ec779a taskId: a3e0fc6b-1965-4745-a527-090c83b22079 @@ -1078,7 +1113,7 @@ paths: enabled: false playerRequirement: 0 timing: - time: "18:59:00" + time: '18:59:00' repeat: true job: commands: @@ -1091,56 +1126,124 @@ paths: timing: {} job: action: 1 - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - post: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Scheduler - summary: Create task description: |- - Create a new task. - - **task (required)** - \- name (required) : string - \- enabled (optional) : boolean - \- playerRequirement (optional) : object - \- timing (required) : object - \- job (required): object - - ### PlayerRequirement **Object** - - \- 0 none (default) - \- 1 empty - \- 2 atLeastOne - - ### **Timing Object** - - **fixedTime** - \- repeat: boolean - \- timeSpan: TimeSpan - - **interval** - \- repeat: boolean - \- interval: integer + Return all tasks from a specific server. + + **filter (optional) : enum** + 0 = None + 1 = FixedTime + 2 = Interval + 3 = Timeless + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/4a582b48-5f37-4586-88f9-a37af96db08a: + get: + summary: Get task + parameters: + - name: apiKey + in: header + schema: + type: string + example: >- + bc3DPiMI3KKYFJDoNGYkSlgsNtIx2LcoTkGosKaqWtkteNRZvd6cdoveu6rAYHjz8uGb0RlBeZ-DulusZKaUy9Tp24IvZI0OF7nr-ZAkmBim7yxHcDfW0GxL + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + taskId: + type: string + name: + type: string + enabled: + type: boolean + playerRequirement: + type: integer + timing: + type: object + properties: + repeat: + type: boolean + interval: + type: integer + job: + type: object + properties: + commands: + type: array + items: + type: string + example: + taskId: 4a582b48-5f37-4586-88f9-a37af96db08a + name: Made with the api2 + enabled: false + playerRequirement: 0 + timing: + repeat: false + interval: 151 + job: + commands: + - /say hello from the api2 + - /say hello from the api3 + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Scheduler + description: Return a specific task from a specific server. + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks: + post: + summary: Create task + responses: + '201': + description: '201' + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Scheduler + description: |- + Create a new task. + + **task (required)** + \- name (required) : string + \- enabled (optional) : boolean + \- playerRequirement (optional) : object + \- timing (required) : object + \- job (required): object + + ### PlayerRequirement **Object** + + \- 0 none (default) + \- 1 empty + \- 2 atLeastOne + + ### **Timing Object** + + **fixedTime** + \- repeat: boolean + \- timeSpan: TimeSpan + + **interval** + \- repeat: boolean + \- interval: integer **timeless** // no parameters @@ -1164,106 +1267,63 @@ paths: application/json: schema: type: object - example: - serverId: 0d16b818-2b8a-4653-9885-3ccb0d75a6d6 - taskId: 96861789-173c-4388-8084-9c46ed7ed7c1 - name: Made with the api s - enabled: true - playerRequirement: 0 + properties: + serverId: + type: string + taskId: + type: string + name: + type: string + enabled: + type: boolean + playerRequirement: + type: integer timing: - repeat: true - interval: 150 + type: object jobs: - - order: 0 - commands: - - /say hello from the api - responses: - "201": - description: Created - content: - text/plain: - schema: - type: string - example: null - "400": - description: Invalid Task Details - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - ? /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/4a582b48-5f37-4586-88f9-a37af96db08a - : get: - tags: - - Scheduler - summary: Get task - description: Return a specific task from a specific server. + type: array + items: + type: object + properties: + guid: + type: string + order: + type: integer + backupIdentifier: + type: string + enabled: + type: boolean + type: + type: string + example: + serverId: 0d16b818-2b8a-4653-9885-3ccb0d75a6d6 + taskId: 96861789-173c-4388-8084-9c46ed7ed7c1 + name: Test 3 + enabled: true + playerRequirement: 0 + timing: {} + jobs: + - guid: b1b59f49-68ab-4e9e-8d38-411b4d1c2c76 + order: 0 + backupIdentifier: 361288c7-7f6e-42ba-8f8a-69b98737c5ff + enabled: true + type: BackupJob + /api/v2/servers/0d16b818-2b8a-4653-9885-3ccb0d75a6d6/scheduler/tasks/684f8f8d-cd3b-4b14-8899-bbca3f4560df: + put: + summary: Edit task responses: - "200": - description: OK - content: - application/json: - schema: - type: object - example: - taskId: 4a582b48-5f37-4586-88f9-a37af96db08a - name: Made with the api2 - enabled: false - playerRequirement: 0 - timing: - repeat: false - interval: 151 - job: - commands: - - /say hello from the api2 - - /say hello from the api3 - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server/Task - content: - text/plain: - schema: - type: string - example: null - ? /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/26d30ef2-4e17-4c66-941b-07858601a100 - : put: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + '409': + description: '409' tags: - Scheduler - summary: Edit task description: |- Update a specific server task. @@ -1314,148 +1374,91 @@ paths: application/json: schema: type: object - example: - name: Test - enabled: true - playerRequirement: 1 - timing: - repeat: false - interval: 151 - jobs: - - order: 0 - commands: - - /say hello from the api2 - - /say hello from the api3 + example: "{\r\n \"name\": \"Test\",\r\n \"enabled\": true,\r\n \"playerRequirement\": 0,\r\n \"timing\": {\r\n // \"REPEAT\": FALSE,\r\n // \"INTERVAL\": 151\r\n // \"time\": \"18:05:00\",\r\n // \"repeat\": true\r\n \"repeat\": false,\r\n \"interval\": 5\r\n },\r\n \"jobs\": [\r\n // {\r\n // \"commands\": [\r\n // \"/say hello from the api2\",\r\n // \"/say hello from the api3\"\r\n // ],\r\n // \"enabled\":false\r\n // },\r\n {\r\n \"order\": 0,\r\n \"action\": 2,\r\n \"enabled\": true,\r\n \"type\": \"ServerActionJob\"\r\n }\r\n ]\r\n }" + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/e9aa8fb2-303c-41ec-b3a0-cd9252a2e19f: + delete: + summary: Delete task responses: - "200": - description: OK - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server/Task - content: - text/plain: - schema: - type: string - example: null - "409": - description: Timming type can not be changed. - content: - text/plain: - schema: - type: string - example: null - ? /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/e9aa8fb2-303c-41ec-b3a0-cd9252a2e19f - : delete: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Scheduler - summary: Delete task description: Delete a specific server task. + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/8fcab652-cb96-4c57-b12b-f1d0db694a2b: + post: + summary: Run task responses: - "200": - description: Deleted - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server/Task - content: - text/plain: - schema: - type: string - example: null - ? /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/scheduler/tasks/8fcab652-cb96-4c57-b12b-f1d0db694a2b - : post: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Scheduler - summary: Run task description: Run a specific server task. - requestBody: - content: {} - responses: - "200": - description: OK - content: - text/plain: - schema: - type: string - example: null - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server/Task - content: - text/plain: - schema: - type: string - example: null /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups: get: - tags: - - Backups summary: Get list of backups - description: Return all backups from a specific server + parameters: + - name: filter + in: query + schema: + type: integer + example: '0' responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: - type: object + type: array + items: + type: object + properties: + backupId: + type: string + name: + type: string + destination: + type: string + format: uri + suspend: + type: boolean + deleteOldBackups: + type: boolean + compression: + type: integer + lastStatus: + type: integer + completedAt: + type: string + format: style + fileBlacklist: + type: array + items: + type: string + folderBlacklist: + type: array + items: + type: string example: - backupId: eccd9909-8ec4-4bb5-9eda-6e7b4236c8b6 name: Backup test - destination: C:\Users\User\Desktop\mcss\backups + destination: 'C:\Users\User\Desktop\mcss\backups' suspend: false deleteOldBackups: true compression: 0 lastStatus: 0 - completedAt: "0001-01-01T00:00:00" + completedAt: '0001-01-01T00:00:00' fileBlacklist: - myfile.json - eula.txt @@ -1463,31 +1466,30 @@ paths: folderBlacklist: - crash-reports - logs - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server - content: - text/plain: - schema: - type: string - example: null - post: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Backups + description: Return all backups from a specific server + post: summary: Create backup + responses: + '201': + description: '201' + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Backups description: |- Create a new backup. @@ -1511,95 +1513,171 @@ paths: application/json: schema: type: object - example: - name: Test Backup - destination: P:\projects\MC Server Soft\dev\_debug\backups\TestApiBackup - suspend: true - deleteOldBackups: true - compression: 1 - runBackupAfterCreation: true - fileBlacklist: [] - folderBlacklist: [] + properties: + name: + type: string + destination: + type: string + format: style + suspend: + type: boolean + deleteOldBackups: + type: boolean + compression: + type: integer + runBackupAfterCreation: + type: boolean + fileBlacklist: + type: array + items: {} + folderBlacklist: + type: array + items: {} + example: + name: Test Backup + destination: 'P:\projects\MC Server Soft\dev\_debug\backups\TestApiBackup' + suspend: true + deleteOldBackups: true + compression: 1 + runBackupAfterCreation: true + fileBlacklist: [] + folderBlacklist: [] + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/stats: + get: + summary: Get list of backups stats responses: - "201": - description: Created - content: - text/plain: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "400": - description: Invalid Backup - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: 'Sat, 11 Nov 2023 15:38:54 GMT' + Connection: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: Keep-Alive + Content-Encoding: schema: type: string - example: null - "404": - description: Unknown Server - content: - text/plain: + example: br + Transfer-Encoding: schema: type: string - example: null - /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/stats: - get: - tags: - - Backups - summary: Get list of backups stats - description: Return all backup stats from a specific server - responses: - "200": - description: OK + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: type: object + properties: + scheduled: + type: integer + completed: + type: integer + canceled: + type: integer + failed: + type: integer example: scheduled: 1 completed: 5 canceled: 3 failed: 7 - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Backups + description: Return all backup stats from a specific server + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/449911ca-ff50-4052-8cf3-336b067cd482: + get: + summary: Get backup details + responses: + '200': + description: '200' content: - text/plain: + application/json: schema: - type: string - example: null - ? /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/449911ca-ff50-4052-8cf3-336b067cd482 - : get: + type: object + properties: + backupId: + type: string + name: + type: string + destination: + type: string + format: uri + suspend: + type: boolean + deleteOldBackups: + type: boolean + compression: + type: integer + lastStatus: + type: integer + completedAt: + type: string + format: style + fileBlacklist: + type: array + items: {} + folderBlacklist: + type: array + items: {} + example: + backupId: fd96b615-6158-4313-85e0-d488f2616ed2 + name: 1/220 + destination: 'H:\backups' + suspend: false + deleteOldBackups: false + compression: 1 + lastStatus: 0 + completedAt: '0001-01-01T00:00:00' + fileBlacklist: [] + folderBlacklist: [] + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Backups - summary: Get backup details description: |- Return a specific backup from a specific server. @@ -1616,49 +1694,19 @@ paths: \- 2 completed, \- 3 failed, \- 4 canceled - responses: - "200": - description: OK - content: - application/json: - schema: - type: object - example: - backupId: fd96b615-6158-4313-85e0-d488f2616ed2 - name: 1/220 - destination: H:\backups - suspend: false - deleteOldBackups: false - compression: 1 - lastStatus: 0 - completedAt: "0001-01-01T00:00:00" - fileBlacklist: [] - folderBlacklist: [] - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: - schema: - type: string - example: null - "404": - description: Unknown Server/Backup - content: - text/plain: - schema: - type: string - example: null put: + summary: Edit backup + responses: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Backups - summary: Edit backup description: |- Update a specific server backup. @@ -1682,201 +1730,232 @@ paths: application/json: schema: type: object - example: - name: Test Edited backup - compression: 1 - destination: Hi - suspend: true + properties: + name: + type: string + compression: + type: integer + destination: + type: string + suspend: + type: boolean folderBlacklist: - - world + type: array + items: + type: string + example: + name: Test Edited backup + compression: 1 + destination: Hi + suspend: true + folderBlacklist: + - world + delete: + summary: Delete backup responses: - "200": - description: OK - content: - text/plain: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Backups + description: Delete a specific server backup. + post: + summary: Run backup + responses: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Backups + description: Run a specific server backup. + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/history: + get: + summary: Get backup history + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: 'Sat, 11 Nov 2023 15:38:54 GMT' + Connection: schema: type: string - example: null - "404": - description: Unknown Server/Backup - content: - text/plain: + example: Keep-Alive + Content-Encoding: schema: type: string - example: null - delete: - tags: - - Backups - summary: Delete backup - description: Delete a specific server backup. - responses: - "200": - description: Deleted - content: - text/plain: + example: br + Transfer-Encoding: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: chunked + Access-Control-Allow-Origin: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: '*' + Access-Control-Allow-Methods: schema: type: string - example: null - "404": - description: Unknown Server/Backup - content: - text/plain: + example: '*' + Access-Control-Allow-Headers: schema: type: string - example: null - post: - tags: - - Backups - summary: Run backup - description: Run a specific server backup. - requestBody: - content: {} - responses: - "200": - description: OK - content: - text/plain: + example: '*, Authorization' + Access-Control-Expose-Headers: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: '*' + Access-Control-Allow-Credentials: schema: - type: string - example: null - "403": - description: No Server Access - content: - text/plain: + type: boolean + example: 'true' + Access-Control-Max-Age: schema: - type: string - example: null - "404": - description: Unknown Server/Backup - content: - text/plain: + type: integer + example: '86400' + Vary: schema: type: string - example: null - /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/history: - get: - tags: - - Backups - summary: Get backup history - description: Return the last 15 backup history from a specific server - responses: - "200": - description: OK + example: Accept-Encoding content: application/json: schema: - type: object + type: array + items: + type: object + properties: + name: + type: string + destination: + type: string + format: style + lastRun: + type: string + format: date-time + status: + type: integer + logMessage: + type: string example: - name: Test Backup destination: >- C:\Users\User\Desktop\mcss\backups\Backup of Server Pool_Test Backup 1666547683.zip - lastRun: "2022-10-23T19:54:51.4501132+02:00" + lastRun: '2022-10-23T19:54:51.4501132+02:00' status: 2 - logMessage: "" + logMessage: '' - name: Backup plugins destination: \1/22_1652974456.zip - lastRun: "2022-05-19T17:34:16.9474623+02:00" + lastRun: '2022-05-19T17:34:16.9474623+02:00' status: 3 logMessage: Something went wrong. - "401": - description: Unauthorized - content: - text/plain: + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Backups + description: Return the last 15 backup history from a specific server + /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/history/clear: + post: + summary: Clear backup history + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "404": - description: Unknown Server - content: - text/plain: + example: 'Sat, 11 Nov 2023 15:38:54 GMT' + Connection: schema: type: string - example: null - /api/v2/servers/e0ae4902-10ed-481f-aed0-fa1170ec779a/backups/history/clear: - post: - tags: - - Backups - summary: Clear backup history - description: Clear the backup history for a specific server - requestBody: - content: {} - responses: - "200": - description: OK - content: - application/json: + example: Keep-Alive + Content-Encoding: schema: - type: object - example: {} - "401": - description: Unauthorized - content: - text/plain: + type: string + example: br + Transfer-Encoding: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: chunked + Access-Control-Allow-Origin: schema: type: string - example: null - "404": - description: Unknown Server - content: - text/plain: + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: schema: type: string - example: null + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding + content: + application/json: + schema: + type: object + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Backups + description: Clear the backup history for a specific server /api/v2/webhooks: post: + summary: Create webhook + responses: + '201': + description: '201' + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' tags: - Webhooks - summary: Create webhook description: |- Create a new webhook. (API Key must have admin rights) @@ -1910,61 +1989,123 @@ paths: application/json: schema: type: object - example: - name: Test Backup - url: https://www.youtube.com/watch?v=2DfmZfgYvRM - isEnabled: true - messageFormat: 0 - webhookTriggers: [] + properties: + name: + type: string + url: + type: string + format: uri + isEnabled: + type: boolean + messageFormat: + type: integer + webhookTriggers: + type: array + items: {} optionalHeaders: - Version: v1 + type: object + properties: + Version: + type: string + example: + name: Test Backup + url: 'https://www.youtube.com/watch?v=2DfmZfgYvRM' + isEnabled: true + messageFormat: 0 + webhookTriggers: [] + optionalHeaders: + Version: v1 + get: + summary: Get list of Webhooks responses: - "201": - description: Created - content: - text/plain: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "400": - description: Invalid Webhook - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: 'Mon, 19 Aug 2024 18:09:13 GMT' + Connection: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: Keep-Alive + Content-Encoding: schema: type: string - example: null - get: - tags: - - Webhooks - summary: Get list of Webhooks - description: |- - Return all webhooks. - (API Key must have admin rights) - responses: - "200": - description: OK + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: - type: object + type: array + items: + type: object + properties: + webhookId: + type: string + name: + type: string + url: + type: string + format: uri + enabled: + type: boolean + messageFormat: + type: integer + webhookTriggers: + type: array + items: + type: integer + optionalHeaders: + type: object + properties: + User-Agent: + type: string + createdAt: + type: string + format: date-time + lastModifiedAt: + type: string + format: date-time example: - webhookId: 3a1261b8-bbbc-48a2-9edc-590a5d6de2dc name: Global status watcher - url: https://webhook.site/3b97f2c8-4570-4666-9f10-e4a0f6ab20c6 + url: 'https://webhook.site/3b97f2c8-4570-4666-9f10-e4a0f6ab20c6' enabled: false messageFormat: 0 webhookTriggers: @@ -1974,11 +2115,11 @@ paths: - 5 optionalHeaders: User-Agent: Mcss Api - createdAt: "2024-08-19T17:51:52.0500375Z" - lastModifiedAt: "2024-08-19T17:51:52.0500386Z" + createdAt: '2024-08-19T17:51:52.0500375Z' + lastModifiedAt: '2024-08-19T17:51:52.0500386Z' - webhookId: 4d26e531-7110-4fc5-9693-ffcc97ccbf92 name: Server status reporter (Discord) - url: https://discord.com/api/webhooks/example_url + url: 'https://discord.com/api/webhooks/example_url' enabled: false messageFormat: 1 webhookTriggers: @@ -1987,48 +2128,109 @@ paths: - 4 - 5 optionalHeaders: {} - createdAt: "2024-08-19T17:51:48.3341931Z" - lastModifiedAt: "2024-08-19T17:51:48.334194Z" - "400": - description: Invalid Webhook - content: - text/plain: + createdAt: '2024-08-19T17:51:48.3341931Z' + lastModifiedAt: '2024-08-19T17:51:48.334194Z' + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' + tags: + - Webhooks + description: |- + Return all webhooks. + (API Key must have admin rights) + /api/v2/webhooks/3a1261b8-bbbc-48a2-9edc-590a5d6de2dc: + get: + summary: Get webhook details + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "403": - description: No Server Access - content: - text/plain: + example: 'Tue, 31 Jan 2023 17:23:38 GMT' + Connection: schema: type: string - example: null - /api/v2/webhooks/3a1261b8-bbbc-48a2-9edc-590a5d6de2dc: - get: - tags: - - Webhooks - summary: Get webhook details - description: |- - Return a specific webhook. - (API Key must have admin rights) - responses: - "200": - description: OK + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: type: object + properties: + webhookId: + type: string + name: + type: string + url: + type: string + format: uri + enabled: + type: boolean + messageFormat: + type: integer + webhookTriggers: + type: array + items: + type: integer + optionalHeaders: + type: object + properties: + User-Agent: + type: string + createdAt: + type: string + format: date-time + lastModifiedAt: + type: string + format: date-time example: webhookId: 3a1261b8-bbbc-48a2-9edc-590a5d6de2dc name: Global status watcher - url: https://webhook.site/3b97f2c8-4570-4666-9f10-e4a0f6ab20c6 + url: 'https://webhook.site/3b97f2c8-4570-4666-9f10-e4a0f6ab20c6' enabled: false messageFormat: 0 webhookTriggers: @@ -2038,33 +2240,128 @@ paths: - 5 optionalHeaders: User-Agent: Mcss Api - createdAt: "2024-08-19T17:51:52.0500375Z" - lastModifiedAt: "2024-08-19T17:51:52.0500386Z" - "401": - description: Unauthorized - content: - text/plain: + createdAt: '2024-08-19T17:51:52.0500375Z' + lastModifiedAt: '2024-08-19T17:51:52.0500386Z' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Webhooks + description: |- + Return a specific webhook. + (API Key must have admin rights) + put: + summary: Edit webhook + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: + schema: + type: string + example: 'Tue, 31 Jan 2023 18:54:01 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: schema: type: string - example: null - "404": - description: Unknown User + example: Accept-Encoding content: - text/plain: + application/json: + schema: + type: object + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + headers: + Server: schema: type: string - example: null - put: + example: GenHTTP/6.4.0.0 + Date: + schema: + type: string + example: 'Wed, 01 Feb 2023 08:13:47 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Length: + schema: + type: integer + example: '0' + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' tags: - Webhooks - summary: Edit webhook description: |- Update a specific webhook. (API Key must have admin rights) @@ -2098,95 +2395,107 @@ paths: application/json: schema: type: object - example: - isEnabled: false + properties: + isEnabled: + type: boolean + example: + isEnabled: false + delete: + summary: Delete webhook responses: - "200": - description: OK - content: - application/json: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Webhooks + description: |- + Delete a specific webhook. + (API Key must have admin rights) + /api/v2/users: + get: + summary: Get list of users + responses: + '200': + description: '200' + headers: + Server: schema: - type: object - example: {} - "400": - description: Invalid User - content: - text/plain: + type: string + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: 'Tue, 31 Jan 2023 17:23:12 GMT' + Connection: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: Keep-Alive + Content-Encoding: schema: type: string - example: null - "404": - description: Unknown User - content: - text/plain: + example: br + Transfer-Encoding: schema: type: string - example: null - delete: - tags: - - Webhooks - summary: Delete webhook - description: |- - Delete a specific webhook. - (API Key must have admin rights) - responses: - "200": - description: Deleted - content: - text/plain: + example: chunked + Access-Control-Allow-Origin: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: '*' + Access-Control-Allow-Methods: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: '*' + Access-Control-Allow-Headers: schema: type: string - example: null - "404": - description: Unknown User - content: - text/plain: + example: '*, Authorization' + Access-Control-Expose-Headers: schema: type: string - example: null - /api/v2/users: - get: - tags: - - Users - summary: Get list of users - description: |- - Return all users from a specific server. - (API Key must have admin rights) - responses: - "200": - description: OK + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: - type: object + type: array + items: + type: object + properties: + userId: + type: string + username: + type: string + enabled: + type: boolean + isAdmin: + type: boolean + hasAccessToAllServers: + type: boolean + customServerPermissions: + type: object + createdAt: + type: string + format: date-time + lastModifiedAt: + type: string + format: date-time example: - userId: 7f8f6b1b-4c8a-4de8-a481-0833908d1c20 username: admin @@ -2194,8 +2503,8 @@ paths: isAdmin: true hasAccessToAllServers: true customServerPermissions: {} - createdAt: "2022-07-04T18:18:22.9365915Z" - lastModifiedAt: "2022-12-19T20:50:55.53183Z" + createdAt: '2022-07-04T18:18:22.9365915Z' + lastModifiedAt: '2022-12-19T20:50:55.53183Z' - userId: fba6ab9d-9c19-4d0c-8d0d-3d27adc832e1 username: tt enabled: true @@ -2266,149 +2575,269 @@ paths: editSchedulerTask: false deleteSchedulerTasks: false triggerSchedulerTask: false - createdAt: "2023-01-05T20:47:51.83954Z" - lastModifiedAt: "2023-01-05T20:48:10.4188293Z" - "401": - description: Unauthorized - content: - text/plain: + createdAt: '2023-01-05T20:47:51.83954Z' + lastModifiedAt: '2023-01-05T20:48:10.4188293Z' + '401': + description: '401' + '403': + description: '403' + tags: + - Users + description: |- + Return all users from a specific server. + (API Key must have admin rights) + post: + summary: Create User + responses: + '201': + description: '201' + headers: + Server: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - post: + example: 'Tue, 31 Jan 2023 18:54:01 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding + content: + application/json: + schema: + type: object + properties: + userId: + type: string + username: + type: string + createdAt: + type: string + format: date-time + example: + userId: b04431ae-692e-496e-8228-d1e912843c7e + username: testMadeWithApi + createdAt: '2023-01-31T18:54:01.4134208Z' + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' tags: - Users - summary: Create User - description: >- - Create a new user. - - (API Key must have admin rights) - - - **user (required)** - - \- username (required) : string - - \- password (required) : string - - \- passwordRepeat (required) : string - - \- enabled (optional) : boolean - - \- isAdmin (optional) : boolean - - \- hasAccessToAllServers (optional): boolean - - \- customServerPermissions (optional) : object\[\] - - - ### CustomServerPermissions Object - - - serverId (required) : string { - - viewStats (required) : boolean, - - viewConsole (required) : boolean, - - useConsole (required) : boolean, - - useServerActions (required) : boolean, - - editServer(required) : boolean, - - viewBackups(required) : boolean, - - createBackup(required) : boolean, - - editBackup(required) : boolean, - - deleteBackups(required) : boolean, - - triggerBackup(required) : boolean, - - viewSchedulerTasks:(required) : boolean, - createSchedulerTasks(required) : boolean, - editSchedulerTask(required) : boolean, - deleteSchedulerTasks(required) : boolean, - triggerSchedulerTask(required) : boolean - - } - - - **example** - - - _"3054aac3-dbf5-4e10-94d2-f4b83577d9b4": {__**"viewStats": - true,**__"viewConsole": true,__**"useConsole": - true,**__"useServerActions": true__}_ + description: "Create a new user. \n(API Key must have admin rights)\n\n**user (required)** \n\\- username (required) : string \n\\- password (required) : string \n\\- passwordRepeat (required) : string \n\\- enabled (optional) : boolean \n\\- isAdmin (optional) : boolean \n\\- hasAccessToAllServers (optional): boolean \n\\- customServerPermissions (optional) : object\\[\\]\n\n### CustomServerPermissions Object\n\nserverId (required) : string { \nviewStats (required) : boolean, \nviewConsole (required) : boolean, \nuseConsole (required) : boolean, \nuseServerActions (required) : boolean, \neditServer(required) : boolean, \nviewBackups(required) : boolean, \ncreateBackup(required) : boolean, \neditBackup(required) : boolean, \ndeleteBackups(required) : boolean, \ntriggerBackup(required) : boolean, \nviewSchedulerTasks:(required) : boolean,\_ \_ \_ \_ createSchedulerTasks(required) : boolean,\_ \_ \_ \_ editSchedulerTask(required) : boolean,\_ \_ \_ \_ deleteSchedulerTasks(required) : boolean,\_ \_ \_ \_ triggerSchedulerTask(required) : boolean \n}\n\n**example**\n\n_\"3054aac3-dbf5-4e10-94d2-f4b83577d9b4\": {__**\"viewStats\": true,**__\"viewConsole\": true,__**\"useConsole\": true,**__\"useServerActions\": true__}_" requestBody: content: application/json: schema: type: object - example: - username: testMadeWithApi - password: plaintext - passwordRepeat: plaintext - enabled: true - isAdmin: false - hasAccessToAllServers: true - customServerPermissions: null + properties: + username: + type: string + password: + type: string + passwordRepeat: + type: string + enabled: + type: boolean + isAdmin: + type: boolean + hasAccessToAllServers: + type: boolean + customServerPermissions: + nullable: true + example: + username: testMadeWithApi + password: plaintext + passwordRepeat: plaintext + enabled: true + isAdmin: false + hasAccessToAllServers: true + customServerPermissions: null + /api/v2/users/5b488091-625e-4403-8cec-94db3b3cc141: + get: + summary: Get user details responses: - "201": - description: Created - content: - application/json: + '200': + description: '200' + headers: + Server: schema: - type: object - example: - userId: b04431ae-692e-496e-8228-d1e912843c7e - username: testMadeWithApi - createdAt: "2023-01-31T18:54:01.4134208Z" - "400": - description: Invalid User - content: - text/plain: + type: string + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: 'Tue, 31 Jan 2023 17:23:38 GMT' + Connection: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: Keep-Alive + Content-Encoding: schema: type: string - example: null - /api/v2/users/5b488091-625e-4403-8cec-94db3b3cc141: - get: - tags: - - Users - summary: Get user details - description: |- - Return a specific user. - (API Key must have admin rights) - responses: - "200": - description: OK + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: type: object + properties: + userId: + type: string + username: + type: string + enabled: + type: boolean + isAdmin: + type: boolean + hasAccessToAllServers: + type: boolean + customServerPermissions: + type: object + properties: + 3054aac3-dbf5-4e10-94d2-f4b83577d9b4: + type: object + properties: + viewStats: + type: boolean + viewConsole: + type: boolean + useConsole: + type: boolean + useServerActions: + type: boolean + editServer: + type: boolean + viewBackups: + type: boolean + createBackup: + type: boolean + editBackup: + type: boolean + deleteBackups: + type: boolean + triggerBackup: + type: boolean + viewSchedulerTasks: + type: boolean + createSchedulerTasks: + type: boolean + editSchedulerTask: + type: boolean + deleteSchedulerTasks: + type: boolean + triggerSchedulerTask: + type: boolean + dc14869d-8494-4b10-96e0-df3264198999: + type: object + properties: + viewStats: + type: boolean + viewConsole: + type: boolean + useConsole: + type: boolean + useServerActions: + type: boolean + editServer: + type: boolean + viewBackups: + type: boolean + createBackup: + type: boolean + editBackup: + type: boolean + deleteBackups: + type: boolean + triggerBackup: + type: boolean + viewSchedulerTasks: + type: boolean + createSchedulerTasks: + type: boolean + editSchedulerTask: + type: boolean + deleteSchedulerTasks: + type: boolean + triggerSchedulerTask: + type: boolean + createdAt: + type: string + format: date-time + lastModifiedAt: + type: string + format: date-time example: userId: 5b488091-625e-4403-8cec-94db3b3cc141 username: test @@ -2448,244 +2877,270 @@ paths: editSchedulerTask: false deleteSchedulerTasks: false triggerSchedulerTask: false - createdAt: "2022-08-01T13:07:13.0167083Z" - lastModifiedAt: "2023-01-26T13:01:33.6984964Z" - "401": - description: Unauthorized - content: - text/plain: + createdAt: '2022-08-01T13:07:13.0167083Z' + lastModifiedAt: '2023-01-26T13:01:33.6984964Z' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - Users + description: |- + Return a specific user. + (API Key must have admin rights) + /api/v2/users/b04431ae-692e-496e-8228-d1e912843c7e: + put: + summary: Edit user + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "404": - description: Unknown User - content: - text/plain: + example: 'Tue, 31 Jan 2023 18:54:01 GMT' + Connection: schema: type: string - example: null - /api/v2/users/b04431ae-692e-496e-8228-d1e912843c7e: - put: - tags: - - Users - summary: Edit user - description: >- - Update a specific user. - - (API Key must have admin rights) - - - **user (required)** - - \- password (optional) : string - - \- passwordRepeat (optional) : string - - \- enabled (optional) : boolean - - \- isAdmin (optional) : boolean - - \- hasAccessToAllServers (optional): boolean - - \- customServerPermissions (optional) : object\[\] - - - ### CustomServerPermissions Object - - - serverId (required) : string { - - viewStats (required) : boolean, - - viewConsole (required) : boolean, - - useConsole (required) : boolean, - - useServerActions (required) : boolean, - - editServer(required) : boolean, - - viewBackups(required) : boolean, - - createBackup(required) : boolean, - - editBackup(required) : boolean, - - deleteBackups(required) : boolean, - - triggerBackup(required) : boolean, - - viewSchedulerTasks:(required) : boolean, - createSchedulerTasks(required) : boolean, - editSchedulerTask(required) : boolean, - deleteSchedulerTasks(required) : boolean, - triggerSchedulerTask(required) : boolean - - } - - - **example** - - - _"3054aac3-dbf5-4e10-94d2-f4b83577d9b4": {__**"viewStats": - true,**__"viewConsole": true,__**"useConsole": - true,**__"useServerActions": true__}_ - requestBody: - content: - application/json: - schema: - type: object - example: - password: aOfnfydBSBR8%ZgIfy%he$pvm - passwordRepeat: aOfnfydBSBR8%ZgIfy%he$pvm - hasAccessToAllServers: true - customServerPermissions: null - responses: - "200": - description: OK + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: type: object - example: {} - "400": - description: Invalid User - content: - text/plain: + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + headers: + Server: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: 'Wed, 01 Feb 2023 08:13:47 GMT' + Connection: schema: type: string - example: null - "404": - description: Unknown User - content: - text/plain: + example: Keep-Alive + Content-Length: + schema: + type: integer + example: '0' + Access-Control-Allow-Origin: schema: type: string - example: null + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + tags: + - Users + description: "Update a specific user. \n(API Key must have admin rights)\n\n**user (required)** \n\\- password (optional) : string \n\\- passwordRepeat (optional) : string \n\\- enabled (optional) : boolean \n\\- isAdmin (optional) : boolean \n\\- hasAccessToAllServers (optional): boolean \n\\- customServerPermissions (optional) : object\\[\\]\n\n### CustomServerPermissions Object\n\nserverId (required) : string { \nviewStats (required) : boolean, \nviewConsole (required) : boolean, \nuseConsole (required) : boolean, \nuseServerActions (required) : boolean, \neditServer(required) : boolean, \nviewBackups(required) : boolean, \ncreateBackup(required) : boolean, \neditBackup(required) : boolean, \ndeleteBackups(required) : boolean, \ntriggerBackup(required) : boolean, \nviewSchedulerTasks:(required) : boolean,\_ \_ \_ \_ createSchedulerTasks(required) : boolean,\_ \_ \_ \_ editSchedulerTask(required) : boolean,\_ \_ \_ \_ deleteSchedulerTasks(required) : boolean,\_ \_ \_ \_ triggerSchedulerTask(required) : boolean \n}\n\n**example**\n\n_\"3054aac3-dbf5-4e10-94d2-f4b83577d9b4\": {__**\"viewStats\": true,**__\"viewConsole\": true,__**\"useConsole\": true,**__\"useServerActions\": true__}_" + requestBody: + content: + application/json: + schema: + type: object + properties: + password: + type: string + passwordRepeat: + type: string + hasAccessToAllServers: + type: boolean + customServerPermissions: + nullable: true + example: + password: aOfnfydBSBR8%ZgIfy%he$pvm + passwordRepeat: aOfnfydBSBR8%ZgIfy%he$pvm + hasAccessToAllServers: true + customServerPermissions: null delete: + summary: Delete user + responses: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' tags: - Users - summary: Delete user description: |- Delete a specific server user, any active sessions are also removed. (API Key must have admin rights) + /api/v2/users/wipe/sessions: + post: + summary: Wipe all sessions responses: - "200": - description: Deleted - content: - text/plain: + '200': + description: '200' + '401': + description: '401' + '403': + description: '403' + '500': + description: '500' + tags: + - Users + description: |- + Wipes any panel sessions, meaning all users need to relogin. + (API Key must have admin rights) + /api/v2/keys: + get: + summary: Get list of ApiKeys + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: 'Fri, 19 Jan 2024 20:14:12 GMT' + Connection: schema: type: string - example: null - "404": - description: Unknown User - content: - text/plain: + example: Keep-Alive + Content-Encoding: schema: type: string - example: null - /api/v2/users/wipe/sessions: - post: - tags: - - Users - summary: Wipe all sessions - description: |- - Wipes any panel sessions, meaning all users need to relogin. - (API Key must have admin rights) - requestBody: - content: {} - responses: - "200": - description: OK - content: - text/plain: + example: br + Transfer-Encoding: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: chunked + Access-Control-Allow-Origin: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: '*' + Access-Control-Allow-Methods: schema: type: string - example: null - "500": - description: Failed to wipe sessions - content: - text/plain: + example: '*' + Access-Control-Allow-Headers: schema: type: string - example: null - /api/v2/keys: - get: - tags: - - ApiKeys - summary: Get list of ApiKeys - description: |- - Return info about all keys. - (API Key must have admin rights) - responses: - "200": - description: OK + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: - type: object + type: array + items: + type: object + properties: + apiKeyId: + type: string + name: + type: string + isAdmin: + type: boolean + hasAccessToAllServers: + type: boolean + customServerPermissions: + type: object + createdAt: + type: string + format: date-time example: - apiKeyId: 02ba473b-bfe1-4a39-9a96-ddb2ca094ecb name: my test key isAdmin: false hasAccessToAllServers: true customServerPermissions: {} - createdAt: "2022-07-04T18:20:19.9167696Z" + createdAt: '2022-07-04T18:20:19.9167696Z' - apiKeyId: 49496a8b-99cf-4574-a3de-cafd8e7613b9 name: postman isAdmin: true hasAccessToAllServers: true customServerPermissions: {} - createdAt: "2022-07-04T19:27:01.8222366Z" + createdAt: '2022-07-04T19:27:01.8222366Z' - apiKeyId: bf09f7e3-8051-42c7-9ead-f8527c58b042 name: postman custom server access isAdmin: false @@ -2739,31 +3194,104 @@ paths: editSchedulerTask: true deleteSchedulerTasks: true triggerSchedulerTask: true - createdAt: "2022-10-08T18:17:55.4446751Z" + createdAt: '2022-10-08T18:17:55.4446751Z' - apiKeyId: 60769c98-6a4c-4635-a7fd-571b9f14cb9f - name: "20" + name: '20' isAdmin: true hasAccessToAllServers: true customServerPermissions: {} - createdAt: "2024-01-16T22:43:24.5413127Z" - "401": - description: Unauthorized - content: - text/plain: + createdAt: '2024-01-16T22:43:24.5413127Z' + '401': + description: '401' + '403': + description: '403' + tags: + - ApiKeys + description: |- + Return info about all keys. + (API Key must have admin rights) + post: + summary: Create ApiKey + responses: + '201': + description: '201' + headers: + Server: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - post: + example: 'Fri, 19 Jan 2024 20:18:21 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding + content: + application/json: + schema: + type: object + properties: + apiKeyId: + type: string + name: + type: string + apiKey: + type: string + createdAt: + type: string + format: date-time + example: + apiKeyId: 357e4fe2-bf15-4d7b-9418-9133e2810e79 + name: test with postman 0001 + apiKey: >- + lHFzONXeOL5GTIKnIWJp4V9Em22Cxk0.1ZD6v5McXh185sYUT72BiPLwdWrbbFJYRCOpySc5Oj4mj2lqbjE39KPlj3iTtmh0kJTqPCZTt5y7ZMj-RXGrG4n2 + createdAt: '2024-01-19T20:18:21.6498381Z' + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' tags: - ApiKeys - summary: Create ApiKey description: >- Create a new key. @@ -2823,149 +3351,305 @@ paths: application/json: schema: type: object - example: - name: test with postman 0001 - isAdmin: false - hasAccessToAllServers: false - customServerPermissions: null + properties: + name: + type: string + isAdmin: + type: boolean + hasAccessToAllServers: + type: boolean + customServerPermissions: + nullable: true + example: + name: test with postman 0001 + isAdmin: false + hasAccessToAllServers: false + customServerPermissions: null + /api/v2/keys/209ef323-51ec-45c8-9526-238720293426/rotate: + post: + summary: Rotate ApiKey responses: - "201": - description: Created + '200': + description: '200' + headers: + Server: + schema: + type: string + example: GenHTTP/6.4.0.0 + Date: + schema: + type: string + example: 'Thu, 12 Jun 2025 19:56:50 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Encoding: + schema: + type: string + example: br + Transfer-Encoding: + schema: + type: string + example: chunked + Access-Control-Allow-Origin: + schema: + type: string + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + Vary: + schema: + type: string + example: Accept-Encoding content: application/json: schema: type: object + properties: + apiKey: + type: string example: - apiKeyId: 357e4fe2-bf15-4d7b-9418-9133e2810e79 - name: test with postman 0001 apiKey: >- - lHFzONXeOL5GTIKnIWJp4V9Em22Cxk0.1ZD6v5McXh185sYUT72BiPLwdWrbbFJYRCOpySc5Oj4mj2lqbjE39KPlj3iTtmh0kJTqPCZTt5y7ZMj-RXGrG4n2 - createdAt: "2024-01-19T20:18:21.6498381Z" - "400": - description: Invalid API Key - content: - text/plain: + qHP59M9oHUJlaWOYIihJsP2LPQNmw5dsZSFABCeY3P0Aoe4VR8CUjJ1jcvoOBXvHxYl.yQWmSLk0EpJ7171pkVP5JxR.cKlB0fzbRiXvrbYSz8EpuVXL1Y-4 + '400': + description: '400' + '401': + description: '401' + '403': + description: '403' + tags: + - ApiKeys + description: >- + Create a new key. + + (API Key must have admin rights) + + + \- name (required) : string + + \- isAdmin (optional) : boolean + + \- hasAccessToAllServers (optional): boolean + + \- customServerPermissions (optional) : object\[\] + + + ### CustomServerPermissions Object + + + serverId (required) : string { + + viewStats (required) : boolean, + + viewConsole (required) : boolean, + + useConsole (required) : boolean, + + useServerActions (required) : boolean, + + editServer(required) : boolean, + + viewBackups(required) : boolean, + + createBackup(required) : boolean, + + editBackup(required) : boolean, + + deleteBackups(required) : boolean, + + triggerBackup(required) : boolean, + + viewSchedulerTasks:(required) : boolean, createSchedulerTasks(required) + : boolean, editSchedulerTask(required) : boolean, + deleteSchedulerTasks(required) : boolean, triggerSchedulerTask(required) + : boolean + + } + + + **example** + + + _"3054aac3-dbf5-4e10-94d2-f4b83577d9b4": {__**"viewStats": + true,**__"viewConsole": true,__**"useConsole": + true,**__"useServerActions": true__}_ + /api/v2/keys/357e4fe2-bf15-4d7b-9418-9133e2810e79: + delete: + summary: Delete ApiKey + responses: + '200': + description: '200' + headers: + Server: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: 'Fri, 19 Jan 2024 20:41:28 GMT' + Connection: schema: type: string - example: null - /api/v2/keys/357e4fe2-bf15-4d7b-9418-9133e2810e79: - delete: - tags: - - ApiKeys - summary: Delete ApiKey - description: |- - Delete a specific key. - (API Key must have admin rights) - responses: - "200": - description: Deleted - content: - text/plain: + example: Keep-Alive + Content-Length: + schema: + type: integer + example: '0' + Access-Control-Allow-Origin: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: '*' + Access-Control-Allow-Methods: schema: type: string - example: null - "403": - description: Forbidden - content: - text/plain: + example: '*' + Access-Control-Allow-Headers: schema: type: string - example: null - "404": - description: Unknown API Key - content: - text/plain: + example: '*, Authorization' + Access-Control-Expose-Headers: schema: type: string - example: null + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + '401': + description: '401' + '403': + description: '403' + '404': + description: '404' + tags: + - ApiKeys + description: |- + Delete a specific key. + (API Key must have admin rights) /api/v2/mcss/settings/All: get: - tags: - - Mcss summary: Get settings - description: |- - Get mcss settings. - - URL parameters: - \- All - \- Backups responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object + properties: + deleteOldBackupsThreshold: + type: integer + previousBackupLocation: + type: string + format: uri example: deleteOldBackupsThreshold: 7 - previousBackupLocation: P:\path\to\backups\name - "400": - description: Invalid Section + previousBackupLocation: 'P:\path\to\backups\name' + '400': + description: '400' content: application/json: schema: type: object - example: {} - "401": - description: Unauthorized - content: - text/plain: - schema: - type: string - example: null - /api/v2/mcss/settings: - patch: + '401': + description: '401' tags: - Mcss + description: |- + Get mcss settings. + + URL parameters: + \- All + \- Backups + /api/v2/mcss/settings: + patch: summary: Update settings - description: Update mcss settings. - requestBody: - content: - application/json: - schema: - type: object - example: - deleteOldBackupsThreshold: 11 responses: - "200": - description: OK + '200': + description: '200' content: application/json: schema: type: object - example: {} - "204": - description: Nothing Changed - content: - text/plain: + '204': + description: '204' + headers: + Server: schema: type: string - example: null - "401": - description: Unauthorized - content: - text/plain: + example: GenHTTP/6.4.0.0 + Date: + schema: + type: string + example: 'Sun, 12 Nov 2023 15:45:56 GMT' + Connection: + schema: + type: string + example: Keep-Alive + Content-Length: + schema: + type: integer + example: '0' + Access-Control-Allow-Origin: schema: type: string - example: null + example: '*' + Access-Control-Allow-Methods: + schema: + type: string + example: '*' + Access-Control-Allow-Headers: + schema: + type: string + example: '*, Authorization' + Access-Control-Expose-Headers: + schema: + type: string + example: '*' + Access-Control-Allow-Credentials: + schema: + type: boolean + example: 'true' + Access-Control-Max-Age: + schema: + type: integer + example: '86400' + '401': + description: '401' + tags: + - Mcss + description: Update mcss settings. + requestBody: + content: + application/json: + schema: + type: object + properties: + deleteOldBackupsThreshold: + type: integer + example: + deleteOldBackupsThreshold: 11