{
  "components": {
    "schemas": {
      "AIFeatures": {
        "additionalProperties": false,
        "properties": {
          "admin": {
            "type": "boolean"
          },
          "draft": {
            "type": "boolean"
          },
          "explain": {
            "type": "boolean"
          },
          "palette": {
            "type": "boolean"
          }
        },
        "required": [
          "explain",
          "draft",
          "palette",
          "admin"
        ],
        "type": "object"
      },
      "AIStatus": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "features": {
            "$ref": "#/components/schemas/AIFeatures"
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "selfTest": {
            "$ref": "#/components/schemas/SelfTestResult",
            "description": "Absent until the provider self-test has run"
          }
        },
        "required": [
          "enabled",
          "features"
        ],
        "type": "object"
      },
      "AccessLevel": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "enum": [
              "Restricted",
              "SignedIn",
              "Public"
            ],
            "type": "string"
          }
        },
        "required": [
          "value",
          "label"
        ],
        "type": "object"
      },
      "AdminAnswer": {
        "additionalProperties": false,
        "properties": {
          "answer": {
            "type": "string"
          },
          "dropped": {
            "$ref": "#/components/schemas/Dropped"
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "refs": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "retryAfter": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "answer",
          "refs",
          "dropped"
        ],
        "type": "object"
      },
      "AdminApp": {
        "additionalProperties": false,
        "properties": {
          "app": {
            "$ref": "#/components/schemas/Workspace"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastActiveAt": {
            "format": "date-time",
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/PersonRef"
          }
        },
        "required": [
          "id",
          "owner",
          "app",
          "createdAt"
        ],
        "type": "object"
      },
      "AdminAppsOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdminApp"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AdminStorageOutputBody": {
        "additionalProperties": false,
        "properties": {
          "rows": {
            "items": {
              "$ref": "#/components/schemas/Row"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "summary": {
            "description": "Where files are, in one line; says when nothing needs attention",
            "type": "string"
          }
        },
        "required": [
          "summary",
          "rows"
        ],
        "type": "object"
      },
      "Amount": {
        "additionalProperties": false,
        "properties": {
          "cpu": {
            "description": "CPU cores, e.g. 2.5 (whole thousandths)",
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "memory": {
            "description": "Memory in bytes",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "cpu",
          "memory"
        ],
        "type": "object"
      },
      "ApiAccessInputBody": {
        "additionalProperties": false,
        "properties": {
          "apiAccess": {
            "description": "None, Read (GET only) or ReadWrite. Anyone the app is shared with can make it act as you.",
            "enum": [
              "None",
              "Read",
              "ReadWrite"
            ],
            "type": "string"
          }
        },
        "required": [
          "apiAccess"
        ],
        "type": "object"
      },
      "AppLogs": {
        "additionalProperties": false,
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/LogLine"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "restarts": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "lines",
          "restarts"
        ],
        "type": "object"
      },
      "AskInputBody": {
        "additionalProperties": false,
        "properties": {
          "question": {
            "maxLength": 1000,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "question"
        ],
        "type": "object"
      },
      "BackupJobRef": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "paused": {
            "type": "boolean"
          },
          "schedule": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "owner",
          "paused"
        ],
        "type": "object"
      },
      "BackupJobs": {
        "additionalProperties": false,
        "properties": {
          "backup": {
            "$ref": "#/components/schemas/BackupJobRef"
          },
          "restore": {
            "$ref": "#/components/schemas/BackupJobRef"
          }
        },
        "type": "object"
      },
      "BackupRunProgress": {
        "additionalProperties": false,
        "properties": {
          "done": {
            "type": "boolean"
          },
          "failed": {
            "format": "int64",
            "type": "integer"
          },
          "run": {
            "type": "string"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/BackupStep"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "run",
          "steps",
          "done",
          "failed"
        ],
        "type": "object"
      },
      "BackupRunSummary": {
        "additionalProperties": false,
        "properties": {
          "database": {
            "description": "The database backup file it copied",
            "type": "string"
          },
          "finishedAt": {
            "format": "date-time",
            "type": "string"
          },
          "folders": {
            "format": "int64",
            "type": "integer"
          },
          "foldersFailed": {
            "format": "int64",
            "type": "integer"
          },
          "homes": {
            "description": "Home folders of people with an account",
            "format": "int64",
            "type": "integer"
          },
          "homesFailed": {
            "format": "int64",
            "type": "integer"
          },
          "outcome": {
            "type": "string"
          },
          "run": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BackupStatus"
          },
          "trigger": {
            "type": "string"
          },
          "volumes": {
            "description": "Home volumes with no account",
            "format": "int64",
            "type": "integer"
          },
          "volumesFailed": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "run",
          "runId",
          "trigger",
          "outcome",
          "status",
          "homes",
          "homesFailed",
          "volumes",
          "volumesFailed",
          "folders",
          "foldersFailed"
        ],
        "type": "object"
      },
      "BackupStatus": {
        "additionalProperties": false,
        "properties": {
          "problem": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          },
          "what": {
            "type": "string"
          }
        },
        "required": [
          "reason",
          "title",
          "what",
          "todo",
          "problem"
        ],
        "type": "object"
      },
      "BackupStep": {
        "additionalProperties": false,
        "properties": {
          "account": {
            "type": "boolean"
          },
          "bytes": {
            "format": "int64",
            "type": "integer"
          },
          "claim": {
            "type": "string"
          },
          "dest": {
            "description": "Where in the bucket, as s3://bucket/prefix/...",
            "type": "string"
          },
          "evidence": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "files": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "database",
              "apps",
              "home",
              "folder"
            ],
            "type": "string"
          },
          "log": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "node": {
            "type": "string"
          },
          "person": {
            "type": "string"
          },
          "state": {
            "enum": [
              "Waiting",
              "Running",
              "Done",
              "Failed"
            ],
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BackupStatus"
          },
          "took": {
            "description": "Seconds",
            "format": "double",
            "type": "number"
          },
          "uploaded": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "name",
          "state",
          "status",
          "evidence",
          "log",
          "account"
        ],
        "type": "object"
      },
      "BackupTarget": {
        "additionalProperties": false,
        "properties": {
          "bucket": {
            "type": "string"
          },
          "endpoint": {
            "description": "The bucket's host",
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "endpoint",
          "bucket",
          "prefix"
        ],
        "type": "object"
      },
      "BackupsOutputBody": {
        "additionalProperties": false,
        "properties": {
          "bucket": {
            "$ref": "#/components/schemas/BucketState"
          },
          "database": {
            "$ref": "#/components/schemas/DatabaseBackups"
          },
          "homeFolders": {
            "$ref": "#/components/schemas/BackupStatus"
          }
        },
        "required": [
          "database"
        ],
        "type": "object"
      },
      "BrandingView": {
        "additionalProperties": false,
        "properties": {
          "accent": {
            "description": "The accent colour, #rgb or #rrggbb.",
            "type": "string"
          },
          "favicon": {
            "description": "The browser tab icon's address.",
            "type": "string"
          },
          "logoDark": {
            "description": "The logo's address for the dark theme.",
            "type": "string"
          },
          "logoLight": {
            "description": "The logo's address for the light theme, and the dark one when logoDark is empty.",
            "type": "string"
          },
          "name": {
            "description": "The product name the UI shows.",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "BucketState": {
        "additionalProperties": false,
        "properties": {
          "folders": {
            "items": {
              "$ref": "#/components/schemas/HomeBackupItem"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "homes": {
            "items": {
              "$ref": "#/components/schemas/HomeBackupItem"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "jobs": {
            "$ref": "#/components/schemas/BackupJobs"
          },
          "keepDaily": {
            "format": "int64",
            "type": "integer"
          },
          "keepMonthly": {
            "format": "int64",
            "type": "integer"
          },
          "keepWeekly": {
            "format": "int64",
            "type": "integer"
          },
          "lastRestore": {
            "$ref": "#/components/schemas/BackupRunSummary"
          },
          "lastRun": {
            "$ref": "#/components/schemas/BackupRunSummary"
          },
          "runs": {
            "items": {
              "$ref": "#/components/schemas/BackupRunSummary"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/BackupStatus"
          },
          "target": {
            "$ref": "#/components/schemas/BackupTarget"
          }
        },
        "required": [
          "target",
          "jobs",
          "status",
          "runs",
          "keepDaily",
          "keepWeekly",
          "keepMonthly",
          "homes",
          "folders"
        ],
        "type": "object"
      },
      "Bundle": {
        "additionalProperties": false,
        "properties": {
          "hidden": {
            "format": "int64",
            "type": "integer"
          },
          "notes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "refs": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "text": {
            "type": "string"
          },
          "trimmed": {
            "$ref": "#/components/schemas/Trim"
          },
          "withheld": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "text",
          "refs",
          "hidden",
          "withheld",
          "notes"
        ],
        "type": "object"
      },
      "Change": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "from",
          "to"
        ],
        "type": "object"
      },
      "ClusterReport": {
        "additionalProperties": false,
        "properties": {
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ClusterRow"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "rows"
        ],
        "type": "object"
      },
      "ClusterRow": {
        "additionalProperties": false,
        "properties": {
          "objects": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "ref": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "value": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "ref",
          "title",
          "value",
          "unit",
          "objects"
        ],
        "type": "object"
      },
      "CommandInputBody": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "maxLength": 2000,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "CommandView": {
        "additionalProperties": false,
        "properties": {
          "draft": {
            "$ref": "#/components/schemas/DraftView"
          },
          "dropped": {
            "$ref": "#/components/schemas/Dropped"
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "plans": {
            "items": {
              "$ref": "#/components/schemas/Plan"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "reply": {
            "type": "string"
          },
          "retryAfter": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "reply",
          "plans",
          "dropped"
        ],
        "type": "object"
      },
      "CreateInputBody": {
        "additionalProperties": false,
        "properties": {
          "apiAccess": {
            "description": "Give the app JAVO_URL and JAVO_TOKEN so it can call this API as you: None, Read (GET only) or ReadWrite. Empty means the template's apiAccessDefault. Anyone the app is shared with can make it act as you.",
            "enum": [
              "None",
              "Read",
              "ReadWrite"
            ],
            "type": "string"
          },
          "command": {
            "description": "Command line, for templates whose userCommand is Optional or Required; split into words like a shell, with {{.Port}}, {{.BaseURL}}, {{.Home}}, {{.File}} and {{.Source}} filled in",
            "maxLength": 2048,
            "type": "string"
          },
          "displayName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "env": {
            "description": "The app's environment variables: plain values and values from your secrets (see PUT /api/workspaces/{name}/env)",
            "items": {
              "$ref": "#/components/schemas/EnvVar"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentPick",
            "description": "Run the app in this pixi environment from GET /api/environments; its newest version is copied in now"
          },
          "file": {
            "description": "Path relative to the home folder",
            "maxLength": 4096,
            "type": "string"
          },
          "idleStopMinutes": {
            "description": "Stop the app after this many minutes without use; 0 is Off. Absent means the admin's default (GET /api/idle-stop).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "image": {
            "description": "Image reference, for templates with userImage",
            "maxLength": 512,
            "type": "string"
          },
          "port": {
            "description": "Port the image serves on, for templates with userImage; 0 means the template's port",
            "format": "int32",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer"
          },
          "resources": {
            "$ref": "#/components/schemas/Amount",
            "description": "A custom amount instead of a size, for people the admin allows (GET /api/sizes custom)"
          },
          "sample": {
            "description": "Run the template's sample; file is then ignored",
            "type": "boolean"
          },
          "size": {
            "description": "One of the names from GET /api/sizes; empty means the default size",
            "maxLength": 63,
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/SourceBody",
            "description": "Run the app from a Git repository instead of the home folder; file is then relative to the repository folder"
          },
          "team": {
            "description": "Team the app belongs to; needed only when namespaces are per team and the user is in several",
            "maxLength": 63,
            "type": "string"
          },
          "template": {
            "maxLength": 253,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "template"
        ],
        "type": "object"
      },
      "CreatedToken": {
        "additionalProperties": false,
        "properties": {
          "app": {
            "description": "The app this token was made for; it is revoked when the app is deleted",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "description": "Absent when the token never expires",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastUsedAt": {
            "description": "Absent until the token is first used; recorded at most once a minute",
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "description": "The start of the token, enough to recognise it",
            "type": "string"
          },
          "scope": {
            "enum": [
              "read",
              "read-write"
            ],
            "type": "string"
          },
          "token": {
            "description": "The token. It is not stored and cannot be shown again.",
            "type": "string"
          }
        },
        "required": [
          "token",
          "id",
          "name",
          "scope",
          "prefix",
          "createdAt"
        ],
        "type": "object"
      },
      "CustomAllowance": {
        "additionalProperties": false,
        "properties": {
          "allowed": {
            "description": "The caller may ask for a custom amount",
            "type": "boolean"
          },
          "cpuStep": {
            "description": "The UI offers CPU in these steps",
            "format": "double",
            "type": "number"
          },
          "limit": {
            "description": "The catalog text for an amount over maxCPU or maxMemory",
            "type": "string"
          },
          "maxCPU": {
            "description": "Most CPU cores the caller may ask for (their limit or the largest machine, the lower); 0 when not known",
            "format": "double",
            "type": "number"
          },
          "maxMemory": {
            "description": "Most memory in bytes, as maxCPU; 0 when not known",
            "format": "int64",
            "type": "integer"
          },
          "memoryStep": {
            "description": "The UI offers memory in these steps (bytes)",
            "format": "int64",
            "type": "integer"
          },
          "minCPU": {
            "format": "double",
            "type": "number"
          },
          "minMemory": {
            "format": "int64",
            "type": "integer"
          },
          "minimum": {
            "description": "The catalog text for an amount under minCPU or minMemory",
            "type": "string"
          }
        },
        "required": [
          "allowed",
          "maxCPU",
          "maxMemory",
          "minCPU",
          "minMemory",
          "cpuStep",
          "memoryStep"
        ],
        "type": "object"
      },
      "DatabaseBackup": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "size": {
            "description": "Bytes",
            "format": "int64",
            "type": "integer"
          },
          "takenAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "name",
          "takenAt",
          "size"
        ],
        "type": "object"
      },
      "DatabaseBackups": {
        "additionalProperties": false,
        "properties": {
          "canBackUpNow": {
            "type": "boolean"
          },
          "engine": {
            "enum": [
              "sqlite",
              "postgres"
            ],
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/DatabaseBackup"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "keep": {
            "format": "int64",
            "type": "integer"
          },
          "nextAt": {
            "format": "date-time",
            "type": "string"
          },
          "schedule": {
            "description": "Cron schedule of the backups; empty when none is set",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BackupStatus"
          }
        },
        "required": [
          "engine",
          "schedule",
          "keep",
          "status",
          "canBackUpNow",
          "items"
        ],
        "type": "object"
      },
      "Diagnosis": {
        "additionalProperties": false,
        "properties": {
          "blame": {
            "type": "string"
          },
          "bundle": {
            "items": {
              "$ref": "#/components/schemas/Evidence"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/Evidence"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "known": {
            "description": "False when no rule pinned the cause down",
            "type": "boolean"
          },
          "proposals": {
            "items": {
              "$ref": "#/components/schemas/ProposalView"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "rule": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          },
          "what": {
            "type": "string"
          },
          "who": {
            "type": "string"
          }
        },
        "required": [
          "rule",
          "code",
          "known",
          "title",
          "what",
          "todo",
          "blame",
          "who",
          "evidence",
          "bundle",
          "proposals"
        ],
        "type": "object"
      },
      "DirectoryOutputBody": {
        "additionalProperties": false,
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "people": {
            "items": {
              "$ref": "#/components/schemas/DirectoryPerson"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "people",
          "groups"
        ],
        "type": "object"
      },
      "DirectoryPerson": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayName",
          "email"
        ],
        "type": "object"
      },
      "Draft": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "file": {
            "type": "string"
          },
          "template": {
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "template",
          "file"
        ],
        "type": "object"
      },
      "DraftInputBody": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "description": "What to fill in; only app forms today",
            "enum": [
              "app"
            ],
            "type": "string"
          },
          "text": {
            "description": "What the app should be, in plain words",
            "maxLength": 2000,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "text",
          "kind"
        ],
        "type": "object"
      },
      "DraftView": {
        "additionalProperties": false,
        "properties": {
          "draft": {
            "$ref": "#/components/schemas/Draft"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/FieldProblem"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "retryAfter": {
            "format": "int64",
            "type": "integer"
          },
          "setBy": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "errors",
          "draft",
          "setBy"
        ],
        "type": "object"
      },
      "Dropped": {
        "additionalProperties": false,
        "properties": {
          "actions": {
            "format": "int64",
            "type": "integer"
          },
          "refs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "refs",
          "actions"
        ],
        "type": "object"
      },
      "Engine": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "extensions": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayName",
          "extensions"
        ],
        "type": "object"
      },
      "EngineListOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Engine"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "EnvBody": {
        "additionalProperties": false,
        "properties": {
          "env": {
            "description": "Every variable; the list replaces the one before",
            "items": {
              "$ref": "#/components/schemas/EnvVar"
            },
            "maxItems": 100,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "env"
        ],
        "type": "object"
      },
      "EnvVar": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "Letters, digits and underscores, not starting with a digit; names the platform sets are refused",
            "maxLength": 100,
            "type": "string"
          },
          "secret": {
            "description": "The name of one of your secrets to take the value from instead; its value is never shown",
            "maxLength": 100,
            "type": "string"
          },
          "value": {
            "description": "A plain value, shown again as typed: for settings that are not secret",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "Environment": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "EnvironmentList": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Environment"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "available",
          "items"
        ],
        "type": "object"
      },
      "EnvironmentPick": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "An id from GET /api/environments",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "EnvironmentView": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "description": "The environment manager it came from, such as nebi",
            "type": "string"
          },
          "version": {
            "description": "The version that was copied in",
            "type": "string"
          }
        },
        "required": [
          "source",
          "id",
          "name"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": false,
        "properties": {
          "location": {
            "description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
            "type": "string"
          },
          "message": {
            "description": "Error message text",
            "type": "string"
          },
          "value": {
            "description": "The value at the given location"
          }
        },
        "type": "object"
      },
      "ErrorModel": {
        "additionalProperties": false,
        "properties": {
          "detail": {
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "examples": [
              "Property foo is required but is missing."
            ],
            "type": "string"
          },
          "errors": {
            "description": "Optional list of individual error details",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "instance": {
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "examples": [
              "https://example.com/error-log/abc123"
            ],
            "format": "uri",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code",
            "examples": [
              400
            ],
            "format": "int64",
            "type": "integer"
          },
          "title": {
            "description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
            "examples": [
              "Bad Request"
            ],
            "type": "string"
          },
          "type": {
            "default": "about:blank",
            "description": "A URI reference to human-readable documentation for the error.",
            "examples": [
              "https://example.com/errors/example"
            ],
            "format": "uri",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Event": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "step": {
            "enum": [
              "Scheduled",
              "HomeReady",
              "ImageReady",
              "EnvReady",
              "Built",
              "Started",
              "Ready"
            ],
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "time",
          "type",
          "reason",
          "message",
          "count"
        ],
        "type": "object"
      },
      "EventListOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "Evidence": {
        "additionalProperties": false,
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "condition",
              "event",
              "log"
            ],
            "type": "string"
          },
          "ref": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "ref",
          "excerpt"
        ],
        "type": "object"
      },
      "ExplainInputBody": {
        "additionalProperties": false,
        "properties": {
          "preview": {
            "description": "Return what would be sent, without sending it",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ExplainView": {
        "additionalProperties": false,
        "properties": {
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          },
          "dropped": {
            "$ref": "#/components/schemas/Dropped"
          },
          "explanation": {
            "$ref": "#/components/schemas/Explanation"
          },
          "message": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "proposals": {
            "items": {
              "$ref": "#/components/schemas/ProposalView"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "retryAfter": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "proposals",
          "bundle",
          "dropped"
        ],
        "type": "object"
      },
      "Explanation": {
        "additionalProperties": false,
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/Proposal"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "cause": {
            "type": "string"
          },
          "confidence": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "evidence": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "fix": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        },
        "required": [
          "summary",
          "cause",
          "confidence",
          "evidence",
          "fix",
          "actions"
        ],
        "type": "object"
      },
      "FeedbackInputBody": {
        "additionalProperties": false,
        "properties": {
          "feature": {
            "enum": [
              "explain",
              "draft",
              "palette",
              "admin"
            ],
            "type": "string"
          },
          "ref": {
            "description": "What the answer was about, such as the app's name",
            "maxLength": 253,
            "type": "string"
          },
          "right": {
            "type": "boolean"
          }
        },
        "required": [
          "feature",
          "ref",
          "right"
        ],
        "type": "object"
      },
      "FieldProblem": {
        "additionalProperties": false,
        "properties": {
          "location": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "location",
          "message"
        ],
        "type": "object"
      },
      "FileEntry": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "enum": [
              "file",
              "folder"
            ],
            "type": "string"
          },
          "modified": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "kind",
          "size",
          "modified"
        ],
        "type": "object"
      },
      "FileListing": {
        "additionalProperties": false,
        "properties": {
          "ageSeconds": {
            "format": "int64",
            "type": "integer"
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/FileEntry"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "path": {
            "type": "string"
          },
          "stale": {
            "type": "boolean"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "path",
          "entries",
          "count",
          "truncated",
          "stale",
          "ageSeconds"
        ],
        "type": "object"
      },
      "Group": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "label"
        ],
        "type": "object"
      },
      "HeldRestore": {
        "additionalProperties": false,
        "properties": {
          "held": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "description": "The restore: the backup file name for a whole-database restore",
            "type": "string"
          },
          "scheduled": {
            "format": "int64",
            "type": "integer"
          },
          "wasRunning": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "held",
          "scheduled",
          "wasRunning"
        ],
        "type": "object"
      },
      "HomeBackupItem": {
        "additionalProperties": false,
        "properties": {
          "account": {
            "type": "boolean"
          },
          "claim": {
            "type": "string"
          },
          "evidence": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "lastAt": {
            "format": "date-time",
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "person": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BackupStatus"
          }
        },
        "required": [
          "id",
          "owner",
          "person",
          "account",
          "namespace",
          "status",
          "evidence"
        ],
        "type": "object"
      },
      "IdleStopInputBody": {
        "additionalProperties": false,
        "properties": {
          "idleStopMinutes": {
            "description": "Stop the app after this many minutes without use (requests and open connections through the gateway); 0 is Off. GET /api/idle-stop gives the allowed range.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "idleStopMinutes"
        ],
        "type": "object"
      },
      "IdleStopPolicy": {
        "additionalProperties": false,
        "properties": {
          "canTurnOff": {
            "type": "boolean"
          },
          "defaultMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "maxMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "minMinutes": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "defaultMinutes",
          "minMinutes",
          "maxMinutes",
          "canTurnOff"
        ],
        "type": "object"
      },
      "ImportInputBody": {
        "additionalProperties": false,
        "properties": {
          "onExists": {
            "default": "skip",
            "description": "What to do with an app whose name you already use",
            "enum": [
              "skip",
              "rename"
            ],
            "type": "string"
          },
          "yaml": {
            "description": "The exported file",
            "type": "string"
          }
        },
        "required": [
          "yaml"
        ],
        "type": "object"
      },
      "Info": {
        "additionalProperties": false,
        "properties": {
          "apiDocs": {
            "description": "The API docs page is served at /api/docs/",
            "type": "boolean"
          }
        },
        "required": [
          "apiDocs"
        ],
        "type": "object"
      },
      "Item": {
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "JobBody": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "description": "Command line, for engine command only: split into words like a shell but run without one, with {{.Home}} filled in; it runs in the home folder and gets each parameter as environment variable JAVO_PARAM_\u003cNAME\u003e",
            "maxLength": 4096,
            "type": "string"
          },
          "displayName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "engine": {
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          },
          "env": {
            "description": "Environment variables each run gets, plain or from your secrets, on create; change them later with PUT /api/jobs/{name}/env",
            "items": {
              "$ref": "#/components/schemas/EnvVar"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentPick",
            "description": "Run in this pixi environment from GET /api/environments, on create; its newest version is copied in now"
          },
          "kernel": {
            "maxLength": 128,
            "type": "string"
          },
          "notify": {
            "$ref": "#/components/schemas/JobNotifyBody"
          },
          "parameters": {
            "items": {
              "$ref": "#/components/schemas/JobParam"
            },
            "maxItems": 32,
            "type": [
              "array",
              "null"
            ]
          },
          "resources": {
            "$ref": "#/components/schemas/Amount",
            "description": "A custom amount each run gets instead of a size, for people the admin allows (GET /api/sizes custom), on create"
          },
          "run": {
            "$ref": "#/components/schemas/JobRunBody"
          },
          "schedule": {
            "$ref": "#/components/schemas/JobScheduleBody",
            "description": "Absent for a job that only runs on demand"
          },
          "size": {
            "description": "The size each run gets, one of the names from GET /api/sizes, on create; empty means the default size. Change it later with PUT /api/jobs/{name}/size",
            "maxLength": 63,
            "type": "string"
          },
          "source": {
            "description": "Path relative to the home folder; none for engine command",
            "maxLength": 4096,
            "type": "string"
          },
          "team": {
            "description": "Team the job belongs to, on create; needed only when namespaces are per team and the user is in several",
            "maxLength": 63,
            "type": "string"
          },
          "template": {
            "maxLength": 253,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "displayName",
          "template",
          "engine"
        ],
        "type": "object"
      },
      "JobDetail": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "description": "The command line of a command job",
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "engine": {
            "type": "string"
          },
          "env": {
            "items": {
              "$ref": "#/components/schemas/EnvVar"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentView"
          },
          "kernel": {
            "type": "string"
          },
          "lastRun": {
            "$ref": "#/components/schemas/RunView"
          },
          "name": {
            "type": "string"
          },
          "nextRuns": {
            "items": {
              "format": "date-time",
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "notify": {
            "$ref": "#/components/schemas/JobNotifyBody"
          },
          "parameters": {
            "items": {
              "$ref": "#/components/schemas/JobParam"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "phase": {
            "type": "string"
          },
          "problem": {
            "$ref": "#/components/schemas/Problem"
          },
          "recent": {
            "description": "Outcomes of the latest runs, oldest first",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "resources": {
            "$ref": "#/components/schemas/Amount",
            "description": "The custom amount each run gets instead of a size"
          },
          "resumeNotice": {
            "description": "What resuming a paused schedule will do, when it starts a missed run",
            "type": "string"
          },
          "run": {
            "$ref": "#/components/schemas/JobRunBody"
          },
          "runs": {
            "description": "Newest first",
            "items": {
              "$ref": "#/components/schemas/RunView"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "schedule": {
            "$ref": "#/components/schemas/ScheduleView"
          },
          "size": {
            "type": "string"
          },
          "source": {
            "description": "Path relative to the home folder; empty for a command job",
            "type": "string"
          },
          "template": {
            "type": "string"
          }
        },
        "required": [
          "parameters",
          "run",
          "notify",
          "runs",
          "env",
          "size",
          "name",
          "displayName",
          "engine",
          "source",
          "template",
          "nextRuns",
          "phase",
          "recent"
        ],
        "type": "object"
      },
      "JobListOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/JobView"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "JobNotifyBody": {
        "additionalProperties": false,
        "properties": {
          "onFailure": {
            "description": "Defaults to true",
            "type": "boolean"
          },
          "onSuccess": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "JobParam": {
        "additionalProperties": false,
        "properties": {
          "default": {
            "maxLength": 1024,
            "type": "string"
          },
          "name": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "enum": [
              "string",
              "integer",
              "number",
              "boolean"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "JobRunBody": {
        "additionalProperties": false,
        "properties": {
          "cellTimeout": {
            "type": "string"
          },
          "retries": {
            "format": "int32",
            "maximum": 5,
            "minimum": 0,
            "type": "integer"
          },
          "timeout": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "JobScheduleBody": {
        "additionalProperties": false,
        "properties": {
          "concurrency": {
            "description": "Defaults to Forbid",
            "enum": [
              "Allow",
              "Forbid",
              "Replace"
            ],
            "type": "string"
          },
          "cron": {
            "maxLength": 256,
            "type": "string"
          },
          "paused": {
            "type": "boolean"
          },
          "startingDeadline": {
            "type": "string"
          },
          "timeZone": {
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "cron",
          "timeZone"
        ],
        "type": "object"
      },
      "JobView": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "description": "The command line of a command job",
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "engine": {
            "type": "string"
          },
          "lastRun": {
            "$ref": "#/components/schemas/RunView"
          },
          "name": {
            "type": "string"
          },
          "nextRuns": {
            "items": {
              "format": "date-time",
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "phase": {
            "type": "string"
          },
          "problem": {
            "$ref": "#/components/schemas/Problem"
          },
          "recent": {
            "description": "Outcomes of the latest runs, oldest first",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "schedule": {
            "$ref": "#/components/schemas/ScheduleView"
          },
          "source": {
            "description": "Path relative to the home folder; empty for a command job",
            "type": "string"
          },
          "template": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName",
          "engine",
          "source",
          "template",
          "nextRuns",
          "phase",
          "recent"
        ],
        "type": "object"
      },
      "LaunchBody": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "description": "Command line, for templates whose userCommand is Optional or Required; split into words like a shell, with {{.Port}}, {{.BaseURL}}, {{.Home}}, {{.File}} and {{.Source}} filled in",
            "maxLength": 2048,
            "type": "string"
          },
          "image": {
            "description": "Image reference, for templates with userImage",
            "maxLength": 512,
            "type": "string"
          },
          "port": {
            "description": "Port the image serves on, for templates with userImage; 0 means the template's port",
            "format": "int32",
            "maximum": 65535,
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "LogLine": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "LoginInputBody": {
        "additionalProperties": false,
        "properties": {
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "username": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "username",
          "password"
        ],
        "type": "object"
      },
      "LoginOption": {
        "additionalProperties": false,
        "properties": {
          "disabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "startURL": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "kind"
        ],
        "type": "object"
      },
      "Me": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "picture": {
            "format": "uri",
            "type": "string"
          },
          "roles": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "displayName",
          "groups",
          "roles"
        ],
        "type": "object"
      },
      "NewWebhookInputBody": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "description": "The repository the app will run from",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "NewWebhookOutputBody": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "Hand back in the create request's source.webhook",
            "type": "string"
          },
          "notice": {
            "type": "string"
          },
          "secret": {
            "description": "Signs deliveries. Shown once.",
            "type": "string"
          },
          "url": {
            "description": "Where the code host delivers, once the app exists",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "secret",
          "notice"
        ],
        "type": "object"
      },
      "Notice": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "tone": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "tone",
          "title",
          "text",
          "action"
        ],
        "type": "object"
      },
      "Owner": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayName"
        ],
        "type": "object"
      },
      "Person": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "type": "boolean"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayName",
          "email",
          "active"
        ],
        "type": "object"
      },
      "PersonRef": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName"
        ],
        "type": "object"
      },
      "PlacementView": {
        "additionalProperties": false,
        "properties": {
          "coLocated": {
            "type": "boolean"
          },
          "fits": {
            "type": "boolean"
          },
          "freeCPU": {
            "description": "CPU cores free on the node, approximate: only app pods are counted",
            "format": "double",
            "type": "number"
          },
          "freeMemory": {
            "description": "Bytes of memory free on the node, approximate: only app pods are counted",
            "format": "int64",
            "type": "integer"
          },
          "node": {
            "type": "string"
          },
          "notice": {
            "$ref": "#/components/schemas/Notice",
            "description": "The banner to show; set when CoLocated"
          },
          "runningApps": {
            "description": "Display names of the caller's apps on the node",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "coLocated",
          "freeCPU",
          "freeMemory",
          "fits",
          "runningApps"
        ],
        "type": "object"
      },
      "Plan": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "planned": {
            "$ref": "#/components/schemas/Planned"
          },
          "source": {
            "type": "string"
          },
          "state": {
            "enum": [
              "pending",
              "applying",
              "applied",
              "rejected",
              "failed",
              "expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "source",
          "state",
          "planned",
          "createdAt",
          "expiresAt"
        ],
        "type": "object"
      },
      "PlanCreateInputBody": {
        "additionalProperties": false,
        "properties": {
          "proposal": {
            "$ref": "#/components/schemas/Proposal"
          },
          "source": {
            "description": "What proposed the change: rules, ai-diagnosis, palette, or mcp:\u003cagent name\u003e",
            "pattern": "^(rules|ai-diagnosis|palette|mcp:[A-Za-z0-9 ._-]{1,64})$",
            "type": "string"
          }
        },
        "required": [
          "proposal",
          "source"
        ],
        "type": "object"
      },
      "Planned": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "changes": {
            "items": {
              "$ref": "#/components/schemas/Change"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "destructive": {
            "type": "boolean"
          },
          "params": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "summary": {
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "summary",
          "changes",
          "destructive",
          "action",
          "target"
        ],
        "type": "object"
      },
      "PreviewInputBody": {
        "additionalProperties": false,
        "properties": {
          "cron": {
            "maxLength": 256,
            "type": "string"
          },
          "timeZone": {
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "cron",
          "timeZone"
        ],
        "type": "object"
      },
      "PreviewItemView": {
        "additionalProperties": false,
        "properties": {
          "app": {
            "type": "string"
          },
          "number": {
            "format": "int32",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "number",
          "title"
        ],
        "type": "object"
      },
      "PreviewOf": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "pullNumber": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "pullNumber"
        ],
        "type": "object"
      },
      "PreviewOptionsBody": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "forksWarning": {
            "type": "string"
          },
          "max": {
            "description": "How many previews a new app starts with",
            "format": "int32",
            "type": "integer"
          },
          "maxAllowed": {
            "description": "The most previews one app may ask for",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "available",
          "max",
          "maxAllowed",
          "forksWarning"
        ],
        "type": "object"
      },
      "PreviewOutputBody": {
        "additionalProperties": false,
        "properties": {
          "next": {
            "description": "Upcoming run times, RFC 3339 UTC",
            "items": {
              "format": "date-time",
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/PreviewWarning"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "next",
          "warnings"
        ],
        "type": "object"
      },
      "PreviewWarning": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "DSTSkipped",
              "DSTRepeated"
            ],
            "type": "string"
          },
          "date": {
            "description": "Day of the clock change in the schedule's zone",
            "format": "date",
            "type": "string"
          },
          "runs": {
            "description": "How many runs are affected",
            "format": "int64",
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "time": {
            "description": "First affected run, HH:MM wall clock",
            "type": "string"
          },
          "until": {
            "description": "Last affected run, HH:MM wall clock",
            "type": "string"
          }
        },
        "required": [
          "code",
          "text",
          "date",
          "time",
          "until",
          "runs"
        ],
        "type": "object"
      },
      "PreviewsBody": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "forks": {
            "type": "boolean"
          },
          "max": {
            "description": "1 to 10",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "max"
        ],
        "type": "object"
      },
      "PreviewsView": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "forks": {
            "description": "Also preview pull requests from forks",
            "type": "boolean"
          },
          "forksWarning": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/PreviewItemView"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "max": {
            "description": "How many open pull requests get a preview",
            "format": "int32",
            "type": "integer"
          },
          "maxAllowed": {
            "format": "int32",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "syncedAt": {
            "format": "date-time",
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          }
        },
        "required": [
          "enabled",
          "max",
          "maxAllowed",
          "forks",
          "forksWarning",
          "items"
        ],
        "type": "object"
      },
      "Problem": {
        "additionalProperties": false,
        "properties": {
          "blame": {
            "type": "string"
          },
          "evidence": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "reason": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          },
          "what": {
            "type": "string"
          },
          "who": {
            "type": "string"
          }
        },
        "required": [
          "reason",
          "title",
          "what",
          "todo",
          "blame",
          "who",
          "evidence"
        ],
        "type": "object"
      },
      "Proposal": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "params": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "target"
        ],
        "type": "object"
      },
      "ProposalView": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string"
          },
          "params": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "summary": {
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "summary",
          "action",
          "target"
        ],
        "type": "object"
      },
      "ReasonCopy": {
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          },
          "what": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "what",
          "todo"
        ],
        "type": "object"
      },
      "ReleaseInputBody": {
        "additionalProperties": false,
        "properties": {
          "mode": {
            "description": "start: apps that were running start at perMinute; stopped: every app stays stopped",
            "enum": [
              "start",
              "stopped"
            ],
            "type": "string"
          },
          "perMinute": {
            "default": 10,
            "format": "int64",
            "maximum": 600,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      },
      "ReleaseOutputBody": {
        "additionalProperties": false,
        "properties": {
          "released": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "released"
        ],
        "type": "object"
      },
      "RestoreRunBody": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "description": "The full backup run to restore (its Kubernetes Job name)",
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          },
          "mode": {
            "description": "How a person's files come back; everything is always replaced",
            "enum": [
              "replace",
              "beside"
            ],
            "type": "string"
          },
          "person": {
            "description": "Only this person's home folder and apps; empty: everyone's",
            "maxLength": 253,
            "type": "string"
          },
          "run": {
            "description": "The restore job's run (its Kubernetes Job name)",
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "run",
          "from"
        ],
        "type": "object"
      },
      "RestoreScope": {
        "additionalProperties": false,
        "properties": {
          "app": {
            "description": "Only the app with this short name",
            "maxLength": 63,
            "type": "string"
          },
          "owner": {
            "description": "Only this person's apps (identity name)",
            "maxLength": 253,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RestoresOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/HeldRestore"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "Row": {
        "additionalProperties": false,
        "properties": {
          "attention": {
            "type": "boolean"
          },
          "class": {
            "type": "string"
          },
          "evidence": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "fact": {
            "type": "string"
          },
          "notice": {
            "$ref": "#/components/schemas/Notice"
          },
          "provenance": {
            "type": "string"
          }
        },
        "required": [
          "fact",
          "attention",
          "notice",
          "evidence"
        ],
        "type": "object"
      },
      "RunNowInputBody": {
        "additionalProperties": false,
        "properties": {
          "parameters": {
            "additionalProperties": {
              "maxLength": 1024,
              "type": "string"
            },
            "description": "Values for this run, by parameter name",
            "maxProperties": 32,
            "type": "object"
          }
        },
        "type": "object"
      },
      "RunRequestBody": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "description": "Restore: the full backup run to restore",
            "maxLength": 63,
            "type": "string"
          },
          "mode": {
            "enum": [
              "replace",
              "beside"
            ],
            "type": "string"
          },
          "person": {
            "maxLength": 253,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RunRequestOutputBody": {
        "additionalProperties": false,
        "properties": {
          "job": {
            "description": "The job's name",
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          }
        },
        "required": [
          "job",
          "owner",
          "runId"
        ],
        "type": "object"
      },
      "RunView": {
        "additionalProperties": false,
        "properties": {
          "finishTime": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "message": {
            "description": "Plain text from the run; never markup",
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "outputPath": {
            "description": "The run folder, relative to the home folder",
            "type": "string"
          },
          "outputs": {
            "description": "Result files relative to the home folder, HTML first",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "parameters": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "The inputs this run was started with",
            "type": "object"
          },
          "reason": {
            "type": "string"
          },
          "scheduledTime": {
            "format": "date-time",
            "type": "string"
          },
          "startTime": {
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "trigger": {
            "enum": [
              "schedule",
              "manual"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "trigger",
          "outcome",
          "outputs"
        ],
        "type": "object"
      },
      "ScheduleView": {
        "additionalProperties": false,
        "properties": {
          "concurrency": {
            "enum": [
              "Allow",
              "Forbid",
              "Replace"
            ],
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "paused": {
            "type": "boolean"
          },
          "startingDeadline": {
            "description": "Duration such as 15m; a run later than this after its time is dropped",
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          }
        },
        "required": [
          "cron",
          "timeZone",
          "concurrency",
          "paused"
        ],
        "type": "object"
      },
      "SecretAppView": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName"
        ],
        "type": "object"
      },
      "SecretCreateInputBody": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "Letters, digits and underscores, not starting with a digit; also the variable name apps get it as by default",
            "type": "string"
          },
          "note": {
            "description": "What the secret is for; at most 200 characters",
            "type": "string"
          },
          "value": {
            "description": "Write-only: stored encrypted and never shown again",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "SecretJobView": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName"
        ],
        "type": "object"
      },
      "SecretUpdateInputBody": {
        "additionalProperties": false,
        "properties": {
          "note": {
            "description": "A new note",
            "type": "string"
          },
          "value": {
            "description": "A new value, write-only. Apps that use the secret restart.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SecretView": {
        "additionalProperties": false,
        "properties": {
          "apps": {
            "description": "Your apps that get this secret",
            "items": {
              "$ref": "#/components/schemas/SecretAppView"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "jobs": {
            "description": "Your jobs whose runs get this secret",
            "items": {
              "$ref": "#/components/schemas/SecretJobView"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "updatedAt": {
            "description": "When the value or the note last changed",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "name",
          "note",
          "createdAt",
          "updatedAt",
          "apps",
          "jobs"
        ],
        "type": "object"
      },
      "SelfTestResult": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "structuredOutput": {
            "type": "boolean"
          }
        },
        "required": [
          "structuredOutput"
        ],
        "type": "object"
      },
      "SharedApp": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/Owner"
          },
          "phase": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "thumbnail": {
            "$ref": "#/components/schemas/Thumbnail"
          },
          "url": {
            "type": "string"
          },
          "via": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName",
          "template",
          "kind",
          "phase",
          "url",
          "owner",
          "via"
        ],
        "type": "object"
      },
      "SharedOutputBody": {
        "additionalProperties": false,
        "properties": {
          "empty": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SharedApp"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "SharingInputBody": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "enum": [
              "Private",
              "Restricted",
              "SignedIn",
              "Public"
            ],
            "type": "string"
          },
          "groups": {
            "description": "Group values as the identity provider reports them",
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "type": [
              "array",
              "null"
            ]
          },
          "users": {
            "description": "Identity names",
            "items": {
              "type": "string"
            },
            "maxItems": 200,
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "access",
          "users",
          "groups"
        ],
        "type": "object"
      },
      "SharingView": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "enum": [
              "Private",
              "Restricted",
              "SignedIn",
              "Public"
            ],
            "type": "string"
          },
          "actsAsOwner": {
            "type": "string"
          },
          "apiAccess": {
            "enum": [
              "None",
              "Read",
              "ReadWrite"
            ],
            "type": "string"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "levels": {
            "items": {
              "$ref": "#/components/schemas/AccessLevel"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "link": {
            "type": "string"
          },
          "maxAccess": {
            "enum": [
              "Private",
              "Restricted",
              "SignedIn",
              "Public"
            ],
            "type": "string"
          },
          "tooOpen": {
            "type": "string"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/Person"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "access",
          "maxAccess",
          "users",
          "groups",
          "link",
          "levels",
          "apiAccess"
        ],
        "type": "object"
      },
      "Size": {
        "additionalProperties": false,
        "properties": {
          "cpu": {
            "description": "CPU cores, e.g. 0.5",
            "format": "double",
            "type": "number"
          },
          "default": {
            "description": "The size new apps get when none is picked: the configured default when it fits, else the largest size that fits",
            "type": "boolean"
          },
          "displayName": {
            "type": "string"
          },
          "fits": {
            "description": "Some machine in the cluster is big enough for it (or the admin lets it wait for one)",
            "type": "boolean"
          },
          "gpu": {
            "description": "GPUs an app at this size gets; absent for a size without",
            "format": "int64",
            "type": "integer"
          },
          "memory": {
            "description": "Memory in bytes",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "reason": {
            "description": "Why it does not fit, when it does not",
            "type": "string"
          },
          "reasonShort": {
            "description": "Reason in a few words, for the size's card",
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName",
          "cpu",
          "memory",
          "default",
          "fits"
        ],
        "type": "object"
      },
      "SizeInputBody": {
        "additionalProperties": false,
        "properties": {
          "resources": {
            "$ref": "#/components/schemas/Amount",
            "description": "A custom amount instead of a size, for people the admin allows"
          },
          "size": {
            "description": "One of the names from GET /api/sizes",
            "maxLength": 63,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SizeListOutputBody": {
        "additionalProperties": false,
        "properties": {
          "custom": {
            "$ref": "#/components/schemas/CustomAllowance"
          },
          "items": {
            "description": "The sizes the caller may use",
            "items": {
              "$ref": "#/components/schemas/Size"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "custom"
        ],
        "type": "object"
      },
      "SourceBody": {
        "additionalProperties": false,
        "properties": {
          "build": {
            "$ref": "#/components/schemas/SourceBuild",
            "description": "Replaces the template's build step"
          },
          "path": {
            "description": "Folder inside the repository; empty means its root",
            "maxLength": 1024,
            "type": "string"
          },
          "previews": {
            "$ref": "#/components/schemas/PreviewsBody",
            "description": "Preview settings the app starts with"
          },
          "ref": {
            "description": "Branch, tag or commit; empty means the repository's default branch",
            "maxLength": 255,
            "type": "string"
          },
          "tokenSecret": {
            "description": "The name of one of your secrets that holds the access token of a private repository; its value is never shown",
            "maxLength": 100,
            "type": "string"
          },
          "url": {
            "description": "https address of the repository, such as https://github.com/example-org/site",
            "maxLength": 2048,
            "type": "string"
          },
          "webhook": {
            "$ref": "#/components/schemas/WebhookBody",
            "description": "A webhook made by POST /api/previews/webhook, stored with the app"
          }
        },
        "type": "object"
      },
      "SourceBuild": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "maxLength": 1024,
            "type": "string"
          },
          "output": {
            "maxLength": 1024,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SourceView": {
        "additionalProperties": false,
        "properties": {
          "commit": {
            "description": "Commit the running pod cloned; empty until it has",
            "type": "string"
          },
          "hasToken": {
            "type": "boolean"
          },
          "path": {
            "type": "string"
          },
          "previewsAvailable": {
            "type": "boolean"
          },
          "ref": {
            "type": "string"
          },
          "tokenSecret": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "webURL": {
            "type": "string"
          },
          "webhookConfigured": {
            "type": "boolean"
          }
        },
        "required": [
          "url",
          "ref",
          "path",
          "commit",
          "hasToken",
          "tokenSecret",
          "webURL",
          "previewsAvailable",
          "webhookConfigured"
        ],
        "type": "object"
      },
      "StartRunInputBody": {
        "additionalProperties": false,
        "properties": {
          "run": {
            "description": "The backup job's run (its Kubernetes Job name, JAVO_RUN_ID)",
            "maxLength": 63,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "run"
        ],
        "type": "object"
      },
      "Step": {
        "additionalProperties": false,
        "properties": {
          "blame": {
            "type": "string"
          },
          "evidence": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "reason": {
            "type": "string"
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "True",
              "False",
              "Unknown"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "what": {
            "type": "string"
          },
          "who": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "status",
          "reason",
          "title",
          "what",
          "todo",
          "blame",
          "who",
          "evidence"
        ],
        "type": "object"
      },
      "StepLogRecord": {
        "additionalProperties": false,
        "properties": {
          "container": {
            "type": "string"
          },
          "exitCode": {
            "format": "int32",
            "type": "integer"
          },
          "kind": {
            "enum": [
              "start",
              "line",
              "exit",
              "waiting",
              "restart"
            ],
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "restarts": {
            "format": "int32",
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "container"
        ],
        "type": "object"
      },
      "StorageFolder": {
        "additionalProperties": false,
        "properties": {
          "dir": {
            "description": "Folder name under /shared",
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          },
          "reason": {
            "$ref": "#/components/schemas/StorageFolderReasonStruct"
          }
        },
        "required": [
          "group",
          "dir",
          "ready"
        ],
        "type": "object"
      },
      "StorageFolderReasonStruct": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "todo": {
            "type": "string"
          },
          "what": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "title",
          "what",
          "todo"
        ],
        "type": "object"
      },
      "StorageView": {
        "additionalProperties": false,
        "properties": {
          "folders": {
            "items": {
              "$ref": "#/components/schemas/StorageFolder"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "mode": {
            "enum": [
              "perUser",
              "shared"
            ],
            "type": "string"
          },
          "modeLabel": {
            "description": "The sidebar line",
            "type": "string"
          },
          "notices": {
            "items": {
              "$ref": "#/components/schemas/Notice"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "scratchPaths": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "size": {
            "description": "Home size in bytes; 0 when none is set yet",
            "format": "int64",
            "type": "integer"
          },
          "sizeEnforced": {
            "type": "boolean"
          },
          "used": {
            "description": "Bytes used; only with usage=true and where the size is enforced",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "modeLabel",
          "sizeEnforced",
          "size",
          "scratchPaths",
          "notices",
          "folders"
        ],
        "type": "object"
      },
      "Template": {
        "additionalProperties": false,
        "properties": {
          "apiAccessDefault": {
            "enum": [
              "None",
              "Read",
              "ReadWrite"
            ],
            "type": "string"
          },
          "appLogin": {
            "enum": [
              "Enabled",
              "Disabled"
            ],
            "type": "string"
          },
          "basePath": {
            "enum": [
              "Prefix",
              "Strip"
            ],
            "type": "string"
          },
          "build": {
            "$ref": "#/components/schemas/TemplateBuild"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "fileExtensions": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "fromRepo": {
            "enum": [
              "None",
              "Optional",
              "Required"
            ],
            "type": "string"
          },
          "jobOnly": {
            "type": "boolean"
          },
          "jobs": {
            "$ref": "#/components/schemas/TemplateJobs"
          },
          "kind": {
            "type": "string"
          },
          "maxApiAccess": {
            "enum": [
              "None",
              "Read",
              "ReadWrite"
            ],
            "type": "string"
          },
          "maxSharing": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "port": {
            "format": "int32",
            "type": "integer"
          },
          "sample": {
            "$ref": "#/components/schemas/TemplateSample"
          },
          "userCommand": {
            "enum": [
              "None",
              "Optional",
              "Required"
            ],
            "type": "string"
          },
          "userImage": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "displayName",
          "description",
          "category",
          "kind",
          "fileExtensions",
          "maxSharing",
          "basePath",
          "appLogin",
          "fromRepo",
          "userCommand",
          "userImage",
          "port",
          "apiAccessDefault",
          "maxApiAccess"
        ],
        "type": "object"
      },
      "TemplateBuild": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "type": "string"
          },
          "ifFile": {
            "type": "string"
          },
          "output": {
            "description": "Folder the build writes, relative to the repository folder",
            "type": "string"
          }
        },
        "required": [
          "command",
          "output"
        ],
        "type": "object"
      },
      "TemplateCategory": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "type": "object"
      },
      "TemplateJobSample": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "description": "The command line the sample job runs",
            "type": "string"
          },
          "parameters": {
            "items": {
              "$ref": "#/components/schemas/JobParam"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "command"
        ],
        "type": "object"
      },
      "TemplateJobs": {
        "additionalProperties": false,
        "properties": {
          "engines": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "kernels": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "maxTimeout": {
            "description": "Longest time limit, a Go duration such as 6h0m0s",
            "type": "string"
          },
          "sample": {
            "$ref": "#/components/schemas/TemplateJobSample"
          }
        },
        "required": [
          "engines",
          "kernels"
        ],
        "type": "object"
      },
      "TemplateListOutputBody": {
        "additionalProperties": false,
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/TemplateCategory"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Template"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "categories"
        ],
        "type": "object"
      },
      "TemplateSample": {
        "additionalProperties": false,
        "properties": {
          "command": {
            "type": "string"
          },
          "file": {
            "description": "Path relative to the home folder that the sample app opens; empty for an image sample",
            "type": "string"
          },
          "image": {
            "description": "Image the sample app runs, for templates with userImage",
            "type": "string"
          },
          "port": {
            "description": "Port the sample image serves on, for templates with userImage",
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "file",
          "command"
        ],
        "type": "object"
      },
      "Thumbnail": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TokenBody": {
        "additionalProperties": false,
        "properties": {
          "expiresInDays": {
            "description": "Days until the token stops working; absent means never, when the server allows that",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "maxLength": 1024,
            "type": "string"
          },
          "scope": {
            "description": "read (GET and HEAD only) or read-write",
            "type": "string"
          }
        },
        "required": [
          "name",
          "scope"
        ],
        "type": "object"
      },
      "TokenInputBody": {
        "additionalProperties": false,
        "properties": {
          "secret": {
            "description": "The name of one of your secrets that holds the repository's access token",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "secret"
        ],
        "type": "object"
      },
      "TokenView": {
        "additionalProperties": false,
        "properties": {
          "app": {
            "description": "The app this token was made for; it is revoked when the app is deleted",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "description": "Absent when the token never expires",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastUsedAt": {
            "description": "Absent until the token is first used; recorded at most once a minute",
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "description": "The start of the token, enough to recognise it",
            "type": "string"
          },
          "scope": {
            "enum": [
              "read",
              "read-write"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "scope",
          "prefix",
          "createdAt"
        ],
        "type": "object"
      },
      "TotalsStruct": {
        "additionalProperties": false,
        "properties": {
          "hours": {
            "format": "double",
            "type": "number"
          },
          "people": {
            "format": "int64",
            "type": "integer"
          },
          "runningNow": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "hours",
          "people",
          "runningNow"
        ],
        "type": "object"
      },
      "TransferOutputBody": {
        "additionalProperties": false,
        "properties": {
          "rows": {
            "items": {
              "$ref": "#/components/schemas/TransferRow"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "rows"
        ],
        "type": "object"
      },
      "TransferRow": {
        "additionalProperties": false,
        "properties": {
          "displayName": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "outcome": {
            "enum": [
              "Create",
              "Exists",
              "Invalid",
              "TemplateMissing",
              "OwnerUnknown",
              "Created",
              "Skipped"
            ],
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "wasRunning": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "displayName",
          "template",
          "outcome",
          "message",
          "wasRunning"
        ],
        "type": "object"
      },
      "Trim": {
        "additionalProperties": false,
        "properties": {
          "total": {
            "format": "int64",
            "type": "integer"
          },
          "used": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "used",
          "total"
        ],
        "type": "object"
      },
      "UsageOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/UsageRow"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/TotalsStruct"
          }
        },
        "required": [
          "since",
          "totals",
          "items"
        ],
        "type": "object"
      },
      "UsageRow": {
        "additionalProperties": false,
        "properties": {
          "apps": {
            "format": "int64",
            "type": "integer"
          },
          "displayName": {
            "type": "string"
          },
          "hours": {
            "description": "App-hours run in the window",
            "format": "double",
            "type": "number"
          },
          "key": {
            "description": "Identity name, or the group; empty for people in no group",
            "type": "string"
          },
          "people": {
            "format": "int64",
            "type": "integer"
          },
          "runningNow": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "key",
          "displayName",
          "hours",
          "apps",
          "people",
          "runningNow"
        ],
        "type": "object"
      },
      "WebhookBody": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 64,
            "type": "string"
          },
          "secret": {
            "description": "Write-only: never shown again",
            "maxLength": 128,
            "type": "string"
          }
        },
        "required": [
          "id",
          "secret"
        ],
        "type": "object"
      },
      "WebhookOutputBody": {
        "additionalProperties": false,
        "properties": {
          "notice": {
            "type": "string"
          },
          "secret": {
            "description": "Signs deliveries. Shown once.",
            "type": "string"
          },
          "url": {
            "description": "Where the code host delivers",
            "type": "string"
          }
        },
        "required": [
          "url",
          "secret",
          "notice"
        ],
        "type": "object"
      },
      "Workspace": {
        "additionalProperties": false,
        "properties": {
          "apiAccess": {
            "enum": [
              "None",
              "Read",
              "ReadWrite"
            ],
            "type": "string"
          },
          "canShare": {
            "type": "boolean"
          },
          "command": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "env": {
            "items": {
              "$ref": "#/components/schemas/EnvVar"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "environment": {
            "$ref": "#/components/schemas/EnvironmentView"
          },
          "file": {
            "type": "string"
          },
          "filePath": {
            "type": "string"
          },
          "idleStopMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "image": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phase": {
            "type": "string"
          },
          "port": {
            "format": "int32",
            "type": "integer"
          },
          "previewOf": {
            "$ref": "#/components/schemas/PreviewOf"
          },
          "redeployable": {
            "type": "boolean"
          },
          "resources": {
            "$ref": "#/components/schemas/Amount"
          },
          "size": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/SourceView"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/Step"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "stoppedIdleAfter": {
            "format": "int32",
            "type": "integer"
          },
          "template": {
            "type": "string"
          },
          "thumbnail": {
            "$ref": "#/components/schemas/Thumbnail"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "displayName",
          "template",
          "kind",
          "file",
          "size",
          "command",
          "image",
          "port",
          "phase",
          "url",
          "steps",
          "apiAccess",
          "canShare",
          "idleStopMinutes",
          "stoppedIdleAfter",
          "redeployable",
          "env"
        ],
        "type": "object"
      },
      "WorkspaceListOutputBody": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Workspace"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "session": {
        "in": "cookie",
        "name": "javo_session",
        "type": "apiKey"
      },
      "token": {
        "description": "A personal API token (javo_...), created under Settings. A read token may only GET; tokens cannot manage tokens.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "javo",
    "version": "v1alpha1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/admin/ai/ask": {
      "post": {
        "operationId": "askAdmin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAnswer"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Platform admins: ask about the report; the answer cites its rows and changes nothing",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/apps": {
      "get": {
        "operationId": "adminListApps",
        "parameters": [
          {
            "description": "Only this person's apps (identity name)",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Only this person's apps (identity name)",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAppsOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Every person's apps, newest first (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups": {
      "get": {
        "operationId": "adminListBackups",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupsOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The database backups and their health (platform admins)",
        "tags": [
          "admin"
        ]
      },
      "post": {
        "operationId": "adminBackUpNow",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseBackup"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Back up the database now (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/now": {
      "post": {
        "operationId": "adminBackUpEverythingNow",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunRequestOutputBody"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Run the backup job now (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/restore": {
      "post": {
        "operationId": "adminRestoreNow",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunRequestOutputBody"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Run the restore job now: a full backup, for everyone or one person (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/restores": {
      "post": {
        "operationId": "adminStartRestoreRun",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreRunBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupRunProgress"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Gateway"
          }
        },
        "summary": "Restore a full backup, for everyone or one person, as part of a run of the restore job (its run calls this)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/restores/{run}": {
      "get": {
        "operationId": "adminRestoreRun",
        "parameters": [
          {
            "in": "path",
            "name": "run",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Add each ended step's own log",
            "explode": false,
            "in": "query",
            "name": "logs",
            "schema": {
              "description": "Add each ended step's own log",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupRunProgress"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Where a restore stands, home by home",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/runs": {
      "post": {
        "operationId": "adminStartBackupRun",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartRunInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupRunProgress"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Start a full backup as part of a run of the backup job (its run calls this)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/runs/{run}": {
      "get": {
        "operationId": "adminBackupRun",
        "parameters": [
          {
            "in": "path",
            "name": "run",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Add each ended step's own log",
            "explode": false,
            "in": "query",
            "name": "logs",
            "schema": {
              "description": "Add each ended step's own log",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupRunProgress"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Where a full backup stands, step by step",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/{name}/preview": {
      "post": {
        "operationId": "adminPreviewRestore",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreScope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "What restoring apps from a database backup would do; nothing is changed (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/backups/{name}/restore": {
      "post": {
        "operationId": "adminRestore",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreScope"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Bring back apps from a database backup; they wait for a release (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/report": {
      "get": {
        "operationId": "getAdminReport",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterReport"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Platform admins: failures by cause, apps by state and template, idle apps",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/restores": {
      "get": {
        "operationId": "adminListRestores",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoresOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Restores whose apps wait to be released (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/restores/{name}/release": {
      "post": {
        "operationId": "adminReleaseRestore",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Let a restore's held apps go (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/admin/storage": {
      "get": {
        "operationId": "getAdminStorage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStorageOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Storage capability report",
        "tags": [
          "storage",
          "admin"
        ]
      }
    },
    "/api/admin/usage": {
      "get": {
        "operationId": "adminUsage",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "by",
            "schema": {
              "default": "person",
              "enum": [
                "person",
                "group"
              ],
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "days",
            "schema": {
              "default": 7,
              "format": "int64",
              "maximum": 366,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "How long apps ran in the last days, per person or group (platform admins)",
        "tags": [
          "admin"
        ]
      }
    },
    "/api/ai/command": {
      "post": {
        "operationId": "aiCommand",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommandInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandView"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Ask in plain words for changes to your apps; each comes back as a plan to approve",
        "tags": [
          "ai"
        ]
      }
    },
    "/api/ai/draft": {
      "post": {
        "operationId": "draftWorkspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DraftView"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Fill the new app form from a description; nothing is created",
        "tags": [
          "ai"
        ]
      }
    },
    "/api/ai/feedback": {
      "post": {
        "operationId": "aiFeedback",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Say whether an AI answer was right (logged, nothing else)",
        "tags": [
          "ai"
        ]
      }
    },
    "/api/ai/status": {
      "get": {
        "operationId": "getAiStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIStatus"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Which AI features are on",
        "tags": [
          "ai"
        ]
      }
    },
    "/api/auth/local/login": {
      "post": {
        "operationId": "localLogin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [],
        "summary": "Sign in with a local account",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/auth/logout": {
      "post": {
        "operationId": "logout",
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "Javo-Logout-Reason": {
                "schema": {
                  "type": "string"
                }
              },
              "Javo-Logout-Url": {
                "schema": {
                  "type": "string"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Sign out and end the session",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/auth/options": {
      "get": {
        "operationId": "authOptions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LoginOption"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "The ways to sign in",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/branding": {
      "get": {
        "operationId": "getBranding",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandingView"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "The install's product name, logo, favicon and accent",
        "tags": [
          "branding"
        ]
      }
    },
    "/api/directory": {
      "get": {
        "operationId": "searchDirectory",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "q",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "People and the caller's own groups matching a search",
        "tags": [
          "sharing"
        ]
      }
    },
    "/api/engines": {
      "get": {
        "operationId": "listEngines",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngineListOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The ways a file can be run as a job",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/environments": {
      "get": {
        "description": "Environments from the platform's environment manager (Nebi) that you own or that are shared with you, asked as you. available is false when the platform has none.",
        "operationId": "listEnvironments",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentList"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "List the environments you can run an app or a job in",
        "tags": [
          "environments"
        ]
      }
    },
    "/api/files": {
      "get": {
        "operationId": "listFiles",
        "parameters": [
          {
            "description": "Team whose home to list; needed only when namespaces are per team and the user is in several",
            "explode": false,
            "in": "query",
            "name": "team",
            "schema": {
              "description": "Team whose home to list; needed only when namespaces are per team and the user is in several",
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Folder relative to the place; empty is the place itself",
            "explode": false,
            "in": "query",
            "name": "path",
            "schema": {
              "description": "Folder relative to the place; empty is the place itself",
              "maxLength": 4096,
              "type": "string"
            }
          },
          {
            "description": "home (default) or group:\u003cdir\u003e, a group folder from GET /api/storage",
            "explode": false,
            "in": "query",
            "name": "place",
            "schema": {
              "description": "home (default) or group:\u003cdir\u003e, a group folder from GET /api/storage",
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileListing"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "List a folder of the user's home",
        "tags": [
          "files"
        ]
      }
    },
    "/api/files/raw": {
      "get": {
        "operationId": "getRawFile",
        "parameters": [
          {
            "description": "Team whose home the file is in; needed only when namespaces are per team and the user is in several",
            "explode": false,
            "in": "query",
            "name": "team",
            "schema": {
              "description": "Team whose home the file is in; needed only when namespaces are per team and the user is in several",
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "File relative to the home folder",
            "explode": false,
            "in": "query",
            "name": "path",
            "schema": {
              "description": "File relative to the home folder",
              "maxLength": 4096,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "Download or show one file of the user's home",
        "tags": [
          "files"
        ]
      }
    },
    "/api/files/warm": {
      "post": {
        "description": "Starts what lists the home folder and lists it, so the file picker opens at once. Answers right away; calls closer together than a few seconds do nothing.",
        "operationId": "warmFiles",
        "parameters": [
          {
            "description": "Team whose home to warm up; needed only when namespaces are per team and the user is in several",
            "explode": false,
            "in": "query",
            "name": "team",
            "schema": {
              "description": "Team whose home to warm up; needed only when namespaces are per team and the user is in several",
              "maxLength": 63,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Get the user's home folder ready to list",
        "tags": [
          "files"
        ]
      }
    },
    "/api/idle-stop": {
      "get": {
        "operationId": "getIdleStopPolicy",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdleStopPolicy"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The allowed \"Stop when idle\" timeouts and the default for new apps",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/info": {
      "get": {
        "operationId": "serverInfo",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Info"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Which optional parts of the server are on",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/job-samples/{template}": {
      "post": {
        "operationId": "startJobSample",
        "parameters": [
          {
            "in": "path",
            "name": "template",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "Make a template's sample job (run on demand)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs": {
      "get": {
        "operationId": "listJobs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobListOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The user's jobs",
        "tags": [
          "jobs"
        ]
      },
      "post": {
        "operationId": "createJob",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Create a job",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}": {
      "delete": {
        "operationId": "deleteJob",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Delete a job (its run folders are kept)",
        "tags": [
          "jobs"
        ]
      },
      "get": {
        "operationId": "getJob",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "One of the user's jobs with its runs",
        "tags": [
          "jobs"
        ]
      },
      "put": {
        "operationId": "updateJob",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the job's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the job's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change a job",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/env": {
      "put": {
        "description": "Only the job's owner, with their own secrets. A run already going keeps what it started with. Anything a run prints, a value included, is in its log.",
        "operationId": "setJobEnv",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the job's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the job's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Set a job's environment variables: plain values and values from your secrets (from the next run on)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/pause": {
      "post": {
        "operationId": "pauseJob",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Pause a job's schedule",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/resume": {
      "post": {
        "operationId": "resumeJob",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Resume a job's schedule",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/run": {
      "post": {
        "operationId": "runJob",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the job's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the job's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunNowInputBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Run a job now",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/runs/{run}/cancel": {
      "post": {
        "operationId": "cancelJobRun",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the job's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the job's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Cancel a run that is still going",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/runs/{run}/log": {
      "get": {
        "operationId": "getJobRunLog",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the job's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the job's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "The log, as untrusted plain text",
            "headers": {
              "X-Log-Source": {
                "description": "Where the log comes from: live while the run's pod is there (followed while the run goes), saved once it is gone (the run.log the runner wrote to the run folder)",
                "schema": {
                  "enum": [
                    "live",
                    "saved"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "410": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Gone"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "A run's log as plain text, followed live while the run is going",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/jobs/{name}/size": {
      "put": {
        "description": "A run already going keeps the size it started with.",
        "operationId": "setJobSize",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SizeInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change the size or custom amount a job's runs get (from the next run on)",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/me": {
      "get": {
        "operationId": "me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The signed-in user",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/plans": {
      "post": {
        "operationId": "createPlan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanCreateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Propose a change for review; nothing changes until it is approved",
        "tags": [
          "plans"
        ]
      }
    },
    "/api/plans/{id}": {
      "get": {
        "operationId": "getPlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "A proposed change and its state",
        "tags": [
          "plans"
        ]
      }
    },
    "/api/plans/{id}/approve": {
      "post": {
        "operationId": "approvePlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "410": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Gone"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Approve and make a proposed change (browser session only)",
        "tags": [
          "plans"
        ]
      }
    },
    "/api/plans/{id}/reject": {
      "post": {
        "operationId": "rejectPlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Turn down a proposed change (browser session only)",
        "tags": [
          "plans"
        ]
      }
    },
    "/api/previews": {
      "get": {
        "operationId": "getPreviewOptions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewOptionsBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Whether new apps can have pull request previews, and their limits",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/previews/webhook": {
      "post": {
        "description": "Nothing is stored: create the app with both in source.webhook, and the address answers from then on. Add it as a webhook of the repository, content type application/json, with the pull request event.",
        "operationId": "newPreviewsWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWebhookInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewWebhookOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Make a webhook address and secret for an app not yet created (shown once)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/reasons": {
      "get": {
        "operationId": "reasonCopy",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "code",
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReasonCopy"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [],
        "summary": "The words for one catalog reason",
        "tags": [
          "auth"
        ]
      }
    },
    "/api/samples/{template}": {
      "post": {
        "operationId": "startSample",
        "parameters": [
          {
            "in": "path",
            "name": "template",
            "required": true,
            "schema": {
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "Start a template's sample app",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/schedule/preview": {
      "post": {
        "operationId": "previewSchedule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Upcoming run times of a schedule, as the cluster will run them",
        "tags": [
          "jobs"
        ]
      }
    },
    "/api/secrets": {
      "get": {
        "operationId": "listSecrets",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SecretView"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Your secrets: names, notes, dates and the apps and jobs that use them, never the values",
        "tags": [
          "secrets"
        ]
      },
      "post": {
        "description": "The value is encrypted before it is stored and is never shown again, by any page or API.",
        "operationId": "createSecret",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretCreateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretView"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "Store a secret",
        "tags": [
          "secrets"
        ]
      }
    },
    "/api/secrets/{name}": {
      "delete": {
        "description": "A secret an app or a job uses is refused (409): take it off them first.",
        "operationId": "deleteSecret",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Delete a secret no app or job uses",
        "tags": [
          "secrets"
        ]
      },
      "put": {
        "description": "A new value is encrypted and never shown again; the apps that use the secret restart to get it, and the next run of each job that uses it gets it.",
        "operationId": "updateSecret",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 100,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretUpdateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "Replace a secret's value or change its note",
        "tags": [
          "secrets"
        ]
      }
    },
    "/api/shared": {
      "get": {
        "operationId": "listShared",
        "parameters": [
          {
            "description": "Also list the previews of pull requests",
            "explode": false,
            "in": "query",
            "name": "previews",
            "schema": {
              "description": "Also list the previews of pull requests",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Apps other people shared with the user",
        "tags": [
          "sharing"
        ]
      }
    },
    "/api/sizes": {
      "get": {
        "operationId": "listSizes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizeListOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Sizes the caller can run an app at, and their custom amount allowance",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/storage": {
      "get": {
        "operationId": "getStorage",
        "parameters": [
          {
            "description": "Also read the space used; starts the file pod if it is not running",
            "explode": false,
            "in": "query",
            "name": "usage",
            "schema": {
              "description": "Also read the space used; starts the file pod if it is not running",
              "type": "boolean"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "team",
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "What the caller's files are on",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/storage/placement": {
      "get": {
        "operationId": "previewPlacement",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "template",
            "schema": {
              "maxLength": 63,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "size",
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "team",
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlacementView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Where a new app would run",
        "tags": [
          "storage"
        ]
      }
    },
    "/api/templates": {
      "get": {
        "operationId": "listTemplates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateListOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Templates the user may create apps from",
        "tags": [
          "templates"
        ]
      }
    },
    "/api/templates/{name}": {
      "delete": {
        "operationId": "deleteTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Delete a template (template admins)",
        "tags": [
          "templates"
        ]
      },
      "put": {
        "operationId": "putTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Create or replace a template (template admins)",
        "tags": [
          "templates"
        ]
      }
    },
    "/api/tokens": {
      "get": {
        "description": "Needs a browser session: API tokens cannot list tokens.",
        "operationId": "listTokens",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TokenView"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Your personal API tokens",
        "tags": [
          "tokens"
        ]
      },
      "post": {
        "description": "The token in the answer is shown once and never again. Send it as `Authorization: Bearer \u003ctoken\u003e`. It acts as you, with the groups from your last sign-in; a read token may only GET. Needs a browser session.",
        "operationId": "createToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedToken"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Create a personal API token",
        "tags": [
          "tokens"
        ]
      }
    },
    "/api/tokens/{id}": {
      "delete": {
        "description": "The token stops working at once. Revoking the token of a coding-agent app makes the app get a new one when it next starts. Needs a browser session.",
        "operationId": "revokeToken",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "session": []
          }
        ],
        "summary": "Revoke a personal API token",
        "tags": [
          "tokens"
        ]
      }
    },
    "/api/workspaces": {
      "get": {
        "operationId": "listWorkspaces",
        "parameters": [
          {
            "description": "Also list the previews of pull requests",
            "explode": false,
            "in": "query",
            "name": "previews",
            "schema": {
              "description": "Also list the previews of pull requests",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceListOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The user's apps",
        "tags": [
          "workspaces"
        ]
      },
      "post": {
        "operationId": "createWorkspace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Service Unavailable"
          }
        },
        "summary": "Create an app",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/export": {
      "get": {
        "operationId": "exportWorkspaces",
        "responses": {
          "200": {
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "One YAML document per app",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The user's apps as a YAML file to keep or import elsewhere",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/import": {
      "post": {
        "operationId": "importWorkspaces",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Import a YAML file of apps; they arrive stopped and private",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/import/preview": {
      "post": {
        "operationId": "previewImportWorkspaces",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "What importing a YAML file of apps would do; nothing is changed",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}": {
      "delete": {
        "operationId": "deleteWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Delete an app (the home folder is kept)",
        "tags": [
          "workspaces"
        ]
      },
      "get": {
        "operationId": "getWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "One of the user's apps",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/api-access": {
      "put": {
        "description": "The app's old token stops working at once; the app gets a token of the new scope as JAVO_TOKEN when it restarts, or none with None.",
        "operationId": "setWorkspaceAPIAccess",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiAccessInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change whether an app can call the API as you (a running app restarts)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/diagnosis": {
      "get": {
        "operationId": "getDiagnosis",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Diagnosis"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Why an app failed: the cause the rules found, its evidence and the changes that may fix it",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/diagnosis/explain": {
      "post": {
        "operationId": "explainDiagnosis",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplainInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplainView"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Ask the model to explain a failure; its evidence is checked against what was sent",
        "tags": [
          "ai"
        ]
      }
    },
    "/api/workspaces/{name}/env": {
      "put": {
        "description": "Only the app's owner, with their own secrets. Anyone who can use the app could make it show its environment if the app prints it; sharing an app does not share the secrets themselves. Previews of pull requests never get secrets.",
        "operationId": "setWorkspaceEnv",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Set an app's environment variables: plain values and values from your secrets (a running app restarts)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/events": {
      "get": {
        "operationId": "listWorkspaceEvents",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventListOutputBody"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Kubernetes events of an app's pod and home folder (with the Job that readies it), oldest first; the home step's warnings come before its other events",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/idle-stop": {
      "put": {
        "operationId": "setWorkspaceIdleStop",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdleStopInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change when an app stops for being idle (a running app keeps running)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/launch": {
      "put": {
        "operationId": "setWorkspaceLaunch",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LaunchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change an app's command, and for an image app its image and port (a running app restarts)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/logs": {
      "get": {
        "operationId": "getWorkspaceLogs",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          },
          {
            "description": "How many of the latest lines",
            "explode": false,
            "in": "query",
            "name": "tail",
            "schema": {
              "default": 200,
              "description": "How many of the latest lines",
              "format": "int64",
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Read the run before the last restart (after a crash)",
            "explode": false,
            "in": "query",
            "name": "previous",
            "schema": {
              "description": "Read the run before the last restart (after a crash)",
              "type": "boolean"
            }
          },
          {
            "description": "Whose log: the app's (Started) or its build's (Built)",
            "explode": false,
            "in": "query",
            "name": "step",
            "schema": {
              "default": "Started",
              "description": "Whose log: the app's (Started) or its build's (Built)",
              "enum": [
                "Started",
                "Built"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppLogs"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The latest lines the app wrote",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/logs/stream": {
      "get": {
        "operationId": "streamWorkspaceLogs",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          },
          {
            "description": "How many of the latest lines",
            "explode": false,
            "in": "query",
            "name": "tail",
            "schema": {
              "default": 200,
              "description": "How many of the latest lines",
              "format": "int64",
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Read the run before the last restart (after a crash)",
            "explode": false,
            "in": "query",
            "name": "previous",
            "schema": {
              "description": "Read the run before the last restart (after a crash)",
              "type": "boolean"
            }
          },
          {
            "description": "Whose log: the app's (Started) or its build's (Built)",
            "explode": false,
            "in": "query",
            "name": "step",
            "schema": {
              "default": "Started",
              "description": "Whose log: the app's (Started) or its build's (Built)",
              "enum": [
                "Started",
                "Built"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/LogLine"
                }
              }
            },
            "description": "Server-sent events: the latest lines, then new ones as they are written"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Follow the app's log live (server-sent events, one line event per log line)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/previews": {
      "get": {
        "description": "Each pull request is listed with its preview or the reason it has none.",
        "operationId": "getWorkspacePreviews",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewsView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The app's preview settings and what the last look at its pull requests found",
        "tags": [
          "workspaces"
        ]
      },
      "put": {
        "description": "One preview app per open pull request, up to max. Turning them off keeps max and forks for next time.",
        "operationId": "setWorkspacePreviews",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewsView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Turn pull request previews on or off and set how many (GitHub repositories only)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/previews/webhook": {
      "post": {
        "description": "Add the address as a webhook of the repository, content type application/json, with the pull request event. Without it previews still follow pull requests, at the poll interval.",
        "operationId": "setWorkspacePreviewsWebhook",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookOutputBody"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Make the webhook address and secret that start a preview sync at once (shown once; replaces any earlier pair)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/redeploy": {
      "post": {
        "description": "The pod clones again at every start, so a restart is a redeploy.",
        "operationId": "redeployWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Pull the newest commit (or home file) and restart the app",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/restart": {
      "post": {
        "operationId": "restartWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Restart an app (its pod is replaced; a stopped app stays stopped)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/sharing": {
      "get": {
        "operationId": "getSharing",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharingView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Who can open one of the user's apps",
        "tags": [
          "sharing"
        ]
      },
      "put": {
        "operationId": "setSharing",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SharingInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharingView"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change who can open one of the user's apps",
        "tags": [
          "sharing"
        ]
      }
    },
    "/api/workspaces/{name}/size": {
      "put": {
        "operationId": "setWorkspaceSize",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SizeInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Change an app's size or custom amount (a running app restarts)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/source/token": {
      "delete": {
        "operationId": "deleteWorkspaceSourceToken",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Clone the app's repository without an access token (the app restarts)",
        "tags": [
          "workspaces"
        ]
      },
      "put": {
        "operationId": "setWorkspaceSourceToken",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Take the access token of the app's private repository from one of your secrets (the app restarts)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/start": {
      "post": {
        "operationId": "startWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Start an app",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/steps/{step}/log": {
      "get": {
        "operationId": "streamWorkspaceStepLog",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "step",
            "required": true,
            "schema": {
              "enum": [
                "Scheduled",
                "HomeReady",
                "ImageReady",
                "EnvReady",
                "Built",
                "Started",
                "Ready"
              ],
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/StepLogRecord"
                }
              }
            },
            "description": "One JSON record per line; a blank line keeps an idle stream open"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Follow the log of the containers doing a startup step's work, one after another, as they write it (newline-delimited JSON records; ends once every one of them has finished)",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/stop": {
      "post": {
        "operationId": "stopWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Stop an app",
        "tags": [
          "workspaces"
        ]
      }
    },
    "/api/workspaces/{name}/thumbnail": {
      "delete": {
        "operationId": "removeWorkspaceThumbnail",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Remove the app's picture; its card shows the app kind's logo again",
        "tags": [
          "workspaces"
        ]
      },
      "get": {
        "operationId": "getWorkspaceThumbnail",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          },
          {
            "description": "The picture's digest, from the app view's thumbnail URL; it only keys browser caches",
            "explode": false,
            "in": "query",
            "name": "v",
            "schema": {
              "description": "The picture's digest, from the app view's thumbnail URL; it only keys browser caches",
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/jpeg": {
                "schema": {
                  "contentMediaType": "application/octet-stream",
                  "format": "binary",
                  "type": "string"
                }
              },
              "image/png": {
                "schema": {
                  "contentMediaType": "application/octet-stream",
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The picture"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "The app's picture, for anyone who may open the app",
        "tags": [
          "workspaces"
        ]
      },
      "put": {
        "description": "The image is checked by its bytes, not the Content-Type, decoded and encoded again, and shrunk to at most 960 pixels on its longest side.",
        "operationId": "setWorkspaceThumbnail",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "maxLength": 63,
              "type": "string"
            }
          },
          {
            "description": "Identity name of the app's owner; default the caller",
            "explode": false,
            "in": "query",
            "name": "owner",
            "schema": {
              "description": "Identity name of the app's owner; default the caller",
              "maxLength": 253,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/png": {
              "schema": {
                "contentMediaType": "application/octet-stream",
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Not Found"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Set the picture shown on the app's card (owner or platform admin)",
        "tags": [
          "workspaces"
        ]
      }
    }
  },
  "security": [
    {
      "session": []
    },
    {
      "token": []
    }
  ]
}
