{
  "openapi": "3.0.0",
  "info": {
    "title": "codecapsules-sandbox-api",
    "version": "1.0.0",
    "description": "Public REST API for Code Capsules ephemeral sandbox SDKs",
    "contact": {
      "name": "Code Capsules",
      "email": "support@codecapsules.io"
    }
  },
  "paths": {
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": [
          "PingController"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping"
      }
    },
    "/v1/sandboxes/{id}/shutdown": {
      "post": {
        "x-controller-name": "PostSandboxShutdownController",
        "x-operation-name": "shutdown",
        "tags": [
          "PostSandboxShutdownController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PostSandboxShutdownController.shutdown"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxShutdownRequestDto"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PostSandboxShutdownController.shutdown"
      }
    },
    "/v1/sandboxes/{id}": {
      "get": {
        "x-controller-name": "GetSandboxController",
        "x-operation-name": "get",
        "tags": [
          "GetSandboxController"
        ],
        "responses": {
          "200": {
            "description": "Return value of GetSandboxController.get"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "GetSandboxController.get"
      },
      "delete": {
        "x-controller-name": "DeleteSandboxController",
        "x-operation-name": "delete",
        "tags": [
          "DeleteSandboxController"
        ],
        "responses": {
          "204": {
            "description": "Sandbox deleted"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DeleteSandboxController.delete"
      }
    },
    "/v1/sandboxes": {
      "post": {
        "x-controller-name": "PostSandboxController",
        "x-operation-name": "create",
        "tags": [
          "PostSandboxController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PostSandboxController.create"
          }
        },
        "parameters": [
          {
            "name": "X-Cluster-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxCreateRequestDto"
              }
            }
          }
        },
        "operationId": "PostSandboxController.create"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "SandboxCreateRequestDto": {
        "title": "SandboxCreateRequestDto",
        "type": "object",
        "properties": {
          "flavor": {
            "type": "string"
          },
          "memory_mb": {
            "type": "number"
          },
          "vcpu": {
            "type": "number"
          },
          "ttl_minutes": {
            "type": "number"
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "flavor",
          "memory_mb",
          "vcpu",
          "ttl_minutes"
        ],
        "additionalProperties": true
      },
      "SandboxShutdownRequestDto": {
        "title": "SandboxShutdownRequestDto",
        "type": "object",
        "properties": {
          "graceful": {
            "type": "boolean"
          }
        },
        "required": [
          "graceful"
        ],
        "additionalProperties": true
      },
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://sandbox-api-lzrp.aws-eu-1.ccdns.co"
    }
  ]
}