{
  "components": {
    "responses": {
      "Problem": {
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "description": "The request failed."
      }
    },
    "schemas": {
      "Access": {
        "properties": {
          "allow": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "any_user": {
            "type": "boolean"
          },
          "asked_in_vain": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          },
          "password_missing": {
            "type": "boolean"
          },
          "password_set": {
            "type": "boolean"
          },
          "setting": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "source",
          "allow"
        ],
        "type": "object"
      },
      "AccessChange": {
        "properties": {
          "allow": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "any_user": {
            "type": "boolean"
          },
          "mode": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      },
      "App": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "production": {
            "$ref": "#/components/schemas/Release"
          },
          "project": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "url",
          "created_at"
        ],
        "type": "object"
      },
      "AppChange": {
        "properties": {
          "name": {
            "type": "string"
          },
          "project": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AppInfo": {
        "properties": {
          "builds": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "type": "integer"
          },
          "logs": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "production": {
            "$ref": "#/components/schemas/Release"
          },
          "project": {
            "type": "string"
          },
          "repository": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "url",
          "created_at",
          "builds",
          "logs",
          "repository",
          "data"
        ],
        "type": "object"
      },
      "AppPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/App"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AuditEntry": {
        "properties": {
          "action": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "additionalProperties": {},
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "at",
          "actor",
          "action",
          "result"
        ],
        "type": "object"
      },
      "AuditEntryPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditEntry"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "Backup": {
        "properties": {
          "created_by": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "trigger": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "started_at",
          "status",
          "trigger",
          "destination"
        ],
        "type": "object"
      },
      "BackupConfig": {
        "properties": {
          "access_key": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "keep": {
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "schedule": {
            "type": "string"
          },
          "secret_key": {
            "type": "string"
          }
        },
        "required": [
          "destination",
          "keep"
        ],
        "type": "object"
      },
      "Backups": {
        "properties": {
          "access_key": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "has_secret_key": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Backup"
            },
            "type": "array"
          },
          "keep": {
            "type": "integer"
          },
          "next_at": {
            "format": "date-time",
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "schedule": {
            "type": "string"
          }
        },
        "required": [
          "destination",
          "has_secret_key",
          "keep",
          "items"
        ],
        "type": "object"
      },
      "Check": {
        "properties": {
          "detail": {
            "type": "string"
          },
          "fix": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "status",
          "detail"
        ],
        "type": "object"
      },
      "ConfigBackups": {
        "properties": {
          "access_key": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "keep": {
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "schedule": {
            "type": "string"
          },
          "secret_key": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConfigChannel": {
        "properties": {
          "from": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "port": {
            "type": "integer"
          },
          "secret": {
            "type": "string"
          },
          "to": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "type": "object"
      },
      "ConfigItem": {
        "properties": {
          "action": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "what": {
            "type": "string"
          }
        },
        "required": [
          "what",
          "name",
          "action"
        ],
        "type": "object"
      },
      "ConfigProject": {
        "properties": {
          "everyone_role": {
            "type": "string"
          },
          "members": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "viewers_see_logs": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "ConfigRegistry": {
        "properties": {
          "host": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "host",
          "username"
        ],
        "type": "object"
      },
      "ConfigReport": {
        "properties": {
          "dry_run": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConfigItem"
            },
            "type": "array"
          }
        },
        "required": [
          "dry_run",
          "items"
        ],
        "type": "object"
      },
      "ConfigRule": {
        "properties": {
          "app": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "project": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "events"
        ],
        "type": "object"
      },
      "ConfigSignIn": {
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string"
          },
          "email_domains": {
            "type": "string"
          },
          "group_claim": {
            "type": "string"
          },
          "group_rules": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "passwords_off": {
            "type": "boolean"
          },
          "provision": {
            "type": "boolean"
          },
          "scopes": {
            "type": "string"
          },
          "trust_emails": {
            "type": "boolean"
          }
        },
        "required": [
          "issuer",
          "client_id"
        ],
        "type": "object"
      },
      "ConfigSink": {
        "properties": {
          "address": {
            "type": "string"
          },
          "app": {
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "kind": {
            "type": "string"
          },
          "logs": {
            "type": "boolean"
          },
          "metrics": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "address"
        ],
        "type": "object"
      },
      "ConfigUser": {
        "properties": {
          "disabled": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "ContainerEngine": {
        "properties": {
          "kind": {
            "type": "string"
          },
          "problem": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "type": "object"
      },
      "CreatedChannel": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          },
          "sent_at": {
            "format": "date-time",
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind"
        ],
        "type": "object"
      },
      "CreatedToken": {
        "properties": {
          "app": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "envs": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "scopes",
          "created_at",
          "token"
        ],
        "type": "object"
      },
      "CronJob": {
        "properties": {
          "command": {
            "type": "string"
          },
          "last": {
            "$ref": "#/components/schemas/Run"
          },
          "name": {
            "type": "string"
          },
          "next": {
            "format": "date-time",
            "type": "string"
          },
          "overlap": {
            "type": "string"
          },
          "schedule": {
            "type": "string"
          },
          "timeout": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "schedule",
          "command",
          "timeout"
        ],
        "type": "object"
      },
      "DataFile": {
        "properties": {
          "kind": {
            "type": "string"
          },
          "link": {
            "type": "boolean"
          },
          "modified": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          }
        },
        "required": [
          "name",
          "kind",
          "size",
          "modified"
        ],
        "type": "object"
      },
      "DataListing": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/DataFile"
            },
            "type": "array"
          },
          "more": {
            "type": "boolean"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "files"
        ],
        "type": "object"
      },
      "Deployment": {
        "properties": {
          "app": {
            "type": "string"
          },
          "app_created": {
            "type": "boolean"
          },
          "build": {
            "type": "string"
          },
          "commit": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "env": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "output": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "ref": {
            "type": "string"
          },
          "release": {
            "$ref": "#/components/schemas/Release"
          },
          "source": {
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "app",
          "env",
          "url",
          "source",
          "status",
          "created_at"
        ],
        "type": "object"
      },
      "DeploymentPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Deployment"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "DeviceAuthorization": {
        "properties": {
          "device_code": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "interval": {
            "type": "integer"
          },
          "user_code": {
            "type": "string"
          },
          "verification_url": {
            "type": "string"
          },
          "verification_url_complete": {
            "type": "string"
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_url",
          "verification_url_complete",
          "expires_in",
          "interval"
        ],
        "type": "object"
      },
      "DeviceRequest": {
        "properties": {
          "client": {
            "type": "string"
          }
        },
        "required": [
          "client"
        ],
        "type": "object"
      },
      "DeviceToken": {
        "properties": {
          "token": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "token",
          "user"
        ],
        "type": "object"
      },
      "DeviceTokenRequest": {
        "properties": {
          "device_code": {
            "type": "string"
          }
        },
        "required": [
          "device_code"
        ],
        "type": "object"
      },
      "DiffLine": {
        "properties": {
          "op": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "op",
          "text"
        ],
        "type": "object"
      },
      "Domain": {
        "properties": {
          "address": {
            "type": "string"
          },
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "hostname": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "problem": {
            "type": "string"
          },
          "record": {
            "type": "string"
          },
          "strip_prefix": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "verified_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "address",
          "hostname",
          "verified",
          "record"
        ],
        "type": "object"
      },
      "Environment": {
        "properties": {
          "app": {
            "type": "string"
          },
          "asleep": {
            "type": "boolean"
          },
          "branch": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "formation": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object"
          },
          "instances": {
            "items": {
              "$ref": "#/components/schemas/Instance"
            },
            "type": "array"
          },
          "isolation": {
            "$ref": "#/components/schemas/Isolation"
          },
          "kind": {
            "type": "string"
          },
          "last_active_at": {
            "format": "date-time",
            "type": "string"
          },
          "locked_by": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "release": {
            "$ref": "#/components/schemas/Release"
          },
          "stands_alone": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "app",
          "name",
          "url",
          "instances"
        ],
        "type": "object"
      },
      "EnvironmentChange": {
        "properties": {
          "formation": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object"
          },
          "pinned": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Event": {
        "properties": {
          "actor": {
            "type": "string"
          },
          "app": {
            "type": "string"
          },
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "additionalProperties": {},
            "type": "object"
          },
          "env": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "transient": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "at",
          "type",
          "summary"
        ],
        "type": "object"
      },
      "EventPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "Exit": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "code": {
            "type": "integer"
          },
          "signal": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "at"
        ],
        "type": "object"
      },
      "FieldProblem": {
        "properties": {
          "detail": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "detail"
        ],
        "type": "object"
      },
      "ForgeApproval": {
        "properties": {
          "commit": {
            "type": "string"
          }
        },
        "required": [
          "commit"
        ],
        "type": "object"
      },
      "ForgeConnect": {
        "properties": {
          "api_url": {
            "type": "string"
          },
          "default_branch": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "no_previews": {
            "type": "boolean"
          },
          "poll": {
            "type": "boolean"
          },
          "token": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "ForgeConnection": {
        "properties": {
          "api_url": {
            "type": "string"
          },
          "app": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "default_branch": {
            "type": "string"
          },
          "has_token": {
            "type": "boolean"
          },
          "hook_url": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "last_error": {
            "type": "string"
          },
          "last_event_at": {
            "format": "date-time",
            "type": "string"
          },
          "poll": {
            "type": "boolean"
          },
          "previews": {
            "type": "boolean"
          },
          "secret": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "app",
          "kind",
          "url",
          "default_branch",
          "hook_url",
          "has_token",
          "previews",
          "poll",
          "created_by",
          "created_at"
        ],
        "type": "object"
      },
      "ForgePull": {
        "properties": {
          "approved_by": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "commit": {
            "type": "string"
          },
          "env": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "from_fork": {
            "type": "boolean"
          },
          "number": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "number",
          "commit",
          "state",
          "updated_at"
        ],
        "type": "object"
      },
      "GitInfo": {
        "properties": {
          "http": {
            "type": "string"
          },
          "ssh": {
            "type": "string"
          }
        },
        "required": [
          "http"
        ],
        "type": "object"
      },
      "Inbox": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Notification"
            },
            "type": "array"
          },
          "unread": {
            "type": "integer"
          }
        },
        "required": [
          "unread",
          "items"
        ],
        "type": "object"
      },
      "Instance": {
        "properties": {
          "healthy": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "index": {
            "type": "integer"
          },
          "last_exit": {
            "$ref": "#/components/schemas/Exit"
          },
          "pid": {
            "type": "integer"
          },
          "port": {
            "type": "integer"
          },
          "process": {
            "type": "string"
          },
          "release": {
            "type": "integer"
          },
          "restarts": {
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "process",
          "index",
          "release",
          "status",
          "healthy",
          "restarts"
        ],
        "type": "object"
      },
      "Invitation": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user",
          "url",
          "expires_at"
        ],
        "type": "object"
      },
      "Isolation": {
        "properties": {
          "cpu": {
            "type": "number"
          },
          "enforced": {
            "type": "boolean"
          },
          "level": {
            "type": "string"
          },
          "memory": {
            "type": "integer"
          },
          "pids": {
            "type": "integer"
          }
        },
        "required": [
          "level",
          "enforced"
        ],
        "type": "object"
      },
      "LogLine": {
        "properties": {
          "index": {
            "type": "integer"
          },
          "instance": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "process": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "stream": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "time": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "time",
          "instance",
          "process",
          "index",
          "stream",
          "text"
        ],
        "type": "object"
      },
      "LoginRequest": {
        "properties": {
          "code": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "LoginResult": {
        "properties": {
          "csrf_token": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user",
          "csrf_token"
        ],
        "type": "object"
      },
      "Me": {
        "properties": {
          "app": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "envs": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "local": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "role"
        ],
        "type": "object"
      },
      "Member": {
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "role"
        ],
        "type": "object"
      },
      "MemberChange": {
        "properties": {
          "role": {
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "MetricChart": {
        "properties": {
          "key": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/MetricLine"
            },
            "type": "array"
          },
          "title": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "title",
          "unit",
          "lines"
        ],
        "type": "object"
      },
      "MetricLine": {
        "properties": {
          "name": {
            "type": "string"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/MetricPoint"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "points"
        ],
        "type": "object"
      },
      "MetricMark": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "by": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "at",
          "version"
        ],
        "type": "object"
      },
      "MetricPoint": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "max": {
            "type": "number"
          },
          "min": {
            "type": "number"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "at",
          "value",
          "min",
          "max"
        ],
        "type": "object"
      },
      "Metrics": {
        "properties": {
          "charts": {
            "items": {
              "$ref": "#/components/schemas/MetricChart"
            },
            "type": "array"
          },
          "deployments": {
            "items": {
              "$ref": "#/components/schemas/MetricMark"
            },
            "type": "array"
          },
          "from": {
            "format": "date-time",
            "type": "string"
          },
          "step": {
            "type": "integer"
          },
          "to": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to",
          "step",
          "charts",
          "deployments"
        ],
        "type": "object"
      },
      "NewApp": {
        "properties": {
          "name": {
            "type": "string"
          },
          "project": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NewDomain": {
        "properties": {
          "address": {
            "type": "string"
          },
          "strip_prefix": {
            "type": "boolean"
          }
        },
        "required": [
          "address"
        ],
        "type": "object"
      },
      "NewEnvironment": {
        "properties": {
          "branch": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NewNotificationChannel": {
        "properties": {
          "from": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "port": {
            "type": "integer"
          },
          "to": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "type": "object"
      },
      "NewNotificationRule": {
        "properties": {
          "app": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "project": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "events"
        ],
        "type": "object"
      },
      "NewPreview": {
        "properties": {
          "branch": {
            "type": "string"
          }
        },
        "required": [
          "branch"
        ],
        "type": "object"
      },
      "NewProject": {
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NewRun": {
        "properties": {
          "command": {
            "type": "string"
          },
          "timeout": {
            "type": "string"
          }
        },
        "required": [
          "command"
        ],
        "type": "object"
      },
      "NewSSHKey": {
        "properties": {
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "public_key"
        ],
        "type": "object"
      },
      "NewShareLink": {
        "properties": {
          "expires": {
            "type": "string"
          },
          "max_uses": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "NewTelemetrySink": {
        "properties": {
          "address": {
            "type": "string"
          },
          "app": {
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "kind": {
            "type": "string"
          },
          "logs": {
            "type": "boolean"
          },
          "metrics": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "address",
          "logs",
          "metrics"
        ],
        "type": "object"
      },
      "NewThreshold": {
        "properties": {
          "above": {
            "type": "number"
          },
          "metric": {
            "type": "string"
          },
          "minutes": {
            "type": "integer"
          }
        },
        "required": [
          "metric",
          "above"
        ],
        "type": "object"
      },
      "NewToken": {
        "properties": {
          "app": {
            "type": "string"
          },
          "envs": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "scopes"
        ],
        "type": "object"
      },
      "NewUser": {
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "Notification": {
        "properties": {
          "app": {
            "type": "string"
          },
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "env": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "read_at": {
            "format": "date-time",
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "summary",
          "at"
        ],
        "type": "object"
      },
      "NotificationChannel": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sent_at": {
            "format": "date-time",
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind"
        ],
        "type": "object"
      },
      "NotificationRule": {
        "properties": {
          "app": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "project": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "channel",
          "events",
          "created_by",
          "created_at"
        ],
        "type": "object"
      },
      "PasswordChange": {
        "properties": {
          "current": {
            "type": "string"
          },
          "new": {
            "type": "string"
          }
        },
        "required": [
          "current",
          "new"
        ],
        "type": "object"
      },
      "Problem": {
        "properties": {
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/FieldProblem"
            },
            "type": "array"
          },
          "output": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "status"
        ],
        "type": "object"
      },
      "Project": {
        "properties": {
          "apps": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "everyone": {
            "type": "string"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "viewers_see_logs": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "viewers_see_logs",
          "created_at"
        ],
        "type": "object"
      },
      "ProjectChange": {
        "properties": {
          "everyone": {
            "type": "string"
          },
          "viewers_see_logs": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Promotion": {
        "properties": {
          "from": {
            "type": "string"
          }
        },
        "required": [
          "from"
        ],
        "type": "object"
      },
      "Registry": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "host",
          "username",
          "created_at"
        ],
        "type": "object"
      },
      "RegistryLogin": {
        "properties": {
          "password": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "password"
        ],
        "type": "object"
      },
      "Release": {
        "properties": {
          "build": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "current": {
            "type": "boolean"
          },
          "files": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "version",
          "build",
          "reason",
          "files",
          "size",
          "created_at",
          "current"
        ],
        "type": "object"
      },
      "ReleaseDetail": {
        "properties": {
          "build": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "current": {
            "type": "boolean"
          },
          "files": {
            "type": "integer"
          },
          "manifest": {
            "type": "string"
          },
          "plan": {},
          "reason": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "version",
          "build",
          "reason",
          "files",
          "size",
          "created_at",
          "current",
          "manifest",
          "plan"
        ],
        "type": "object"
      },
      "ReleaseDiff": {
        "properties": {
          "build_changed": {
            "type": "boolean"
          },
          "from": {
            "type": "integer"
          },
          "manifest": {
            "items": {
              "$ref": "#/components/schemas/DiffLine"
            },
            "type": "array"
          },
          "to": {
            "type": "integer"
          },
          "vars": {
            "items": {
              "$ref": "#/components/schemas/VarDiff"
            },
            "type": "array"
          }
        },
        "required": [
          "from",
          "to",
          "build_changed",
          "manifest",
          "vars"
        ],
        "type": "object"
      },
      "ReleasePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Release"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "RevealedVar": {
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "RollbackRequest": {
        "properties": {
          "version": {
            "type": "integer"
          },
          "with_config": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Run": {
        "properties": {
          "app": {
            "type": "string"
          },
          "command": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "env": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "exit_code": {
            "type": "integer"
          },
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "job": {
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "trigger": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "app",
          "env",
          "command",
          "trigger",
          "status",
          "started_at"
        ],
        "type": "object"
      },
      "SSHKey": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "fingerprint": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "fingerprint",
          "public_key",
          "created_at"
        ],
        "type": "object"
      },
      "SSOConfig": {
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string"
          },
          "email_domains": {
            "type": "string"
          },
          "group_claim": {
            "type": "string"
          },
          "group_rules": {
            "type": "string"
          },
          "has_secret": {
            "type": "boolean"
          },
          "issuer": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "passwords_off": {
            "type": "boolean"
          },
          "provision": {
            "type": "boolean"
          },
          "redirect_url": {
            "type": "string"
          },
          "scopes": {
            "type": "string"
          },
          "trust_emails": {
            "type": "boolean"
          }
        },
        "required": [
          "issuer",
          "client_id",
          "has_secret",
          "provision",
          "passwords_off"
        ],
        "type": "object"
      },
      "ServerConfig": {
        "properties": {
          "backups": {
            "$ref": "#/components/schemas/ConfigBackups"
          },
          "channels": {
            "items": {
              "$ref": "#/components/schemas/ConfigChannel"
            },
            "type": "array"
          },
          "format": {
            "type": "integer"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ConfigProject"
            },
            "type": "array"
          },
          "registries": {
            "items": {
              "$ref": "#/components/schemas/ConfigRegistry"
            },
            "type": "array"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/ConfigRule"
            },
            "type": "array"
          },
          "sign_in": {
            "$ref": "#/components/schemas/ConfigSignIn"
          },
          "sinks": {
            "items": {
              "$ref": "#/components/schemas/ConfigSink"
            },
            "type": "array"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/ConfigUser"
            },
            "type": "array"
          }
        },
        "required": [
          "format"
        ],
        "type": "object"
      },
      "ServerInfo": {
        "properties": {
          "containers": {
            "$ref": "#/components/schemas/ContainerEngine"
          },
          "git": {
            "$ref": "#/components/schemas/GitInfo"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "git",
          "containers"
        ],
        "type": "object"
      },
      "Service": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "memory_bytes": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "old_volume": {
            "type": "string"
          },
          "port": {
            "type": "integer"
          },
          "running": {
            "type": "boolean"
          },
          "state": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "unknown": {
            "type": "boolean"
          },
          "unused": {
            "type": "boolean"
          },
          "variable": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "image",
          "variable",
          "port",
          "state",
          "running",
          "created_at"
        ],
        "type": "object"
      },
      "ServiceChange": {
        "properties": {
          "log": {
            "type": "string"
          }
        },
        "required": [
          "log"
        ],
        "type": "object"
      },
      "ServiceLog": {
        "properties": {
          "log": {
            "type": "string"
          }
        },
        "required": [
          "log"
        ],
        "type": "object"
      },
      "ServiceUpgrade": {
        "properties": {
          "image": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "Session": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "last_seen_at",
          "expires_at"
        ],
        "type": "object"
      },
      "ShareLink": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "max_uses": {
            "type": "integer"
          },
          "revoked_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "uses": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "created_by",
          "created_at",
          "expires_at",
          "uses"
        ],
        "type": "object"
      },
      "TelemetrySink": {
        "properties": {
          "address": {
            "type": "string"
          },
          "app": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "dropped": {
            "type": "integer"
          },
          "has_headers": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "last_error": {
            "type": "string"
          },
          "last_sent_at": {
            "format": "date-time",
            "type": "string"
          },
          "logs": {
            "type": "boolean"
          },
          "metrics": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "address",
          "has_headers",
          "logs",
          "metrics",
          "dropped",
          "created_by",
          "created_at"
        ],
        "type": "object"
      },
      "Threshold": {
        "properties": {
          "above": {
            "type": "number"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "firing": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "minutes": {
            "type": "integer"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "metric",
          "label",
          "above",
          "minutes",
          "firing",
          "created_by",
          "created_at"
        ],
        "type": "object"
      },
      "Token": {
        "properties": {
          "app": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "envs": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "scopes",
          "created_at"
        ],
        "type": "object"
      },
      "User": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "disabled": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "role",
          "created_at"
        ],
        "type": "object"
      },
      "UserChange": {
        "properties": {
          "disabled": {
            "type": "boolean"
          },
          "role": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "Var": {
        "properties": {
          "build": {
            "type": "boolean"
          },
          "declared": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "missing": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "overridden": {
            "type": "boolean"
          },
          "secret": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_by": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "source"
        ],
        "type": "object"
      },
      "VarDiff": {
        "properties": {
          "change": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "secret": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "change"
        ],
        "type": "object"
      },
      "VarSet": {
        "properties": {
          "build": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "production_only": {
            "type": "boolean"
          },
          "secret": {
            "type": "boolean"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "VarsChange": {
        "properties": {
          "all_envs": {
            "type": "boolean"
          },
          "no_restart": {
            "type": "boolean"
          },
          "set": {
            "items": {
              "$ref": "#/components/schemas/VarSet"
            },
            "type": "array"
          },
          "unset": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "VarsResult": {
        "properties": {
          "app": {
            "type": "string"
          },
          "app_created": {
            "type": "boolean"
          },
          "deployment": {
            "$ref": "#/components/schemas/Deployment"
          },
          "env": {
            "type": "string"
          },
          "not_set": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "app",
          "env"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "session": {
        "description": "A browser's session; requests that change anything also send the X-CSRF-Token header.",
        "in": "cookie",
        "name": "__Host-moorage_session",
        "type": "apiKey"
      },
      "token": {
        "description": "An API token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The REST API of a Moorage server. Lists that can grow are paged with ?limit and ?cursor. Errors are application/problem+json documents with a stable code.",
    "title": "Moorage API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/apps": {
      "get": {
        "operationId": "getApps",
        "parameters": [
          {
            "description": "The next_cursor of the previous page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many items to return (at most 200).",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppPage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List the apps",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postApps",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewApp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Create an app in a project; deploying also creates one, in the default project",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}": {
      "delete": {
        "operationId": "deleteAppsApp",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true keeps its data directory.",
            "in": "query",
            "name": "keep_data",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Delete an app and everything of it; keep_data=true keeps its data directory",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      },
      "get": {
        "operationId": "getAppsApp",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInfo"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "An app, its project, and how much room it takes",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "patch": {
        "operationId": "patchAppsApp",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Move an app to another project, or rename it, which restarts it",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs": {
      "get": {
        "operationId": "getAppsAppEnvs",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Environment"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an app's environments",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postAppsAppEnvs",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEnvironment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Make a named environment",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}": {
      "delete": {
        "operationId": "deleteAppsAppEnvsEnv",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove an environment that is not production, and everything of it: a preview takes a deployer, and a named environment a maintainer",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      },
      "get": {
        "operationId": "getAppsAppEnvsEnv",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "How an environment stands: its release, formation and instances",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "patch": {
        "operationId": "patchAppsAppEnvsEnv",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Scale an environment: how many instances of which process run",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/access": {
      "get": {
        "operationId": "getAppsAppEnvsEnvAccess",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Access"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Who may reach an environment",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "put": {
        "operationId": "putAppsAppEnvsEnvAccess",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Access"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Change who may reach an environment, at once",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/cron": {
      "get": {
        "operationId": "getAppsAppEnvsEnvCron",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CronJob"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's cron jobs, with when each next runs and how the last one went",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/cron/{job}/run": {
      "post": {
        "operationId": "postAppsAppEnvsEnvCronJobRun",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Run a cron job now",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/deployments": {
      "get": {
        "operationId": "getAppsAppEnvsEnvDeployments",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many items to return (at most 200).",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentPage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's deployments, newest first",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postAppsAppEnvsEnvDeployments",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "description": "Source alone (source), or a plan followed by its files (plan, then archive). Files are a gzip-compressed tar.",
                "properties": {
                  "archive": {
                    "contentEncoding": "binary",
                    "type": "string"
                  },
                  "plan": {
                    "type": "string"
                  },
                  "source": {
                    "contentEncoding": "binary",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Deploy uploaded files, creating the app if it does not exist",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/domains": {
      "get": {
        "operationId": "getAppsAppEnvsEnvDomains",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Domain"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's domains",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postAppsAppEnvsEnvDomains",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDomain"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Domain"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Attach a domain, which serves once its DNS points here",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/domains/remove": {
      "post": {
        "operationId": "postAppsAppEnvsEnvDomainsRemove",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDomain"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Detach a domain",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/domains/verify": {
      "post": {
        "operationId": "postAppsAppEnvsEnvDomainsVerify",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDomain"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Domain"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Look now at where a domain points",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/files": {
      "delete": {
        "operationId": "deleteAppsAppEnvsEnvFiles",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "What.",
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true takes a directory with all that is in it.",
            "in": "query",
            "name": "recursive",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove something from a data directory",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      },
      "get": {
        "operationId": "getAppsAppEnvsEnvFiles",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Where, from the top of it.",
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataListing"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List a directory within an environment's data directory",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/files/content": {
      "get": {
        "operationId": "getAppsAppEnvsEnvFilesContent",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which.",
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Read a file in a data directory",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      },
      "put": {
        "operationId": "putAppsAppEnvsEnvFilesContent",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Where.",
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true takes the place of what is there.",
            "in": "query",
            "name": "replace",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataFile"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Write a file in a data directory, up to 1 GB: it appears all at once",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/files/directory": {
      "post": {
        "operationId": "postAppsAppEnvsEnvFilesDirectory",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Where.",
            "in": "query",
            "name": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Make a directory in a data directory",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/instances": {
      "get": {
        "operationId": "getAppsAppEnvsEnvInstances",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Instance"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's instances",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/lock": {
      "post": {
        "operationId": "postAppsAppEnvsEnvLock",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Stop deployments to an environment",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/logs": {
      "get": {
        "operationId": "getAppsAppEnvsEnvLogs",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only lines after this moment, for a follower that reconnects.",
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 sends it as a file to keep, of up to 200,000 lines.",
            "in": "query",
            "name": "download",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true keeps the stream open.",
            "in": "query",
            "name": "follow",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "text sends plain text in place of NDJSON.",
            "in": "query",
            "name": "format",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the lines with this text, whatever its case.",
            "in": "query",
            "name": "grep",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this instance's lines: its number or its ID.",
            "in": "query",
            "name": "instance",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true keeps the lines that report a problem: errors, warnings, standard error, and requests that failed.",
            "in": "query",
            "name": "problems",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this process's lines.",
            "in": "query",
            "name": "process",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only lines since then: how long ago (15m, 2h, 7d) or a moment.",
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Which sources, separated by commas: stdout, stderr, moorage, build, access and events. The first three unless asked.",
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many of the latest lines to start with.",
            "in": "query",
            "name": "tail",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only lines until then.",
            "in": "query",
            "name": "until",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/LogLine"
                }
              }
            },
            "description": "A stream of lines, each a JSON document."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Stream an environment's logs",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "logs"
      }
    },
    "/apps/{app}/envs/{env}/metrics": {
      "get": {
        "operationId": "getAppsAppEnvsEnvMetrics",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metrics"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "What an environment did over a range (range= live, 1h, 24h, 7d or 30d): requests, response times, CPU and memory, with its deployments",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/promote": {
      "post": {
        "operationId": "postAppsAppEnvsEnvPromote",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Promotion"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Release the build another environment runs",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/redeploy": {
      "post": {
        "operationId": "postAppsAppEnvsEnvRedeploy",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            },
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Build what the current release was built from again, and roll it out",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/releases": {
      "get": {
        "operationId": "getAppsAppEnvsEnvReleases",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many items to return (at most 200).",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleasePage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's releases, newest first",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/releases/{version}": {
      "get": {
        "operationId": "getAppsAppEnvsEnvReleasesVersion",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseDetail"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "A release, and, for those who can deploy, its manifest",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/releases/{version}/diff/{other}": {
      "get": {
        "operationId": "getAppsAppEnvsEnvReleasesVersionDiffOther",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "other",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseDiff"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "What changed from one release to another; of variables, their names only, and all but whether the build changed is for those who can deploy",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/restart": {
      "post": {
        "operationId": "postAppsAppEnvsEnvRestart",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Instance"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Replace an environment's instances",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/rollback": {
      "post": {
        "operationId": "postAppsAppEnvsEnvRollback",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RollbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Serve an earlier release again",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/runs": {
      "get": {
        "operationId": "getAppsAppEnvsEnvRuns",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Run"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's runs, newest first; job= is those of a cron job",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postAppsAppEnvsEnvRuns",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Run a command in the current release, with its variables and data",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/services": {
      "get": {
        "operationId": "getAppsAppEnvsEnvServices",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Service"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's services",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}": {
      "delete": {
        "operationId": "deleteAppsAppEnvsEnvServicesName",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove a service, with what it holds",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}/back": {
      "post": {
        "operationId": "postAppsAppEnvsEnvServicesNameBack",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Put a service back on what it held before its last upgrade or restore, losing what it has held since",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}/logs": {
      "get": {
        "operationId": "getAppsAppEnvsEnvServicesNameLogs",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many lines: 100, unless it says, and at most 5,000.",
            "in": "query",
            "name": "tail",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceLog"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Read the newest of what a service has said",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "logs"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}/old-volume": {
      "delete": {
        "operationId": "deleteAppsAppEnvsEnvServicesNameOldVolume",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Let go of what a service held before its last upgrade or restore",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}/restore": {
      "post": {
        "operationId": "postAppsAppEnvsEnvServicesNameRestore",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Put a service back to its latest dump, with what connects to it stopped",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}/update": {
      "post": {
        "operationId": "postAppsAppEnvsEnvServicesNameUpdate",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceChange"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Take the newest image of a service's version",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/services/{name}/upgrade": {
      "post": {
        "operationId": "postAppsAppEnvsEnvServicesNameUpgrade",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceUpgrade"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceChange"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Move a service to a newer major version, with what connects to it stopped",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/share-links": {
      "get": {
        "operationId": "getAppsAppEnvsEnvShareLinks",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ShareLink"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's share links",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      },
      "post": {
        "operationId": "postAppsAppEnvsEnvShareLinks",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewShareLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLink"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Make a link that lets someone reach an environment: the answer alone has its address",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/share-links/{id}": {
      "delete": {
        "operationId": "deleteAppsAppEnvsEnvShareLinksId",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "End a share link, and within a minute everyone it let in",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/sleep": {
      "post": {
        "operationId": "postAppsAppEnvsEnvSleep",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Stop an environment's instances until a request wakes it",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/terminal": {
      "get": {
        "operationId": "getAppsAppEnvsEnvTerminal",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How wide the terminal is.",
            "in": "query",
            "name": "cols",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "What to run.",
            "in": "query",
            "name": "command",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A running container to run it in, rather than a new one-off instance.",
            "in": "query",
            "name": "instance",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How tall the terminal is.",
            "in": "query",
            "name": "rows",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The kind of terminal it is.",
            "in": "query",
            "name": "term",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How long it may take, such as 10m.",
            "in": "query",
            "name": "timeout",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1 gives it a terminal. Otherwise it has pipes.",
            "in": "query",
            "name": "tty",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Run a command with someone at the other end of it, as moor run -it does. It becomes a WebSocket, with what is typed and shown in binary messages, and TerminalMessage in text ones. This takes a token, and not a session",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/thresholds": {
      "get": {
        "operationId": "getAppsAppEnvsEnvThresholds",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Threshold"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List when someone is told about how an environment is doing",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postAppsAppEnvsEnvThresholds",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewThreshold"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Threshold"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Say when to tell someone about how an environment is doing",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/thresholds/{id}": {
      "delete": {
        "operationId": "deleteAppsAppEnvsEnvThresholdsId",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove a threshold",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/unlock": {
      "post": {
        "operationId": "postAppsAppEnvsEnvUnlock",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Let deployments to an environment go on",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/envs/{env}/vars": {
      "get": {
        "operationId": "getAppsAppEnvsEnvVars",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Var"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an environment's variables; a secret's value is never shown",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      },
      "patch": {
        "operationId": "patchAppsAppEnvsEnvVars",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VarsChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VarsResult"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Set and unset variables, released at once unless no_restart is set",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/vars/{name}/reveal": {
      "post": {
        "operationId": "postAppsAppEnvsEnvVarsNameReveal",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevealedVar"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Read a secret's value, which is recorded",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/envs/{env}/wake": {
      "post": {
        "operationId": "postAppsAppEnvsEnvWake",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "env",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Start an environment that is asleep, and answer when it is ready",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/forge": {
      "delete": {
        "operationId": "deleteAppsAppForge",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Let go of an app's repository: what it deployed stays",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      },
      "get": {
        "operationId": "getAppsAppForge",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForgeConnection"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Say where an app's code is kept, on a forge",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      },
      "put": {
        "operationId": "putAppsAppForge",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeConnect"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForgeConnection"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Connect an app to a repository on a forge: the answer alone has the secret that its webhook signs with",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/forge/pulls": {
      "get": {
        "operationId": "getAppsAppForgePulls",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ForgePull"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List an app's open pull requests",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/forge/pulls/{number}/approve": {
      "post": {
        "operationId": "postAppsAppForgePullsNumberApprove",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgeApproval"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForgePull"
                }
              }
            },
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Have a pull request built at the commit that someone looked at, which runs its code: this is for that one commit",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/apps/{app}/forge/sync": {
      "post": {
        "operationId": "postAppsAppForgeSync",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Look at an app's repository now, and deploy what has changed",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/previews": {
      "post": {
        "operationId": "postAppsAppPreviews",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPreview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            },
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Deploy a preview of a branch that was pushed",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/apps/{app}/runs/{id}": {
      "get": {
        "operationId": "getAppsAppRunsId",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "How a run went",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/apps/{app}/runs/{id}/log": {
      "get": {
        "operationId": "getAppsAppRunsIdLog",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/LogLine"
                }
              }
            },
            "description": "A stream of lines, each a JSON document."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "What a run says, as NDJSON; follow=true stays open until it ends",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "logs"
      }
    },
    "/apps/{app}/runs/{id}/stop": {
      "post": {
        "operationId": "postAppsAppRunsIdStop",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Stop a run that is going on",
        "tags": [
          "apps"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/audit": {
      "get": {
        "operationId": "getAudit",
        "parameters": [
          {
            "description": "Only actions with this text.",
            "in": "query",
            "name": "action",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only what this person did.",
            "in": "query",
            "name": "actor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Where the previous page ended.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many, up to 200.",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only what was done to this.",
            "in": "query",
            "name": "target",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditEntryPage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List who did what, newest first",
        "tags": [
          "audit"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/auth/device": {
      "post": {
        "operationId": "postAuthDevice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceAuthorization"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [],
        "summary": "Begin a CLI's sign-in, to approve in a browser",
        "tags": [
          "auth"
        ],
        "x-moorage-permission": "public"
      }
    },
    "/auth/device/token": {
      "post": {
        "operationId": "postAuthDeviceToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceToken"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [],
        "summary": "Ask whether a CLI's sign-in has been approved, and get its token",
        "tags": [
          "auth"
        ],
        "x-moorage-permission": "public"
      }
    },
    "/auth/login": {
      "post": {
        "operationId": "postAuthLogin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [],
        "summary": "Sign in with an email address and password, starting a session",
        "tags": [
          "auth"
        ],
        "x-moorage-permission": "public"
      }
    },
    "/auth/logout": {
      "post": {
        "operationId": "postAuthLogout",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "End the session, or revoke the token, in use",
        "tags": [
          "auth"
        ],
        "x-moorage-permission": "signed-in"
      }
    },
    "/deployments/{id}": {
      "get": {
        "operationId": "getDeploymentsId",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deployment"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Get a deployment",
        "tags": [
          "deployments"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/deployments/{id}/log": {
      "get": {
        "operationId": "getDeploymentsIdLog",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true keeps the stream open until the deployment ends.",
            "in": "query",
            "name": "follow",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Leave out this many of the first lines.",
            "in": "query",
            "name": "skip",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "$ref": "#/components/schemas/LogLine"
                }
              }
            },
            "description": "A stream of lines, each a JSON document."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Stream a deployment's log",
        "tags": [
          "deployments"
        ],
        "x-moorage-permission": "logs"
      }
    },
    "/events": {
      "get": {
        "operationId": "getEvents",
        "parameters": [
          {
            "description": "Only what happened to this app.",
            "in": "query",
            "name": "app",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The next_cursor of the previous page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only what happened to this environment.",
            "in": "query",
            "name": "env",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many items to return (at most 200).",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List what happened, newest first",
        "tags": [
          "events"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/events/stream": {
      "get": {
        "operationId": "getEventsStream",
        "parameters": [
          {
            "description": "Start after this event's ID, as the Last-Event-ID header also does.",
            "in": "query",
            "name": "after",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only what happens to this app.",
            "in": "query",
            "name": "app",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only what happens to this environment.",
            "in": "query",
            "name": "env",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            },
            "description": "Server-sent events, whose data is each a JSON document and whose id is the event's."
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Follow what happens, as server-sent events",
        "tags": [
          "events"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/hooks/{hook}": {
      "post": {
        "operationId": "postHooksHook",
        "parameters": [
          {
            "in": "path",
            "name": "hook",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [],
        "summary": "Where a forge sends what happens, signed with the hook's secret",
        "tags": [
          "hooks"
        ],
        "x-moorage-permission": "public"
      }
    },
    "/me": {
      "get": {
        "operationId": "getMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Who the caller is",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "signed-in"
      }
    },
    "/me/password": {
      "post": {
        "operationId": "postMePassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Change your password, which ends your other sessions",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/me/sessions": {
      "delete": {
        "operationId": "deleteMeSessions",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "End your sessions but the one in use",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      },
      "get": {
        "operationId": "getMeSessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Session"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List your sessions",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/me/sessions/{session}": {
      "delete": {
        "operationId": "deleteMeSessionsSession",
        "parameters": [
          {
            "in": "path",
            "name": "session",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "End one of your sessions",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/me/ssh-keys": {
      "get": {
        "operationId": "getMeSshKeys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SSHKey"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List your SSH keys",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      },
      "post": {
        "operationId": "postMeSshKeys",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewSSHKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKey"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Register an SSH key",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/me/ssh-keys/{key}": {
      "delete": {
        "operationId": "deleteMeSshKeysKey",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSHKey"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove one of your SSH keys, by name or fingerprint",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/me/tokens": {
      "get": {
        "operationId": "getMeTokens",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Token"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List your API tokens",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      },
      "post": {
        "operationId": "postMeTokens",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewToken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedToken"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Create an API token; its secret is shown this once",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/me/tokens/{token}": {
      "delete": {
        "operationId": "deleteMeTokensToken",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Revoke one of your API tokens, by name or ID",
        "tags": [
          "me"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/notifications": {
      "get": {
        "operationId": "getNotifications",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Inbox"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "What you have been told, newest first",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/notifications/channels": {
      "get": {
        "operationId": "getNotificationsChannels",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationChannel"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List where notifications can go; where each one goes is for administrators",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postNotificationsChannels",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewNotificationChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedChannel"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Add a channel; the answer has what signs a webhook, which is not shown again",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/notifications/channels/{channel}": {
      "delete": {
        "operationId": "deleteNotificationsChannelsChannel",
        "parameters": [
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove a channel, and the rules that use it",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/notifications/channels/{channel}/test": {
      "post": {
        "operationId": "postNotificationsChannelsChannelTest",
        "parameters": [
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannel"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Send a channel a test, and say how it went",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/notifications/read": {
      "post": {
        "operationId": "postNotificationsRead",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Mark all you have been told as read",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "deploy"
      }
    },
    "/notifications/rules": {
      "get": {
        "operationId": "getNotificationsRules",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationRule"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List the rules you can see",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postNotificationsRules",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewNotificationRule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationRule"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Add a rule: of the whole server, which takes an admin, or of a project or an app, which takes a maintainer of it",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/notifications/rules/{rule}": {
      "delete": {
        "operationId": "deleteNotificationsRulesRule",
        "parameters": [
          {
            "in": "path",
            "name": "rule",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Remove a rule",
        "tags": [
          "notifications"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenapiJson",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [],
        "summary": "This API's OpenAPI document",
        "tags": [
          "openapi.json"
        ],
        "x-moorage-permission": "public"
      }
    },
    "/previews": {
      "get": {
        "operationId": "getPreviews",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Environment"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List the previews you can see, of every app",
        "tags": [
          "previews"
        ],
        "x-moorage-permission": "read"
      }
    },
    "/projects": {
      "get": {
        "operationId": "getProjects",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List the projects you have a role in",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "read"
      },
      "post": {
        "operationId": "postProjects",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewProject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Create a project",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/projects/{project}": {
      "delete": {
        "operationId": "deleteProjectsProject",
        "parameters": [
          {
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Delete a project that has no apps",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "server-admin"
      },
      "get": {
        "operationId": "getProjectsProject",
        "parameters": [
          {
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Get a project, with its members",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "read"
      },
      "patch": {
        "operationId": "patchProjectsProject",
        "parameters": [
          {
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Change who may do what in a project without being a member",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/projects/{project}/members/{user}": {
      "delete": {
        "operationId": "deleteProjectsProjectMembersUser",
        "parameters": [
          {
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Take someone out of a project",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "admin"
      },
      "put": {
        "operationId": "putProjectsProjectMembersUser",
        "parameters": [
          {
            "in": "path",
            "name": "project",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Give someone a role in a project, by email address or ID",
        "tags": [
          "projects"
        ],
        "x-moorage-permission": "admin"
      }
    },
    "/registries": {
      "get": {
        "operationId": "getRegistries",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Registry"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List the container registries the server has credentials for",
        "tags": [
          "registries"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/registries/{host}": {
      "delete": {
        "operationId": "deleteRegistriesHost",
        "parameters": [
          {
            "in": "path",
            "name": "host",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Forget the credentials of a container registry",
        "tags": [
          "registries"
        ],
        "x-moorage-permission": "server-admin"
      },
      "put": {
        "operationId": "putRegistriesHost",
        "parameters": [
          {
            "in": "path",
            "name": "host",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegistryLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Registry"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Store the credentials of a container registry",
        "tags": [
          "registries"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server": {
      "get": {
        "operationId": "getServer",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInfo"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "The server's version and the prefixes of the apps' git remotes",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "signed-in"
      }
    },
    "/server/backups": {
      "get": {
        "operationId": "getServerBackups",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Backups"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Where backups go, and what has been backed up",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      },
      "post": {
        "operationId": "postServerBackups",
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Backup"
                }
              }
            },
            "description": "Accepted"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Start a backup",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/backups/config": {
      "put": {
        "operationId": "putServerBackupsConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Backups"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Say where backups go and how often",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/config": {
      "get": {
        "operationId": "getServerConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerConfig"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Read the server's settings, with no secrets in them",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/config/import": {
      "post": {
        "operationId": "postServerConfigImport",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigReport"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Make the server match a configuration, in what it mentions, or with dry_run say what that would do",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/doctor": {
      "get": {
        "operationId": "getServerDoctor",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Check"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Check the server and what it depends on, as moor server doctor does",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/sso": {
      "delete": {
        "operationId": "deleteServerSso",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Turn off signing in through a provider, which gives passwords back",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      },
      "get": {
        "operationId": "getServerSso",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfig"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "How people sign in through a provider",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      },
      "put": {
        "operationId": "putServerSso",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOConfig"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfig"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Set up signing in through a provider, once it has been found at its address",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/telemetry": {
      "get": {
        "operationId": "getServerTelemetry",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TelemetrySink"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List where what apps say and do is sent",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      },
      "post": {
        "operationId": "postServerTelemetry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewTelemetrySink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetrySink"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Add somewhere to send what apps say and do, or change the one of that name",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/telemetry/{name}": {
      "delete": {
        "operationId": "deleteServerTelemetryName",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Stop sending to a sink",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/server/telemetry/{name}/test": {
      "post": {
        "operationId": "postServerTelemetryNameTest",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Send something to a sink now, and say how that went",
        "tags": [
          "server"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/users": {
      "get": {
        "operationId": "getUsers",
        "parameters": [
          {
            "description": "The next_cursor of the previous page.",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "How many items to return (at most 200).",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "List the users",
        "tags": [
          "users"
        ],
        "x-moorage-permission": "server-admin"
      },
      "post": {
        "operationId": "postUsers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Create a user, with an invitation to choose a password",
        "tags": [
          "users"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/users/{user}": {
      "patch": {
        "operationId": "patchUsersUser",
        "parameters": [
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Change a user's role, or disable or enable them",
        "tags": [
          "users"
        ],
        "x-moorage-permission": "server-admin"
      }
    },
    "/users/{user}/invitation": {
      "post": {
        "operationId": "postUsersUserInvitation",
        "parameters": [
          {
            "in": "path",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "$ref": "#/components/responses/Problem"
          },
          "403": {
            "$ref": "#/components/responses/Problem"
          },
          "default": {
            "$ref": "#/components/responses/Problem"
          }
        },
        "security": [
          {
            "token": []
          },
          {
            "session": []
          }
        ],
        "summary": "Make a new one-time link for a user to choose a password",
        "tags": [
          "users"
        ],
        "x-moorage-permission": "server-admin"
      }
    }
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ]
}
