{
  "openapi": "3.1.0",
  "info": {
    "title": "Gehirn RS2 Plus",
    "version": "1"
  },
  "components": {
    "schemas": {
      "HostServer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ipv4_address": {
            "type": "string",
            "format": "ipv4"
          },
          "hostname": {
            "type": "string",
            "format": "hostname"
          }
        },
        "required": [
          "id",
          "ipv4_address",
          "hostname"
        ]
      },
      "Plan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "cpu_count": {
            "type": "integer"
          },
          "disk_size_in_gb": {
            "type": "integer"
          },
          "memory_in_bytes": {
            "type": "integer"
          },
          "max_snapshot_count": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "cpu_count",
          "disk_size_in_gb",
          "memory_in_bytes",
          "max_snapshot_count"
        ]
      },
      "Container": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "label": {
            "type": "string"
          },
          "hostname": {
            "type": "string",
            "format": "hostname",
            "readOnly": true
          },
          "hostserver": {
            "$ref": "#/components/schemas/HostServer",
            "readOnly": true
          },
          "plan": {
            "$ref": "#/components/schemas/Plan",
            "readOnly": true
          },
          "ssh_port": {
            "type": "integer",
            "minimum": 22000,
            "maximum": 65535,
            "readOnly": true
          },
          "mac_address": {
            "type": "string",
            "readOnly": true
          },
          "ipv4_address": {
            "type": "string",
            "format": "ipv4",
            "readOnly": true
          },
          "snapshot_interval_in_minute": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "label",
          "hostname",
          "hostserver",
          "plan",
          "ssh_port",
          "mac_address",
          "ipv4_address",
          "snapshot_interval_in_minute",
          "created_at"
        ]
      },
      "Database": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "name",
          "created_at"
        ]
      },
      "CreateDatabaseRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "UnixAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "password_authentication": {
            "type": "boolean"
          },
          "totp_authentication": {
            "type": "boolean"
          },
          "deletable": {
            "type": "boolean",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "name",
          "password_authentication",
          "totp_authentication",
          "deletable",
          "created_at"
        ]
      },
      "CreateUnixAccountRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "password_authentication": {
            "type": "boolean"
          },
          "password": {
            "type": "string"
          },
          "totp_authentication": {
            "type": "boolean"
          },
          "totp_secret": {
            "type": "string"
          },
          "totp_code": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "password_authentication",
          "totp_authentication"
        ]
      },
      "UpdateUnixAccountRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "password_authentication": {
            "type": "boolean"
          },
          "password": {
            "type": "string"
          },
          "totp_authentication": {
            "type": "boolean"
          },
          "totp_secret": {
            "type": "string"
          },
          "totp_code": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "password_authentication",
          "totp_authentication"
        ]
      },
      "SSHPublicKey": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "comment": {
            "type": "string",
            "readOnly": true
          },
          "fingerprint": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "content"
        ]
      },
      "ListSSHKeysResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/SSHPublicKey"
        }
      },
      "UpdateSSHKeysRequest": {
        "type": "object",
        "properties": {
          "public_keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SSHPublicKey"
            }
          }
        },
        "required": [
          "public_keys"
        ]
      },
      "UpdateSSHKeysResponse": {
        "type": "object",
        "properties": {
          "public_keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SSHPublicKey"
            }
          }
        },
        "required": [
          "public_keys"
        ]
      },
      "Process": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "command": {
            "type": "string"
          },
          "unixaccount_id": {
            "type": "string"
          },
          "auto_start": {
            "type": "boolean"
          },
          "auto_restart": {
            "type": "boolean"
          },
          "stop_signal": {
            "enum": [
              "TERM",
              "HUP",
              "INT",
              "QUIT",
              "KILL",
              "USR1",
              "USR2"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "name",
          "command",
          "unixaccount_id",
          "auto_start",
          "auto_restart",
          "stop_signal",
          "created_at"
        ]
      },
      "CreateProcessRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "command": {
            "type": "string"
          },
          "unixaccount_id": {
            "type": "string"
          },
          "auto_start": {
            "type": "boolean"
          },
          "auto_restart": {
            "type": "boolean"
          },
          "stop_signal": {
            "enum": [
              "TERM",
              "HUP",
              "INT",
              "QUIT",
              "KILL",
              "USR1",
              "USR2"
            ]
          }
        },
        "required": [
          "name",
          "command",
          "unixaccount_id",
          "auto_start",
          "auto_restart",
          "stop_signal"
        ]
      },
      "ProcessState": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "readOnly": true
          },
          "pid": {
            "type": "integer",
            "readOnly": true
          },
          "state": {
            "enum": [
              "STOPPED",
              "STARTING",
              "RUNNING",
              "BACKOFF",
              "STOPPING",
              "EXITED",
              "FATAL",
              "UNKNOWN"
            ]
          },
          "uptime": {
            "type": "number",
            "readOnly": true
          }
        },
        "required": [
          "name",
          "pid",
          "state",
          "uptime"
        ]
      },
      "UpdateProcessStateRequest": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          },
          "restarted": {
            "type": "boolean"
          }
        },
        "required": [
          "state",
          "restarted"
        ]
      },
      "Site": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "hostname": {
            "type": "string",
            "format": "hostname"
          },
          "document_root": {
            "type": "string"
          },
          "log_level": {
            "$ref": "#/components/schemas/SiteLogLevel"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "tls": {
            "$ref": "#/components/schemas/SiteTLS"
          },
          "backend": {
            "$ref": "#/components/schemas/SiteBackend"
          },
          "backend_nginx": {
            "$ref": "#/components/schemas/SiteBackendNGINX"
          },
          "backend_tcp": {
            "$ref": "#/components/schemas/SiteBackendTCP"
          },
          "backend_redirect": {
            "$ref": "#/components/schemas/SiteBackendRedirect"
          },
          "enabled": {
            "type": "boolean",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "hostname",
          "document_root",
          "log_level",
          "headers",
          "backend",
          "enabled",
          "created_at"
        ]
      },
      "SiteLogLevel": {
        "enum": [
          "disabled",
          "debug",
          "notice",
          "info",
          "warn",
          "error",
          "crit",
          "alert",
          "emerg"
        ]
      },
      "SiteTLS": {
        "type": "object",
        "properties": {
          "cert": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "intermediates": {
            "type": "string",
            "deprecated": true
          },
          "root": {
            "type": "string",
            "deprecated": true
          }
        },
        "required": [
          "cert",
          "key"
        ]
      },
      "SiteBackend": {
        "enum": [
          "nginx",
          "apache",
          "tcp",
          "redirect"
        ]
      },
      "SiteBackendNGINX": {
        "type": "object",
        "properties": {
          "advanced": {
            "type": "boolean",
            "default": false
          },
          "advanced_config": {
            "type": "string"
          }
        },
        "required": [
          "advanced"
        ]
      },
      "SiteBackendTCP": {
        "type": "object",
        "properties": {
          "port": {
            "type": "integer",
            "minimum": 1024,
            "maximum": 65535
          },
          "protocol": {
            "enum": [
              "http",
              "wsgi",
              "fastcgi"
            ]
          }
        },
        "required": [
          "port",
          "protocol"
        ]
      },
      "SiteBackendRedirect": {
        "type": "object",
        "properties": {
          "redirect_to": {
            "type": "string",
            "format": "uri"
          },
          "http_code": {
            "enum": [
              301,
              302,
              307,
              308
            ]
          },
          "path_mode": {
            "$ref": "#/components/schemas/SiteBackendRedirectMode"
          },
          "query_mode": {
            "$ref": "#/components/schemas/SiteBackendRedirectMode"
          }
        },
        "required": [
          "redirect_to",
          "http_code",
          "path_mode",
          "query_mode"
        ]
      },
      "SiteBackendRedirectMode": {
        "enum": [
          "MODE_STRIP",
          "MODE_APPEND"
        ]
      },
      "CreateSiteRequest": {
        "type": "object",
        "properties": {
          "hostname": {
            "type": "string",
            "format": "hostname"
          },
          "document_root": {
            "type": "string"
          },
          "log_level": {
            "$ref": "#/components/schemas/SiteLogLevel"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "tls": {
            "$ref": "#/components/schemas/SiteTLS"
          },
          "backend": {
            "$ref": "#/components/schemas/SiteBackend"
          },
          "backend_nginx": {
            "$ref": "#/components/schemas/SiteBackendNGINX"
          },
          "backend_tcp": {
            "$ref": "#/components/schemas/SiteBackendTCP"
          },
          "backend_redirect": {
            "$ref": "#/components/schemas/SiteBackendRedirect"
          }
        },
        "required": [
          "hostname",
          "document_root",
          "log_level",
          "headers",
          "backend"
        ]
      },
      "Snapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "trigger": {
            "enum": [
              "SCHEDULE",
              "MANUAL"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "trigger",
          "created_at"
        ]
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "procedure": {
            "$ref": "#/components/schemas/ProcedureName"
          },
          "state": {
            "enum": [
              1,
              2,
              3,
              4,
              5
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Container"
              },
              {
                "$ref": "#/components/schemas/InspectResponse"
              }
            ]
          }
        },
        "required": [
          "id",
          "procedure",
          "state",
          "created_at"
        ]
      },
      "ProcedureName": {
        "enum": [
          "create_container",
          "remove_container",
          "inspect",
          "create_snapshot",
          "restore_snapshot"
        ]
      },
      "CreateTaskRequest": {
        "type": "object",
        "properties": {
          "procedure": {
            "$ref": "#/components/schemas/ProcedureName"
          },
          "arguments": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string",
                "format": "uri"
              }
            },
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/CreateContainerRequest"
              }
            ]
          }
        },
        "required": [
          "procedure",
          "arguments"
        ]
      },
      "CreateContainerRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "plan_id": {
            "type": "string"
          }
        },
        "required": [
          "label",
          "plan_id"
        ]
      },
      "InspectResponse": {
        "type": "object",
        "properties": {
          "volume": {
            "type": "object",
            "properties": {
              "available_bytes": {
                "type": "integer"
              },
              "used_bytes": {
                "type": "integer"
              }
            },
            "required": [
              "available_bytes",
              "used_bytes"
            ]
          },
          "os": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "generation": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "generation"
            ]
          }
        },
        "required": [
          "volume",
          "os"
        ]
      }
    },
    "securitySchemes": {
      "static_token_basic": {
        "type": "http",
        "scheme": "basic"
      },
      "static_token_bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/rs2p/v1/containers": {
      "get": {
        "operationId": "ListContainers",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Container"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetContainer",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Container"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateContainer",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Container"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Container"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/databases": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "operationId": "CreateDatabase",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabaseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Database"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListDatabases",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Database"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/databases/{database_id}": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "database_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetDatabase",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Database"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateDatabase",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Database"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Database"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteDatabase",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Database"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/unixaccounts": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "operationId": "CreateUnixAccount",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUnixAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnixAccount"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListUnixAccounts",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnixAccount"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/unixaccounts/{unixaccount_id}": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "unixaccount_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetUnixAccount",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnixAccount"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateUnixAccount",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUnixAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnixAccount"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteUnixAccount",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnixAccount"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/unixaccounts/{unixaccount_id}/ssh_public_keys": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "unixaccount_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "ListSSHKeys",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSSHKeysResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateSSHKeys",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSSHKeysRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSSHKeysResponse"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/processes": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "operationId": "CreateProcess",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProcessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Process"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListProcesses",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Process"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/processes/{process_id}": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "process_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetProcess",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Process"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateProcess",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Process"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Process"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteProcess",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Process"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/processes/{process_id}/states": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "process_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetProcessState",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessState"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateProcessState",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProcessStateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessState"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/sites": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "operationId": "CreateSite",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSiteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "ListSites",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Site"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/sites/{site_id}": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "site_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetSite",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "UpdateSite",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Site"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteSite",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/snapshots": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "ListSnapshots",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Snapshot"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/containers/{container_id}/snapshots/{snapshot_id}": {
      "parameters": [
        {
          "name": "container_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "snapshot_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetSnapshot",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Snapshot"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/tasks": {
      "post": {
        "operationId": "CreateTask",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          }
        }
      }
    },
    "/rs2p/v1/tasks/{task_id}": {
      "parameters": [
        {
          "name": "task_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "GetTask",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "static_token_basic": []
    },
    {
      "static_token_bearer": []
    }
  ]
}