{
  "openapi": "3.1.0",
  "info": {
    "title": "Monkey Network Client API",
    "version": "1.0.0",
    "description": "Subset of the Pterodactyl-based client API used to manage Discord bot hosting servers on Monkey Network. Authenticate with a personal API key as a Bearer token.",
    "contact": { "name": "Monkey Network", "url": "https://monkey-network.xyz" }
  },
  "servers": [
    { "url": "https://dash.monkey-network.xyz/api/client", "description": "Client API" }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Personal API key created in the dashboard (Account Settings > API Credentials)."
      }
    }
  },
  "security": [ { "bearerAuth": [] } ],
  "paths": {
    "/": {
      "get": {
        "operationId": "listServers",
        "summary": "List servers the authenticated user can access",
        "responses": {
          "200": { "description": "A paginated list of servers." },
          "401": { "description": "Missing or invalid API key." }
        }
      }
    },
    "/servers/{server}": {
      "get": {
        "operationId": "getServer",
        "summary": "Get details for a single server",
        "parameters": [
          { "name": "server", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Short server identifier." }
        ],
        "responses": {
          "200": { "description": "Server details." },
          "404": { "description": "Server not found or not accessible." }
        }
      }
    },
    "/servers/{server}/resources": {
      "get": {
        "operationId": "getServerResources",
        "summary": "Current resource utilization and power state",
        "parameters": [
          { "name": "server", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Live CPU/memory/disk usage and state." } }
      }
    }
  }
}
