{
  "openapi": "3.1.0",
  "info": {
    "title": "rueder",
    "description": "The HTTP interface of a rueder server: the API the web page lives on, under\n`/api`, and the Google Reader API for feed reader apps of other makers, under\n`/greader`. This description is written from the server's code\n(`server/src/openapi.rs` and the `#[utoipa::path]` of each handler), so it\nlists every route the server answers, besides the files of the page.\n\n## Logging in\n\n- **The page's API** (`/api`) knows a reader by the session cookie\n  `__Host-rueder`, which `POST /api/login` (or a passkey, or OpenID Connect)\n  sets. It is `HttpOnly`, `Secure` and `SameSite=Lax`, so it needs HTTPS, or\n  `http://localhost` while developing.\n- **A request that changes something** (anything but `GET`, `HEAD` and\n  `OPTIONS`) is refused with 403 if a browser says it comes from a page of\n  another site: by `Sec-Fetch-Site`, or by an `Origin` that is not this\n  server. A request without either, such as one from a script, passes this\n  check.\n- **The Google Reader API** (`/greader`) knows an app by an app password,\n  which the reader makes in the page's settings (Settings, Apps).\n  `POST /greader/accounts/ClientLogin` takes the account's name and the app\n  password as a form and answers with `Auth=<token>`; every other request\n  names that token in `Authorization: GoogleLogin auth=<token>`. No cookie\n  counts there.\n- **The metrics for Prometheus** (`/metrics`) are there only where the\n  operator set `METRICS_TOKEN`, and only for a request that names that token\n  in `Authorization: Bearer <token>`. Neither a session nor an app password\n  counts there.\n\n## Answers\n\n- What the page's API sends and takes is JSON, except where an operation says\n  otherwise (OPML, the file of an account). The Google Reader API takes forms\n  or query parameters, as the apps send them, and answers with JSON or plain\n  text.\n- **A refusal** has its status and a short plain-text reason, never the\n  details of what went wrong inside: 400 for a request the server cannot\n  use, 401 without a valid session or app password, 403 for what the account\n  may not do, 404 for what is not there or not the account's, 413 for a body\n  over the limit (256 KiB, larger only where an operation says so), 429 with\n  `Retry-After` (in seconds) over a limit, 500 for a fault of the server.\n- **Limits:** every sender and every account has limits on how much it asks\n  of the server; logins, lookups of addresses on the internet and what an\n  account can make more of (feeds, folders, labels, rules, app passwords)\n  have limits of their own.\n- **Live updates:** what changes for an account through either API reaches\n  its open pages over `GET /api/events` (server-sent events).\n\n## Images\n\nEvery image in an article, every thumbnail and icon goes through the server's\nimage proxy, at addresses the server signs: `/img/...` for the page (with the\nsession), `/greader/img/...` for an app (signed for its app password).\nAddresses are never made by hand; they come in what the API sends.\n",
    "license": {
      "name": ""
    },
    "version": "0.1.0"
  },
  "paths": {
    "/api/health": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Whether the server and its database answer, for a health check (also `rueder health` on the command line).",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/api/events": {
      "get": {
        "tags": [
          "Live updates"
        ],
        "summary": "The account's events as they happen.",
        "description": "A stream of server-sent events, one for each change of the account,\nwhichever tab, app or fetch made it. It begins with `hello`. An event names\nwhat changed; the page then asks the API for it again. Events missed while\nthe connection was away are not sent again: a browser that comes back\nloads what it shows anew.",
        "operationId": "stream",
        "responses": {
          "200": {
            "description": "The events, as `text/event-stream`, until the session ends.",
            "content": {
              "text/event-stream": {}
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "429": {
            "description": "Too many open streams for this account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/login": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Logs in with name and password, and with the code of the second factor where the account has one. Answers with who is logged in and sets the session's cookie; a session the browser had before ends.",
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Credentials"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Logged in; the answer sets the cookie `__Host-rueder`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "A wrong name or password (the same answer for both), a wrong code, or `second factor needed`."
          },
          "403": {
            "description": "The account is disabled (`disabled`), or waits for its address to be confirmed (`unconfirmed`); said only after the right password."
          },
          "429": {
            "description": "Too many wrong tries for this name or from this sender; see `Retry-After`."
          }
        }
      }
    },
    "/api/logout": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Ends the session of the request, if it has one, and takes the cookie away.",
        "operationId": "logout",
        "responses": {
          "204": {
            "description": "Logged out; the answer clears the cookie."
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "tags": [
          "Session"
        ],
        "summary": "Who is logged in: the account, what it may do, and what the server offers it.",
        "operationId": "me",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/login/ways": {
      "get": {
        "tags": [
          "Session"
        ],
        "summary": "What the login page asks before anybody is logged in, to know whether to offer the way through the provider. It says nothing about any account.",
        "operationId": "ways",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginWays"
                }
              }
            }
          }
        }
      }
    },
    "/api/login/passkey": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Starts a login with a passkey, for anybody: the device says whose it is.",
        "description": "The answer is what `navigator.credentials.get()` takes; finished with `POST\n/api/login/passkey/finish`.",
        "operationId": "start_login",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyChallenge"
                }
              }
            }
          },
          "404": {
            "description": "This server has no passkeys (`PUBLIC_URL` is not set)."
          },
          "429": {
            "description": "Too many passkey ceremonies open from this sender."
          }
        }
      }
    },
    "/api/login/passkey/finish": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Finishes a login with a passkey: the answer of `POST /api/login`, with the session's cookie, and the session counts as one with a second factor.",
        "operationId": "finish_login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyAnswer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Logged in; the answer sets the cookie `__Host-rueder`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "The passkey is wrong, or belongs to no account here."
          },
          "403": {
            "description": "The account is disabled."
          },
          "404": {
            "description": "This server has no passkeys (`PUBLIC_URL` is not set)."
          },
          "429": {
            "description": "Too many wrong tries from this sender; see `Retry-After`."
          }
        }
      }
    },
    "/api/oidc/start": {
      "get": {
        "tags": [
          "Session"
        ],
        "summary": "Starts logging in through the OpenID Connect provider: sends the browser there. With `link`, from the logged-in reader's own page, the provider's account is linked to this one instead.",
        "operationId": "start",
        "parameters": [
          {
            "name": "link",
            "in": "query",
            "description": "To link the provider's account to the one logged in, instead of\nlogging in: a ticket from `POST /api/oidc/link`, given to this session.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "On to the provider, or back to the page if linking is refused."
          },
          "404": {
            "description": "This server has no OpenID Connect."
          }
        }
      }
    },
    "/api/oidc/link": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Gives the session a ticket to tie an identity at the provider to its account, once the owner showed with their password and, where the second factor is on, a code, or with a passkey, that they are there: a login through the provider asks for no second factor of rueder's own, so a stolen session must not be enough to tie somebody else's identity to the account.",
        "operationId": "link_ticket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OwnerProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OidcLink"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "Password, code or passkey of the account are wrong, `second factor needed`, or `log in again first` for an account without password and second factor in a session that is not young."
          },
          "404": {
            "description": "This server has no OpenID Connect."
          },
          "429": {
            "description": "Too many wrong tries, or too many links under way; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/oidc/callback": {
      "get": {
        "tags": [
          "Session"
        ],
        "summary": "Where the provider sends the browser back: logs in the account linked to the provider's, or links it, and sends the browser on to the page, which says how it went.",
        "operationId": "callback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "The code to exchange for the provider's answer.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "The flow it belongs to, as the start gave it.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "description": "What the provider says went wrong, instead of a code.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Back to the page, logged in, or with what went wrong."
          },
          "404": {
            "description": "This server has no OpenID Connect."
          }
        }
      }
    },
    "/api/tree": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The tree of folders and feeds the account subscribes to, each feed with its unread count and how far it was read, and how many articles filters hid.",
        "operationId": "tree",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tree"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/articles": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "All articles of the account's feeds, a page at a time.",
        "operationId": "all_articles",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before the article of this `id`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Only what arrived after the article of this `id`, the oldest first; 0\nstarts at the oldest article there is. Not together with `before`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/starred": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The articles the reader starred.",
        "operationId": "starred_articles",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before the article of this `id`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Only what arrived after the article of this `id`, the oldest first; 0\nstarts at the oldest article there is. Not together with `before`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/hidden": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The articles the reader's filter rules hid.",
        "operationId": "hidden_articles",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before the article of this `id`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Only what arrived after the article of this `id`, the oldest first; 0\nstarts at the oldest article there is. Not together with `before`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/labels/{label_id}/articles": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The articles with one of the reader's labels.",
        "operationId": "label_articles",
        "parameters": [
          {
            "name": "label_id",
            "in": "path",
            "description": "The label.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before the article of this `id`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Only what arrived after the article of this `id`, the oldest first; 0\nstarts at the oldest article there is. Not together with `before`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such label of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/read": {
      "post": {
        "tags": [
          "Reading"
        ],
        "summary": "Marks everything of the account read, as far as `Upto` says.",
        "operationId": "read_all",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Upto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Marked read."
          },
          "400": {
            "description": "An age out of range."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The articles of one feed the account subscribes to.",
        "operationId": "feed_articles",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before the article of this `id`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Only what arrived after the article of this `id`, the oldest first; 0\nstarts at the oldest article there is. Not together with `before`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "The account does not subscribe to this feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/read": {
      "post": {
        "tags": [
          "Reading"
        ],
        "summary": "Marks a feed read, as far as `Upto` says.",
        "operationId": "read_feed",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Upto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Marked read."
          },
          "400": {
            "description": "An age out of range."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "The account does not subscribe to this feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "One article with its text, as the reader opens it.",
        "operationId": "article",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Article"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such article in a feed of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}/info": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "What the server knows of an article and its versions: its feed, its number and id there, its link, when it was published, fetched and changed, and how many versions are kept, for a message to support.",
        "operationId": "article_info",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArticleInfo"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such article in a feed of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}/source": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The source of an article's current version: as rueder keeps it after cleaning it, and as the feed sent it, with the addresses of its links and pictures as they are, for a reader who looks for what the cleaning missed.",
        "operationId": "article_source",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArticleSource"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such article in a feed of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}/versions": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The earlier versions of an article, when its feed changed it: up to 20, the newest first.",
        "operationId": "versions",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Versions"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such article in a feed of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}/state": {
      "put": {
        "tags": [
          "Reading"
        ],
        "summary": "Marks one article read or unread, starred or not.",
        "operationId": "set_state",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StateChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Changed."
          },
          "400": {
            "description": "Nothing to change."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such article in a feed of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/folders/{folder_id}/articles": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "The articles of the feeds in one folder and the folders inside it.",
        "operationId": "folder_articles",
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "description": "The folder.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before the article of this `id`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Only what arrived after the article of this `id`, the oldest first; 0\nstarts at the oldest article there is. Not together with `before`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such folder of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/folders/{folder_id}/read": {
      "post": {
        "tags": [
          "Reading"
        ],
        "summary": "Marks the feeds of a folder and the folders inside it read, as far as `Upto` says.",
        "operationId": "read_folder",
        "parameters": [
          {
            "name": "folder_id",
            "in": "path",
            "description": "The folder.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Upto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Marked read."
          },
          "400": {
            "description": "An age out of range."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such folder of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/search": {
      "get": {
        "tags": [
          "Reading"
        ],
        "summary": "Searches the articles of the account's feeds for words: in the title, the author, the tags and the text. A page at a time, the newest first.",
        "operationId": "search_articles",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "The words. An article is found if it has all of them in its title, its\nauthor, its tags or its text; a word of three letters or more also\nfinds the words that begin with it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "feed",
            "in": "query",
            "description": "Only in this feed.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "description": "Only in the feeds of this folder and the folders inside it. Not\ntogether with `feed`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "Only what arrived before this `id`: `next` of the page before.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many articles at most: 50 if not said, 200 at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "unread",
            "in": "query",
            "description": "Leave out what was read.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchHits"
                }
              }
            }
          },
          "400": {
            "description": "No words, or `feed` and `folder` together."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "429": {
            "description": "The account searches too much at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/tree/move": {
      "post": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Moves a folder or a feed: before or after another node, or into a folder at its end. A folder does not go into itself, and folders nest at most five levels deep.",
        "operationId": "move_node",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Move"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "A move the tree does not allow."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "A node that is not the account's."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/folders": {
      "post": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "A new, empty folder at the end of its level.",
        "operationId": "add_folder",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewFolder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Created"
                }
              }
            }
          },
          "400": {
            "description": "No title, a title over 100 characters, too deep, or 100 folders already."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such parent folder of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/folders/{id}": {
      "delete": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Takes a folder out. What was in it moves to where the folder was.",
        "operationId": "remove_folder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The folder.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such folder of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Gives a folder another title.",
        "operationId": "rename_folder",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The folder.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rename"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "No title, or one over 100 characters."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such folder of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{id}": {
      "delete": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Ends a subscription, and with it what the reader read, starred and labelled there. The feed and its articles stay for whoever else reads it.",
        "operationId": "unsubscribe",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "The account does not subscribe to this feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Gives a subscription a name of the reader's own, or, without one, the feed's name back.",
        "operationId": "rename_feed",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rename"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "A title over 100 characters."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "The account does not subscribe to this feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{id}/info": {
      "get": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "What the server knows of a feed the account reads and how it is fetched: its number, its addresses, as what and when it was fetched and why that failed, for a message to support.",
        "operationId": "info",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedInfo"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "The account does not subscribe to this feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{id}/agent": {
      "put": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Says as what a feed is fetched: as rueder, or as a browser for sites that turn rueder away. The feed is one for all who read it, so this holds for all of them, and rueder passes for a browser in the name of the whole server: only an admin who reads it says it. The next fetch comes at once.",
        "operationId": "set_agent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAgent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The account is no admin, or an admin without the second factor where the operator asks for it."
          },
          "404": {
            "description": "The account does not subscribe to this feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/settings": {
      "get": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "The reader's settings, as the interface last stored them: the same on every device.",
        "operationId": "settings",
        "responses": {
          "200": {
            "description": "Whatever the interface stored, or an empty object.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "put": {
        "tags": [
          "Feeds and folders"
        ],
        "summary": "Replaces the settings. What is in them is the interface's business; the server only keeps them, within a size.",
        "operationId": "set_settings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "Settings over 16 KiB."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/labels": {
      "get": {
        "tags": [
          "Labels"
        ],
        "summary": "The account's labels, in their order.",
        "operationId": "labels",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Label"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Labels"
        ],
        "summary": "A new label, after the ones that are there.",
        "operationId": "add_label",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewLabel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Created"
                }
              }
            }
          },
          "400": {
            "description": "No title, a title the account has already, a color that is not one of the list, or 100 labels already."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/labels/order": {
      "post": {
        "tags": [
          "Labels"
        ],
        "summary": "Puts the labels in this order. Labels that are not named keep their place among themselves, after the named ones.",
        "operationId": "order_labels",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Order"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "More ids than labels an account can have."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/labels/{id}": {
      "delete": {
        "tags": [
          "Labels"
        ],
        "summary": "Takes a label away, from every article that had it too.",
        "operationId": "remove_label",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The label.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such label of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Labels"
        ],
        "summary": "Changes a label's title or color; what is left out stays.",
        "operationId": "change_label",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The label.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "A title the account has already, or a color that is not one of the list."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such label of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}/labels/{id}": {
      "put": {
        "tags": [
          "Labels"
        ],
        "summary": "Puts a label on an article the reader can read.",
        "operationId": "attach",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The label.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such label of the account, or no such article in a feed of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Labels"
        ],
        "summary": "Takes a label off an article. Taking off what is not on is no error, as long as the label is the reader's.",
        "operationId": "detach",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "The label.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such label of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/rules": {
      "get": {
        "tags": [
          "Filter rules"
        ],
        "summary": "The account's rules, in their order.",
        "operationId": "rules",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Rule"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Filter rules"
        ],
        "summary": "A new rule. It applies to what arrives from now on and to what is there already, and the answer says how many articles it caught.",
        "operationId": "add_rule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleOutcome"
                }
              }
            }
          },
          "400": {
            "description": "A rule that does not hold: no such field or action, a pattern that is no regular expression or over 200 characters, a scope that is not the account's, or 200 rules already."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/rules/order": {
      "post": {
        "tags": [
          "Filter rules"
        ],
        "summary": "Puts the rules in this order, for the list of them: what they decide does not depend on it. Rules that are not named come after the named ones.",
        "operationId": "order_rules",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Order"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/rules/preview": {
      "post": {
        "tags": [
          "Filter rules"
        ],
        "summary": "Tries a rule on what is there without storing it or changing anything. This is also how the interface learns whether a pattern is one.",
        "operationId": "preview",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulePreview"
                }
              }
            }
          },
          "400": {
            "description": "A rule that does not hold: no such field or action, a pattern that is no regular expression or over 200 characters, a scope that is not the account's, or 200 rules already."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/rules/hits": {
      "get": {
        "tags": [
          "Filter rules"
        ],
        "summary": "Counts what each of the account's rules finds. Every article is read once, however many rules there are.",
        "operationId": "hits",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesHits"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "429": {
            "description": "The account asks for too much at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/rules/{id}": {
      "put": {
        "tags": [
          "Filter rules"
        ],
        "summary": "Replaces a rule. What it hid before and does not hide now comes back.",
        "operationId": "change_rule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The rule.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleOutcome"
                }
              }
            }
          },
          "400": {
            "description": "A rule that does not hold: no such field or action, a pattern that is no regular expression or over 200 characters, a scope that is not the account's, or 200 rules already."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such rule of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Filter rules"
        ],
        "summary": "Takes a rule away; what only it hid comes back.",
        "operationId": "remove_rule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The rule.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleOutcome"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such rule of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds": {
      "post": {
        "tags": [
          "Subscribing"
        ],
        "summary": "Subscribes to the feed at an address: 201 with its number, or 200 if the reader has it already. The address has to be the feed itself, or with `page` a web page whose feed RSSifier makes; `find` says which feeds a web page has.",
        "operationId": "subscribe",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewSubscription"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The account reads this feed already.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscribed"
                }
              }
            }
          },
          "201": {
            "description": "Subscribed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscribed"
                }
              }
            }
          },
          "400": {
            "description": "Not a feed, an address the server does not go to, or as many feeds as an account may have (2,000)."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The operator blocked this feed."
          },
          "429": {
            "description": "Too many lookups of addresses; see `Retry-After`."
          },
          "503": {
            "description": "This server does not fetch feeds, or reads no web pages without a feed."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/find": {
      "post": {
        "tags": [
          "Subscribing"
        ],
        "summary": "Looks at an address for feeds. An address that is a feed is the one feed; a web page has the feeds it names, which nobody has looked at yet. A page that names none is, where the server has RSSifier and it finds a list on the page, a feed of its own.",
        "operationId": "find",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindFeeds"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FoundFeeds"
                }
              }
            }
          },
          "400": {
            "description": "Not an address, or one the server does not go to (inside its own network, not http or https)."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "429": {
            "description": "Too many lookups of addresses from this account or sender; see `Retry-After`."
          },
          "503": {
            "description": "This server does not fetch feeds."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/opml": {
      "get": {
        "tags": [
          "Subscribing"
        ],
        "summary": "The account's subscriptions as an OPML file, folders as outlines around their feeds. A web page without a feed is a link (`type=\"link\"`) marked as a page, so that other readers do not take it for a feed.",
        "operationId": "export",
        "responses": {
          "200": {
            "description": "The OPML file, to download.",
            "content": {
              "text/x-opml": {}
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Subscribing"
        ],
        "summary": "Takes the subscriptions of an OPML file, sent as the body. Folders are found by their name or made; feeds the account reads already stay where they are. The feeds are not fetched here: the next round does that.",
        "description": "Up to 1 MiB and 2,000 feeds.",
        "operationId": "import",
        "requestBody": {
          "description": "The OPML file, as `text/x-opml` or XML.",
          "content": {
            "text/x-opml": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpmlImported"
                }
              }
            }
          },
          "400": {
            "description": "Not OPML, or more than it may hold."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "413": {
            "description": "Over 1 MiB."
          },
          "415": {
            "description": "Not sent as `text/x-opml` or XML."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/sessions": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The reader's sessions, the one last used first.",
        "operationId": "own_sessions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Device"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Ends all sessions of the reader but the one that asks.",
        "operationId": "end_others",
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/sessions/{id}": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Ends one of the reader's sessions, by the name the list gave it.",
        "operationId": "end_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The session, as the list names it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such session of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/password": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Gives the reader a new password. That ends every session of the account; the browser that asks gets a new one. It takes the password so far and, where the second factor is on, a code, or a passkey instead of both: a session together with a password that got out must not be enough to lock the owner out. An account without a password and without a second factor sets its first one only in a young session (see `second_factor::prove`).",
        "operationId": "change_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Changed; the answer sets the new session's cookie."
          },
          "400": {
            "description": "A new password that is too short or too long."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "Password, code or passkey of the account are wrong, `second factor needed`, or `log in again first` for an account without password and second factor in a session that is not young."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/account": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Deletes the reader's own account and everything that is its own (see [`accounts::remove`]). Its sessions end, on this device and all others, and so do its connections for live updates, as `events::changed` counts this address as a session that ended. Where the second factor is on, it takes a code as well, as at login: without one the answer is 403 with `second factor needed`, and a wrong one counts like a wrong password. A passkey of the account stands for all of it.",
        "operationId": "remove_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Farewell"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Deleted; the answer clears the cookie."
          },
          "400": {
            "description": "The name typed to confirm is not the account's."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "Password, code or passkey of the account are wrong."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/accounts": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "All accounts, for an admin. Nothing of what they read.",
        "operationId": "all_accounts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Account"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The account is no admin, or an admin without the second factor where the operator asks for it."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Makes an account, as an admin, who shows with their own password and, where the second factor is on, a code, or with a passkey, that they are there: a stolen session of an admin must not be a way to make accounts, admins among them, that outlast it.",
        "operationId": "add_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Created"
                }
              }
            }
          },
          "400": {
            "description": "A name that is taken or not allowed, or a password that is too short or too long."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The account is no admin, or an admin without the second factor where the operator asks for it; or the admin's password, code or passkey are wrong, or `second factor needed`."
          },
          "422": {
            "description": "No `proof`."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/second-factor": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Whether the account has the second factor, by the authenticator app or by passkeys, and how many recovery codes it has left.",
        "operationId": "second_factor",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecondFactor"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Switches the authenticator app off; the owner confirms. Without passkeys, the second factor and its recovery codes go with it.",
        "operationId": "switch_off",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecondFactorSwitchOff"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "Password, code or passkey of the account are wrong."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/second-factor/setup": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Starts setting up the authenticator app: a new secret, as text and as an address for a QR code, which counts once `confirm` has a right code from it.",
        "operationId": "set_up",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecondFactorPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecondFactorSetup"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "Password, code or passkey of the account are wrong."
          },
          "409": {
            "description": "The app is set up already."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/second-factor/confirm": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Confirms the app with a code from it. Where the account had no second factor yet, the answer has its ten recovery codes, shown this once.",
        "operationId": "confirm",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecondFactorCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoveryCodes"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The code is wrong, or no setup is waiting."
          },
          "429": {
            "description": "Too many wrong codes; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/terms": {
      "put": {
        "tags": [
          "Legal"
        ],
        "summary": "Notes that the account agreed to the version of the terms that counts now. Another version is 409: the terms changed while the page asked.",
        "operationId": "accept",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TermsAgreement"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "The operator set no terms."
          },
          "409": {
            "description": "Another version of the terms counts now."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/report": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Reports a feed to the operator, with a reason from the list and a short note. An account reports a feed once; a second report replaces the first.",
        "operationId": "report_feed",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "A reason not on the list, or a note that is too long."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "This server takes no reports (`CONTENT_REPORTS` is not on), or the account does not read this feed or article."
          },
          "429": {
            "description": "Too many reports from this account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/feeds/{feed_id}/articles/{seq}/report": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Reports one article of a feed, as `report_feed` does the feed.",
        "operationId": "report_article",
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "description": "The feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "The article's number in its feed.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "A reason not on the list, or a note that is too long."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "This server takes no reports (`CONTENT_REPORTS` is not on), or the account does not read this feed or article."
          },
          "429": {
            "description": "Too many reports from this account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/app-passwords": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The account's app passwords: name, when made and when last used, never the password itself.",
        "operationId": "list_app_passwords",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppPasswords"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Makes an app password, with the account's password and, where the second factor is on, one of its codes: a stolen session must not be enough for a way in that outlasts it. Without a code the answer is 403 with `second factor needed`; wrong ones count like wrong passwords at login.",
        "operationId": "create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAppPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Made; the password is in the answer this once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedAppPassword"
                }
              }
            }
          },
          "400": {
            "description": "No name, or one that is too long, or as many app passwords as an account may have (20)."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "A wrong password or code, or `second factor needed`."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/app-passwords/{id}": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Revokes an app password: the app it was for is logged out, and the images in what it fetched stop loading.",
        "operationId": "revoke_app_password",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The app password, as the list names it.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such app password of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/passkeys": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The account's passkeys: name, when made and when last used.",
        "operationId": "list_passkeys",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Passkeys"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "This server has no passkeys (`PUBLIC_URL` is not set)."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Adds the passkey the device made. The account's first second factor brings ten recovery codes, shown this once.",
        "operationId": "finish_registration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyRegistration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisteredPasskey"
                }
              }
            }
          },
          "400": {
            "description": "The device's answer does not hold: another challenge, origin or site, no user verification, or a ceremony that ended."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "This server has no passkeys (`PUBLIC_URL` is not set)."
          },
          "409": {
            "description": "This passkey is known already."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/passkeys/register": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Starts adding a passkey on this device: the owner confirms with password and code, or a passkey; the answer is what `navigator.credentials.create()` takes. Finished with `POST /api/passkeys`, within five minutes and in the same session.",
        "operationId": "start_registration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPasskey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyChallenge"
                }
              }
            }
          },
          "400": {
            "description": "The account has as many passkeys as it may (10)."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The proof of the owner is wrong, or an account without password and second factor has to log in again first."
          },
          "404": {
            "description": "This server has no passkeys (`PUBLIC_URL` is not set)."
          },
          "429": {
            "description": "Too many passkey ceremonies open from this sender."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/passkeys/proof": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Starts showing, in a session, that the account's owner is there.",
        "description": "The answer is what `navigator.credentials.get()` takes; the device's answer\nthen goes with the change that asks for the owner (as `passkey`).",
        "operationId": "start_proof",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyChallenge"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "This server has no passkeys (`PUBLIC_URL` is not set)."
          },
          "409": {
            "description": "The account has no passkey."
          },
          "429": {
            "description": "Too many passkey ceremonies open from this sender."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/passkeys/{id}": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Removes one of the account's passkeys; the owner confirms. Without passkeys and without the app, the second factor is off again.",
        "operationId": "remove_passkey",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The passkey, as the list names it.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemovePasskey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Removed."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "Password, code or passkey of the account are wrong."
          },
          "404": {
            "description": "No such passkey of the account, or no passkeys on this server."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/register": {
      "get": {
        "tags": [
          "Registration"
        ],
        "summary": "Whether anybody can register now, whether an invitation link is good, and the captcha to solve where open registration asks for one, for the page that offers it; for anybody, with or without a session.",
        "operationId": "registering",
        "parameters": [
          {
            "name": "X-Rueder-Invite",
            "in": "header",
            "description": "The token of an invitation to ask about, from the `#invite=` of its link.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Registering"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Registration"
        ],
        "summary": "Makes an account: through open registration, or with an invitation; the new account is logged in at once.",
        "operationId": "register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRegistration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Made and logged in; the answer sets the cookie `__Host-rueder`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "202": {
            "description": "Made, where every account needs a confirmed address: it logs in once the link mailed to it is opened.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Awaiting"
                }
              }
            }
          },
          "400": {
            "description": "A name, password or address that is not allowed."
          },
          "403": {
            "description": "Registration is closed, the invitation is not good (any more), the server or the day is full, the terms were not agreed to (`terms`), or no captcha came that counts (`captcha`)."
          },
          "409": {
            "description": "The name is taken."
          },
          "429": {
            "description": "Too many registrations from the sender's network, or without an invitation on the whole server; see `Retry-After`."
          },
          "503": {
            "description": "The link could not be mailed; no account was made."
          }
        }
      }
    },
    "/api/invites": {
      "get": {
        "tags": [
          "Registration"
        ],
        "summary": "The invitations the reader made, and how many more they may make.",
        "operationId": "invites",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invites"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "Registration"
        ],
        "summary": "Makes an invitation. An admin's is always made and counts in the admins' pool; a reader's takes from their quota.",
        "operationId": "invite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewInvite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Made; the link is in the answer this once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MadeInvite"
                }
              }
            }
          },
          "400": {
            "description": "More uses than allowed, or too many links."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The reader has no invitations left."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/invites/{id}": {
      "delete": {
        "tags": [
          "Registration"
        ],
        "summary": "Takes an invitation back. What it brought so far stays.",
        "operationId": "revoke_invite",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The invitation.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such invitation of the account."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/email": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The address of the account that is logged in, and the one waiting for its link.",
        "operationId": "email_state",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailState"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Gives the account a new address: it counts once the link mailed to it is opened, and until then the one before stays.",
        "operationId": "change_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "The link is on its way to the address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pending"
                }
              }
            }
          },
          "400": {
            "description": "No address mail can go to."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "A wrong password or code, or `second factor needed`."
          },
          "409": {
            "description": "Addresses are off on this server, or this is the address already."
          },
          "429": {
            "description": "Too many wrong tries or too many mails; see `Retry-After`."
          },
          "503": {
            "description": "The mail could not be sent."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Takes the address from the account, and any link that waits; only where an address is optional.",
        "operationId": "remove_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "The account has no address any more."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "A wrong password or code, or `second factor needed`."
          },
          "409": {
            "description": "Addresses are off, or every account needs one."
          },
          "429": {
            "description": "Too many wrong tries; see `Retry-After`."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/email/confirm": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Opens a link from a mail: the address in it is the account's from now on. For anybody who has the link, with or without a session; it does not log in. An unknown, used or old link gets the same answer.",
        "operationId": "confirm_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEmail"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Confirmed"
                }
              }
            }
          },
          "404": {
            "description": "No such link, or not any more: used, replaced by a newer one, or older than a day."
          },
          "409": {
            "description": "Another account has the address meanwhile (`taken`)."
          }
        }
      }
    },
    "/api/email/resend": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Sends the link again to an account that registered and has not confirmed its address yet, which cannot log in to ask otherwise. Wrong passwords count as at login.",
        "operationId": "resend_email_link",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Resend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "The link is on its way again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pending"
                }
              }
            }
          },
          "401": {
            "description": "A wrong name or password (the same answer for both)."
          },
          "409": {
            "description": "The account waits for no address."
          },
          "429": {
            "description": "Too many wrong tries or too many mails; see `Retry-After`."
          },
          "503": {
            "description": "The mail could not be sent."
          }
        }
      }
    },
    "/api/password/forgot": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Mails a link that sets a new password to the confirmed address of the account with this name or this address, if there is one. The answer is the same whether there is or not, and comes before the mail goes.",
        "operationId": "forgot_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Asked. If there is such an account with a confirmed address, a link is on its way to it; the answer says neither."
          },
          "400": {
            "description": "No name or address given, or a longer one than there can be."
          },
          "404": {
            "description": "This server keeps no addresses or sends no mail."
          },
          "429": {
            "description": "Asked too often for this name or from this sender; see `Retry-After`."
          }
        }
      }
    },
    "/api/password/reset": {
      "post": {
        "tags": [
          "Session"
        ],
        "summary": "Sets a new password with the link from a mail. Every session and app password of the account ends, and so does the link; it does not log in. An unknown, used, replaced or old link gets the same answer.",
        "operationId": "reset_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPassword"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "The account has the new password; it logs in with it as always, with its second factor where it has one."
          },
          "400": {
            "description": "A password that cannot be one; the answer says why."
          },
          "404": {
            "description": "No such link, or not any more: used, replaced by a newer one, older than half an hour, or the account has another address now. Also where this server keeps no addresses."
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "The status of the server, for admins: requests and how long they took, the server's own warnings and errors, the fetching of feeds, the feed search, the image proxy, the database and the reported feeds, over the last hour. Nothing in it names an account.",
        "operationId": "server_status",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerStatus"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "The account is no admin, or an admin without the second factor where the operator asks for it."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/reports": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Reports of errors in the reader's browser, from an account that agreed: up to 32 KiB and 20 reports at once.",
        "operationId": "receive",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientReports"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "Too many reports at once."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "403": {
            "description": "This account did not agree to send reports."
          },
          "404": {
            "description": "This server takes no reports of errors."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/reports/consent": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Whether the reader agreed to send reports of errors in their browser, and whether this server takes them.",
        "operationId": "consent",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportsConsent"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "put": {
        "tags": [
          "Reports"
        ],
        "summary": "Agrees to send reports of errors, or takes it back.",
        "operationId": "set_consent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportsConsentChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "This server takes no reports of errors."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/export": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The account as a file to save.",
        "description": "Everything the reader made of the account: settings, folders and feeds, what\nwas read, stars, labels and filter rules, without passwords, sessions or app\npasswords.",
        "operationId": "export_file",
        "responses": {
          "200": {
            "description": "The file, to download.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountExport"
                }
              }
            }
          },
          "401": {
            "description": "No valid session: log in first."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/import": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "A file of `GET /api/export`, from this rueder or another, into the account.",
        "description": "It only adds: feeds are recognized by their address, articles by their id\nand address; what the account has already stays. Up to 32 MiB.",
        "operationId": "import_file",
        "requestBody": {
          "description": "A file of `GET /api/export`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountExport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountImported"
                }
              }
            }
          },
          "400": {
            "description": "Not such a file, or more than it may hold."
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "413": {
            "description": "Over 32 MiB."
          },
          "415": {
            "description": "Not sent as JSON."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/greader/accounts/ClientLogin": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Logs an app in with the account's name and an app password. Wrong ones count like wrong passwords at the page's login. The token is the app password as it is compared, without dashes: apps read it up to an `=`.",
        "operationId": "client_login",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderClientLogin"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`SID=`, `LSID=` and `Auth=` with the token, each on a line of plain text; as JSON with `output=json`.",
            "content": {
              "text/plain": {}
            }
          },
          "401": {
            "description": "`Error=BadAuthentication`: a wrong name or app password."
          },
          "429": {
            "description": "Too many wrong tries for this name or from this sender; see `Retry-After`."
          }
        }
      }
    },
    "/greader/reader/api/0/token": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The token `T` for changes. It proves nothing here, the app password in the header does; it is handed out for apps that want one, and is not the app password.",
        "operationId": "token",
        "responses": {
          "200": {
            "description": "The token, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The token `T` for changes. It proves nothing here, the app password in the header does; it is handed out for apps that want one, and is not the app password.",
        "operationId": "token_post",
        "responses": {
          "200": {
            "description": "The token, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/user-info": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Who is logged in: the account's number and name.",
        "operationId": "user_info",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GreaderUserInfo"
                }
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Who is logged in: the account's number and name.",
        "operationId": "user_info_post",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GreaderUserInfo"
                }
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/subscription/list": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The account's feeds, each with its folder.",
        "operationId": "subscriptions",
        "responses": {
          "200": {
            "description": "`subscriptions`: each feed with `id` (`feed/<id>`), `title`, `url`, `htmlUrl`, `iconUrl` and its folder in `categories`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The account's feeds, each with its folder.",
        "operationId": "subscriptions_post",
        "responses": {
          "200": {
            "description": "`subscriptions`: each feed with `id` (`feed/<id>`), `title`, `url`, `htmlUrl`, `iconUrl` and its folder in `categories`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/tag/list": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The star, the folders by their paths and the labels.",
        "operationId": "tags",
        "responses": {
          "200": {
            "description": "`tags`: the star, each folder and each label, by `id`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The star, the folders by their paths and the labels.",
        "operationId": "tags_post",
        "responses": {
          "200": {
            "description": "`tags`: the star, each folder and each label, by `id`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/unread-count": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The unread count of each feed, folder and of all, worked out like the page's (`reading::unread_counts`).",
        "operationId": "unread_counts",
        "responses": {
          "200": {
            "description": "`max` and `unreadcounts`: per feed, folder and for all, with `id`, `count` and `newestItemTimestampUsec`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The unread count of each feed, folder and of all, worked out like the page's (`reading::unread_counts`).",
        "operationId": "unread_counts_post",
        "responses": {
          "200": {
            "description": "`max` and `unreadcounts`: per feed, folder and for all, with `id`, `count` and `newestItemTimestampUsec`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/stream/items/ids": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The IDs of a list, newest first or with `r=o` oldest first, at most [`MAX_IDS`] at a time.",
        "description": "The parameters may come in the query or as a form.",
        "operationId": "item_ids",
        "parameters": [
          {
            "name": "s",
            "in": "query",
            "description": "The stream: `feed/<id>`, `user/-/label/<folder or label>`,\n`user/-/state/com.google/reading-list` (all), `.../starred` or\n`.../read`. Not for `stream/contents/<stream>`, which names it in the\npath.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "How many items at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "r",
            "in": "query",
            "description": "`o` for the oldest first; the newest come first otherwise.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "c",
            "in": "query",
            "description": "Where the page goes on: the `continuation` of the page before.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xt",
            "in": "query",
            "description": "Leave out what has this state, such as\n`user/-/state/com.google/read`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "it",
            "in": "query",
            "description": "Only what has this state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ot",
            "in": "query",
            "description": "Only what arrived after this time, since 1970 in seconds,\nmilliseconds or microseconds (told apart by the number of digits).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "nt",
            "in": "query",
            "description": "Only what arrived before this time, as `ot`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`itemRefs` (each `id` as a number, with `directStreamIds` and `timestampUsec`) and, if there is more, `continuation`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The IDs of a list, newest first or with `r=o` oldest first, at most [`MAX_IDS`] at a time.",
        "description": "The parameters may come in the query or as a form.",
        "operationId": "item_ids_post",
        "parameters": [
          {
            "name": "s",
            "in": "query",
            "description": "The stream: `feed/<id>`, `user/-/label/<folder or label>`,\n`user/-/state/com.google/reading-list` (all), `.../starred` or\n`.../read`. Not for `stream/contents/<stream>`, which names it in the\npath.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "How many items at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "r",
            "in": "query",
            "description": "`o` for the oldest first; the newest come first otherwise.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "c",
            "in": "query",
            "description": "Where the page goes on: the `continuation` of the page before.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xt",
            "in": "query",
            "description": "Leave out what has this state, such as\n`user/-/state/com.google/read`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "it",
            "in": "query",
            "description": "Only what has this state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ot",
            "in": "query",
            "description": "Only what arrived after this time, since 1970 in seconds,\nmilliseconds or microseconds (told apart by the number of digits).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "nt",
            "in": "query",
            "description": "Only what arrived before this time, as `ot`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`itemRefs` (each `id` as a number, with `directStreamIds` and `timestampUsec`) and, if there is more, `continuation`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/stream/items/contents": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The items of these IDs (`i`), at most [`MAX_ITEMS`]. What the account cannot see is left out, and so is what follows past [`MAX_TEXTS`] bytes of texts.",
        "description": "The IDs may come in the query or as a form (`i`, once per item).",
        "operationId": "item_contents",
        "parameters": [
          {
            "name": "i",
            "in": "query",
            "description": "The ID of an item, long or short; once per item.",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`items`: each with `id`, `title`, `published`, `author`, `canonical`, `alternate`, `summary.content` (the cleaned text), `categories` (read, starred, labels) and `origin` (its feed).",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "429": {
            "description": "The account asks for too many texts at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "The items of these IDs (`i`), at most [`MAX_ITEMS`]. What the account cannot see is left out, and so is what follows past [`MAX_TEXTS`] bytes of texts.",
        "description": "The IDs may come in the query or as a form (`i`, once per item).",
        "operationId": "item_contents_post",
        "parameters": [
          {
            "name": "i",
            "in": "query",
            "description": "The ID of an item, long or short; once per item.",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`items`: each with `id`, `title`, `published`, `author`, `canonical`, `alternate`, `summary.content` (the cleaned text), `categories` (read, starred, labels) and `origin` (its feed).",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "429": {
            "description": "The account asks for too many texts at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/stream/contents": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "`GET /reader/api/0/stream/contents?s=<stream>`, the same.",
        "description": "The parameters may come in the query or as a form.",
        "operationId": "stream_contents",
        "parameters": [
          {
            "name": "s",
            "in": "query",
            "description": "The stream: `feed/<id>`, `user/-/label/<folder or label>`,\n`user/-/state/com.google/reading-list` (all), `.../starred` or\n`.../read`. Not for `stream/contents/<stream>`, which names it in the\npath.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "How many items at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "r",
            "in": "query",
            "description": "`o` for the oldest first; the newest come first otherwise.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "c",
            "in": "query",
            "description": "Where the page goes on: the `continuation` of the page before.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xt",
            "in": "query",
            "description": "Leave out what has this state, such as\n`user/-/state/com.google/read`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "it",
            "in": "query",
            "description": "Only what has this state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ot",
            "in": "query",
            "description": "Only what arrived after this time, since 1970 in seconds,\nmilliseconds or microseconds (told apart by the number of digits).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "nt",
            "in": "query",
            "description": "Only what arrived before this time, as `ot`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`items` as `stream/items/contents` has them, and, if there is more, `continuation`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "429": {
            "description": "The account asks for too many texts at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "`GET /reader/api/0/stream/contents?s=<stream>`, the same.",
        "description": "The parameters may come in the query or as a form.",
        "operationId": "stream_contents_post",
        "parameters": [
          {
            "name": "s",
            "in": "query",
            "description": "The stream: `feed/<id>`, `user/-/label/<folder or label>`,\n`user/-/state/com.google/reading-list` (all), `.../starred` or\n`.../read`. Not for `stream/contents/<stream>`, which names it in the\npath.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "How many items at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "r",
            "in": "query",
            "description": "`o` for the oldest first; the newest come first otherwise.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "c",
            "in": "query",
            "description": "Where the page goes on: the `continuation` of the page before.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xt",
            "in": "query",
            "description": "Leave out what has this state, such as\n`user/-/state/com.google/read`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "it",
            "in": "query",
            "description": "Only what has this state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ot",
            "in": "query",
            "description": "Only what arrived after this time, since 1970 in seconds,\nmilliseconds or microseconds (told apart by the number of digits).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "nt",
            "in": "query",
            "description": "Only what arrived before this time, as `ot`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`items` as `stream/items/contents` has them, and, if there is more, `continuation`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "429": {
            "description": "The account asks for too many texts at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/stream/contents/{*stream}": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "A page of a list with the items' texts, at most [`MAX_ITEMS`] and the texts of [`MAX_TEXTS`] bytes.",
        "description": "The stream is the rest of the path, slashes included, such as `feed/12` or\n`user/-/state/com.google/reading-list`; the other parameters may come in the\nquery or as a form.",
        "operationId": "stream_contents_of",
        "parameters": [
          {
            "name": "*stream",
            "in": "path",
            "description": "The stream, slashes included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "s",
            "in": "query",
            "description": "The stream: `feed/<id>`, `user/-/label/<folder or label>`,\n`user/-/state/com.google/reading-list` (all), `.../starred` or\n`.../read`. Not for `stream/contents/<stream>`, which names it in the\npath.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "How many items at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "r",
            "in": "query",
            "description": "`o` for the oldest first; the newest come first otherwise.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "c",
            "in": "query",
            "description": "Where the page goes on: the `continuation` of the page before.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xt",
            "in": "query",
            "description": "Leave out what has this state, such as\n`user/-/state/com.google/read`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "it",
            "in": "query",
            "description": "Only what has this state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ot",
            "in": "query",
            "description": "Only what arrived after this time, since 1970 in seconds,\nmilliseconds or microseconds (told apart by the number of digits).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "nt",
            "in": "query",
            "description": "Only what arrived before this time, as `ot`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "As `stream/contents` answers.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "429": {
            "description": "The account asks for too many texts at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      },
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "A page of a list with the items' texts, at most [`MAX_ITEMS`] and the texts of [`MAX_TEXTS`] bytes.",
        "description": "The stream is the rest of the path, slashes included, such as `feed/12` or\n`user/-/state/com.google/reading-list`; the other parameters may come in the\nquery or as a form.",
        "operationId": "stream_contents_of_post",
        "parameters": [
          {
            "name": "*stream",
            "in": "path",
            "description": "The stream, slashes included.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "s",
            "in": "query",
            "description": "The stream: `feed/<id>`, `user/-/label/<folder or label>`,\n`user/-/state/com.google/reading-list` (all), `.../starred` or\n`.../read`. Not for `stream/contents/<stream>`, which names it in the\npath.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "n",
            "in": "query",
            "description": "How many items at most.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "r",
            "in": "query",
            "description": "`o` for the oldest first; the newest come first otherwise.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "c",
            "in": "query",
            "description": "Where the page goes on: the `continuation` of the page before.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xt",
            "in": "query",
            "description": "Leave out what has this state, such as\n`user/-/state/com.google/read`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "it",
            "in": "query",
            "description": "Only what has this state.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ot",
            "in": "query",
            "description": "Only what arrived after this time, since 1970 in seconds,\nmilliseconds or microseconds (told apart by the number of digits).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "nt",
            "in": "query",
            "description": "Only what arrived before this time, as `ot`.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "As `stream/contents` answers.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "429": {
            "description": "The account asks for too many texts at once; see `Retry-After`."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/edit-tag": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Adds (`a`) and removes (`r`) tags on the articles of the IDs `i`: read, kept unread, starred, labels.",
        "operationId": "edit_tag",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderEditTag"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`OK`, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/mark-all-as-read": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Marks a stream as read, up to what had arrived at `ts`, if the app says; what came after stays unread.",
        "operationId": "mark_all_read",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderMarkAllRead"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`OK`, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/subscription/edit": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Subscribes (`ac=subscribe`, `s` the feed's address), unsubscribes (`ac=unsubscribe`, every `s`) or changes a subscription (`ac=edit`): a name (`t`), a folder to go into (`a`) or to leave for the top level (`r`).",
        "operationId": "edit_subscription",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderEditSubscription"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`OK`, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          },
          "403": {
            "description": "The operator blocked this feed."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/subscription/quickadd": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Subscribes to the feed at an address, or to the first one a web page names.",
        "operationId": "quick_add",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderQuickAdd"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`numResults`, and for a feed found, `query` and `streamId`.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/rename-tag": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Renames a folder (`s`, `dest`: paths that differ in their last part) or a label.",
        "operationId": "rename_tag",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderRenameTag"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`OK`, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/reader/api/0/disable-tag": {
      "post": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "Takes folders out, whose feeds move up to where they were, and deletes labels.",
        "operationId": "disable_tag",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/GreaderDisableTag"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "`OK`, as plain text.",
            "content": {
              "text/plain": {}
            }
          },
          "400": {
            "description": "A parameter the server cannot use, such as an unknown stream."
          },
          "401": {
            "description": "No valid app password: log in again at ClientLogin."
          }
        },
        "security": [
          {
            "app_password": []
          }
        ]
      }
    },
    "/greader/img/{app}/{signature}/{size}/{address}": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "An image through the proxy for an app: no session, the address proves that the server made it for an app password, which has to still count.",
        "operationId": "app_image",
        "parameters": [
          {
            "name": "app",
            "in": "path",
            "description": "The app password the address was made for.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "signature",
            "in": "path",
            "description": "Proves that the server made the address for it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "path",
            "description": "`icon`, `thumbnail` or `image`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "description": "The image's own address, encoded.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "content": {
              "image/*": {}
            }
          },
          "404": {
            "description": "No such image, an address the server did not make, an app password that no longer counts, or no image proxy."
          },
          "502": {
            "description": "The image's own server did not deliver it, or not as an image."
          }
        }
      }
    },
    "/greader/images/{signature}/{size}/{address}": {
      "get": {
        "tags": [
          "Google Reader API"
        ],
        "summary": "An image through the proxy for every app alike, where the operator lets a cache in front of rueder keep images (`IMAGES_PUBLIC=on`): no session and no app password, the address proves that the server made it, as the page's does. Without the setting there is no such image.",
        "operationId": "shared_app_image",
        "parameters": [
          {
            "name": "signature",
            "in": "path",
            "description": "Proves that the server made the address.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "path",
            "description": "`icon`, `thumbnail` or `image`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "description": "The image's own address, encoded.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "content": {
              "image/*": {}
            }
          },
          "404": {
            "description": "No such image, an address the server did not make, no image proxy, or no `IMAGES_PUBLIC` on this server."
          },
          "502": {
            "description": "The image's own server did not deliver it, or not as an image."
          }
        }
      }
    },
    "/img/{signature}/{size}/{address}": {
      "get": {
        "tags": [
          "Images"
        ],
        "summary": "An image through the proxy, for logged-in readers only, unless the operator lets a cache in front of rueder keep images (`IMAGES_PUBLIC=on`). The address says which one and proves that the server itself asked for it; see [`images`].",
        "description": "The page never makes such an address: it comes in what the API sends.\nThe answer is the image in a format the browser shows, made smaller where\nthe size asks for it, never anything that runs.",
        "operationId": "image",
        "parameters": [
          {
            "name": "signature",
            "in": "path",
            "description": "Proves that the server made the address.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "path",
            "description": "What the image is for, and so how large it may be: `icon`, `thumbnail` or `image`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address",
            "in": "path",
            "description": "The image's own address, encoded.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "content": {
              "image/*": {}
            }
          },
          "401": {
            "description": "No valid session: log in first."
          },
          "404": {
            "description": "No such image, a signature that does not fit, or no image proxy on this server."
          },
          "502": {
            "description": "The image's own server did not deliver it, or not as an image."
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/.well-known/assetlinks.json": {
      "get": {
        "tags": [
          "Android"
        ],
        "summary": "`GET /.well-known/assetlinks.json`, for anybody: Android reads it without a session. Not there without passkeys or without apps.",
        "description": "The Digital Asset Links of this site: which Android apps, by package and\nsigning key, may open its addresses and use its passkeys.",
        "operationId": "serve",
        "responses": {
          "200": {
            "description": "One statement per app, as Android reads them.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "404": {
            "description": "No passkeys on this server, or no app named for them."
          }
        }
      }
    },
    "/metrics": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "The metrics of the server for Prometheus, in its text format 0.0.4, for whoever names the token in `METRICS_TOKEN`: requests by route, fetching, the feed search, the image proxy, the warnings and errors of the log and what PostgreSQL says. Counters count since the process started. Nothing in it names an account, a feed or an address.",
        "operationId": "metrics",
        "responses": {
          "200": {
            "description": "The metrics, in the text format of Prometheus 0.0.4.",
            "content": {
              "text/plain; version=0.0.4; charset=utf-8": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No token, or not the one in METRICS_TOKEN."
          },
          "404": {
            "description": "The server gives no metrics: METRICS_TOKEN is not set."
          }
        },
        "security": [
          {
            "metrics_token": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Account": {
        "type": "object",
        "description": "An account as an admin sees it.\n\n`GET /api/accounts` answers with a list of them, for admins only.",
        "required": [
          "id",
          "username",
          "is_admin",
          "has_password",
          "disabled",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "username": {
            "type": "string"
          },
          "is_admin": {
            "type": "boolean"
          },
          "has_password": {
            "type": "boolean"
          },
          "disabled": {
            "type": "boolean",
            "description": "Disabled by the operator, with `rueder account disable`."
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "AccountExport": {
        "type": "object",
        "description": "An account as a file, for another rueder. `GET /api/export` answers with\nit, and `POST /api/import` reads it.",
        "required": [
          "format",
          "version",
          "exported_at"
        ],
        "properties": {
          "format": {
            "type": "string",
            "description": "Always \"rueder-account\"."
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "The layout of the file, 1. A server reads only the layouts it knows.",
            "minimum": 0
          },
          "exported_at": {
            "type": "string"
          },
          "settings": {
            "type": "object",
            "description": "The settings of the interface, as `GET /api/settings` gives them."
          },
          "tree": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedNode"
            },
            "description": "Folders and feeds from the top down, in their order: a folder before\nwhat is in it."
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedLabel"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedRule"
            },
            "description": "The filter rules in their order."
          }
        }
      },
      "AccountImported": {
        "type": "object",
        "description": "What an import did. `POST /api/import` answers with it.",
        "required": [
          "feeds",
          "known",
          "folders",
          "articles",
          "missing",
          "labels",
          "rules",
          "skipped",
          "settings"
        ],
        "properties": {
          "feeds": {
            "type": "integer",
            "description": "Feeds the account reads now and did not before.",
            "minimum": 0
          },
          "known": {
            "type": "integer",
            "description": "Feeds of the file the account read already.",
            "minimum": 0
          },
          "folders": {
            "type": "integer",
            "description": "Folders that were made.",
            "minimum": 0
          },
          "articles": {
            "type": "integer",
            "description": "Articles of the file that were found here.",
            "minimum": 0
          },
          "missing": {
            "type": "integer",
            "description": "Articles that were not found: what was read, starred or labelled of\nthem is lost.",
            "minimum": 0
          },
          "labels": {
            "type": "integer",
            "description": "Labels that were made.",
            "minimum": 0
          },
          "rules": {
            "type": "integer",
            "description": "Rules that were added.",
            "minimum": 0
          },
          "skipped": {
            "type": "integer",
            "description": "What the file has that could not be taken: feeds without an address\nthat can be fetched, articles without an id, labels and rules that\nbreak the rules, rules whose folder or feed is not there.",
            "minimum": 0
          },
          "settings": {
            "type": "boolean",
            "description": "Whether the settings came with it."
          }
        }
      },
      "AppPassword": {
        "type": "object",
        "description": "An app password as the list shows it: never the password itself.",
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "used_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When an app last logged in with it, to the hour; null until one did."
          }
        }
      },
      "AppPasswords": {
        "type": "object",
        "description": "What `GET /api/app-passwords` answers.",
        "required": [
          "app_passwords",
          "max"
        ],
        "properties": {
          "app_passwords": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppPassword"
            }
          },
          "max": {
            "type": "integer",
            "format": "int64",
            "description": "How many the account can have."
          }
        }
      },
      "Article": {
        "allOf": [
          {
            "type": "object",
            "description": "An article opened for reading: the cleaned text of its current version.",
            "required": [
              "feed_id",
              "seq",
              "id",
              "published_at",
              "version",
              "title",
              "author",
              "html",
              "tags",
              "text_dropped"
            ],
            "properties": {
              "feed_id": {
                "type": "integer",
                "format": "int32"
              },
              "seq": {
                "type": "integer",
                "format": "int32"
              },
              "id": {
                "type": "integer",
                "format": "int64"
              },
              "published_at": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_what": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Changed",
                    "description": "What was different then; null for a change from before rueder noted it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "format": "int32"
              },
              "title": {
                "type": "string"
              },
              "author": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "html": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "image_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "image_title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "text_dropped": {
                "type": "boolean",
                "description": "The retention took its text and left its line in the lists: `html` is\nempty, and the original is where `url` points."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "enclosures",
              "labels"
            ],
            "properties": {
              "enclosures": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Enclosure"
                }
              },
              "labels": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "hidden_by": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "The rule that hides the article, if one does: the first of the\naccount's rules that would, in their order."
              }
            }
          }
        ],
        "description": "An article for reading, with the labels the reader gave it.\n\n`GET /api/feeds/{id}/articles/{seq}` answers with it."
      },
      "ArticleInfo": {
        "type": "object",
        "description": "What the server knows of an article and its versions, for a reader to pass\non to whoever helps with it.\n\n`GET /api/feeds/{id}/articles/{seq}/info` answers with it; `rueder article\nshow` prints it.",
        "required": [
          "feed_id",
          "feed_title",
          "seq",
          "title",
          "guid",
          "published_at",
          "first_fetched_at",
          "version",
          "versions_kept",
          "text_dropped"
        ],
        "properties": {
          "feed_id": {
            "type": "integer",
            "format": "int32"
          },
          "feed_title": {
            "type": "string",
            "description": "The feed's own name."
          },
          "seq": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "guid": {
            "type": "string",
            "description": "What the fetch knows the article by: its id in the feed (GUID), else\nits link."
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "published_at": {
            "type": "string"
          },
          "first_fetched_at": {
            "type": "string",
            "description": "When rueder first had it: when it was fetched, or for an import when the\nold rueder fetched it."
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the current version replaced the one before, if it ever did."
          },
          "updated_what": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Changed",
                "description": "What was different then; null for a change from before rueder noted it."
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current version."
          },
          "versions_kept": {
            "type": "integer",
            "format": "int64",
            "description": "How many versions are kept, the current one with them."
          },
          "text_dropped": {
            "type": "boolean",
            "description": "The retention took its text."
          }
        }
      },
      "ArticleRef": {
        "type": "object",
        "description": "An article, as it can be found on another server.",
        "required": [
          "seq",
          "guid",
          "published_at"
        ],
        "properties": {
          "seq": {
            "type": "integer",
            "format": "int32",
            "description": "Its number in its feed on the server the file comes from; with the\nfeed's number its id in that server's API."
          },
          "guid": {
            "type": "string",
            "description": "Its id in its feed, as the feed gives it."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its page."
          },
          "published_at": {
            "type": "string"
          }
        }
      },
      "ArticleSource": {
        "type": "object",
        "description": "The source of an article's current version, for a reader who wants to see\nwhat the cleaning kept, such as a tracking parameter it does not know yet.\n\n`GET /api/feeds/{id}/articles/{seq}/source` answers with it. Its addresses are\nas stored, not at the image proxy: the page shows it as text, never as HTML.",
        "required": [
          "cleaned"
        ],
        "properties": {
          "cleaned": {
            "type": "string",
            "description": "The text as rueder keeps it after cleaning it; empty where the retention\ntook it."
          },
          "original": {
            "type": [
              "string",
              "null"
            ],
            "description": "The text as the feed sent it; null where no version is kept."
          }
        }
      },
      "ArticleVersion": {
        "type": "object",
        "description": "One version of an article, cleaned for reading like the current one.",
        "required": [
          "version",
          "fetched_at",
          "title",
          "html",
          "authors",
          "tags"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "fetched_at": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "authors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Awaiting": {
        "type": "object",
        "description": "What `POST /api/register` answers where every account needs a confirmed\naddress: the account is made, and logs in once the link mailed to it is\nopened.",
        "required": [
          "awaiting_email"
        ],
        "properties": {
          "awaiting_email": {
            "type": "string",
            "description": "Where the link went."
          }
        }
      },
      "BuildInfo": {
        "type": "object",
        "description": "How this rueder was built and where it runs.\n\nPart of what `GET /api/status` answers, for admins only.",
        "required": [
          "version",
          "commit",
          "branch",
          "tag",
          "dirty",
          "committed_at",
          "target",
          "profile",
          "opt_level",
          "ci_run",
          "container"
        ],
        "properties": {
          "version": {
            "type": "string",
            "description": "The version of the crate."
          },
          "commit": {
            "type": "string",
            "description": "The commit it was built from; empty where there was no git directory."
          },
          "branch": {
            "type": "string",
            "description": "The branch that commit was on."
          },
          "tag": {
            "type": "string",
            "description": "The tag on that commit, if it has one."
          },
          "dirty": {
            "type": "boolean",
            "description": "Something was changed and not committed when this was built."
          },
          "committed_at": {
            "type": "string",
            "description": "When that commit was made, in UTC, as `2026-11-13T09:12:00Z`."
          },
          "target": {
            "type": "string",
            "description": "The machine it was built for, as `x86_64-unknown-linux-gnu`."
          },
          "profile": {
            "type": "string",
            "description": "`release` or `debug`, and how hard the compiler tried (`3`, `z`, `0`)."
          },
          "opt_level": {
            "type": "string"
          },
          "ci_run": {
            "type": "string",
            "description": "The run of the CI that built it, as an address; empty for a build by hand."
          },
          "container": {
            "type": "boolean",
            "description": "It runs in a container, as the image of the project does."
          }
        }
      },
      "CaptchaChallenge": {
        "type": "object",
        "description": "A challenge for the page to solve before it registers, in\n`GET /api/register`.",
        "required": [
          "salt",
          "challenge",
          "max",
          "expires",
          "signature"
        ],
        "properties": {
          "salt": {
            "type": "string",
            "description": "Random, in hex."
          },
          "challenge": {
            "type": "string",
            "description": "The SHA-256 of the salt followed by the hidden number in decimal, in hex."
          },
          "max": {
            "type": "integer",
            "format": "int32",
            "description": "The highest number it can be.",
            "minimum": 0
          },
          "expires": {
            "type": "integer",
            "format": "int64",
            "description": "Until when it is good, in seconds since 1970."
          },
          "signature": {
            "type": "string",
            "description": "The server's signature of the challenge and its expiry."
          }
        }
      },
      "CaptchaSolution": {
        "type": "object",
        "description": "A solved challenge, which `POST /api/register` reads: the challenge as it\ncame, and the number that was hidden in it.",
        "required": [
          "salt",
          "challenge",
          "expires",
          "signature",
          "number"
        ],
        "properties": {
          "salt": {
            "type": "string"
          },
          "challenge": {
            "type": "string"
          },
          "expires": {
            "type": "integer",
            "format": "int64"
          },
          "signature": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "Changed": {
        "type": "string",
        "description": "What was different about an article when it last got a new version. A feed\nthat only rewrites a headline says nothing in the text, and the reader would\nlook for a change in vain.",
        "enum": [
          "title",
          "text",
          "both"
        ]
      },
      "ClientReport": {
        "type": "object",
        "description": "One error, as the browser saw it.",
        "required": [
          "kind",
          "message",
          "version",
          "browser"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "message": {
            "type": "string"
          },
          "stack": {
            "type": [
              "string",
              "null"
            ],
            "description": "The lines of the stack in the files of rueder's frontend, as\n\"_app/immutable/chunks/x.js:12:34\", one a line."
          },
          "version": {
            "type": "string",
            "description": "The version of the frontend."
          },
          "browser": {
            "type": "string",
            "description": "The browser and its major version, such as \"Firefox 140\"."
          }
        }
      },
      "ClientReports": {
        "type": "object",
        "description": "What `POST /api/reports` reads: at most twenty reports. It answers 204.",
        "required": [
          "reports"
        ],
        "properties": {
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClientReport"
            }
          }
        }
      },
      "ConfirmEmail": {
        "type": "object",
        "description": "What `POST /api/email/confirm` reads: the token from the link.",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "Confirmed": {
        "type": "object",
        "description": "What a confirmed link did.",
        "required": [
          "username",
          "email",
          "activated"
        ],
        "properties": {
          "username": {
            "type": "string",
            "description": "The account it was for."
          },
          "email": {
            "type": "string",
            "description": "Its address now."
          },
          "activated": {
            "type": "boolean",
            "description": "The account was waiting for its address and can log in now."
          }
        }
      },
      "ContentReport": {
        "type": "object",
        "description": "A report of a feed or an article.\n\n`POST /api/feeds/{id}/report` and `POST /api/feeds/{id}/articles/{seq}/report`\nread it and answer 204.",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/ReportReason"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the reader adds, at most 500 characters."
          }
        }
      },
      "Created": {
        "type": "object",
        "description": "The answer to making something: the number it got.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreatedAppPassword": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AppPassword"
          },
          {
            "type": "object",
            "required": [
              "secret"
            ],
            "properties": {
              "secret": {
                "type": "string",
                "description": "In groups of four letters, as it is shown to be typed."
              }
            }
          }
        ],
        "description": "What `POST /api/app-passwords` answers: the app password, this once."
      },
      "Credentials": {
        "type": "object",
        "description": "What `POST /api/login` reads. It answers with `Me` and sets the session's\ncookie. An account with a second factor needs `code` too, from the app or\na recovery code; without it, the answer is 401 with `second factor needed`.",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Device": {
        "type": "object",
        "description": "One place a reader is logged in.\n\n`GET /api/sessions` answers with a list of them; `DELETE /api/sessions/{id}`\nends one, `DELETE /api/sessions` all but the one that asks.",
        "required": [
          "id",
          "created_at",
          "last_seen_at",
          "current"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "A name for the session that is not its token and leads to none."
          },
          "created_at": {
            "type": "string"
          },
          "last_seen_at": {
            "type": "string"
          },
          "current": {
            "type": "boolean",
            "description": "The session that asks."
          }
        }
      },
      "DropPosition": {
        "type": "string",
        "description": "The side of the node it is dropped on that a node lands on: before it,\nafter it or, for a folder, inside it.",
        "enum": [
          "before",
          "after",
          "inside"
        ]
      },
      "Durations": {
        "type": "object",
        "description": "How long things took in the last hour, in milliseconds. The times are null\nwhen nothing was timed.",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "mean_ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "p50_ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "p95_ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_ms": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        }
      },
      "EmailMode": {
        "type": "string",
        "description": "Whether accounts have an address, as the operator set it.",
        "enum": [
          "off",
          "optional",
          "required"
        ]
      },
      "EmailProof": {
        "type": "object",
        "description": "How the reader shows that they are the account's owner.",
        "properties": {
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EmailState": {
        "type": "object",
        "description": "The address of an account and the one waiting for its link, as the\naccount's own page sees them.",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/EmailMode"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The confirmed address, if the account has one."
          },
          "pending": {
            "type": [
              "string",
              "null"
            ],
            "description": "An address whose link was sent and not yet opened."
          }
        }
      },
      "Enclosure": {
        "type": "object",
        "description": "A file that comes with an article, like the episode of a podcast.",
        "required": [
          "url",
          "inline"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its media type, such as `audio/mpeg`, if the feed says."
          },
          "length": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Its size in bytes, if the feed says.",
            "minimum": 0
          },
          "inline": {
            "type": "boolean",
            "description": "It stood in the article's text and not in the feed's own list."
          }
        }
      },
      "ExportedAgent": {
        "type": "string",
        "description": "Who a feed is fetched as.",
        "enum": [
          "rueder",
          "browser"
        ]
      },
      "ExportedArticle": {
        "type": "object",
        "description": "An article the reader did something with.",
        "required": [
          "seq",
          "guid",
          "published_at"
        ],
        "properties": {
          "seq": {
            "type": "integer",
            "format": "int32"
          },
          "guid": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "published_at": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "read": {
            "type": "boolean",
            "description": "Whether it is read, whatever the mark says."
          },
          "starred": {
            "type": "boolean"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of its labels."
          }
        }
      },
      "ExportedFeed": {
        "type": "object",
        "description": "A subscription, with what the reader did in it.",
        "required": [
          "id",
          "url"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "The feed's number on the server the file comes from."
          },
          "url": {
            "type": "string",
            "description": "The address of the feed: how it is found again."
          },
          "page": {
            "type": "boolean",
            "description": "Whether it is a web page without a feed, which RSSifier reads."
          },
          "site_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string",
            "description": "The feed's own title."
          },
          "own_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name the reader gave it."
          },
          "folder": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The folder it is in, by its path; empty at the top."
          },
          "agent": {
            "$ref": "#/components/schemas/ExportedAgent"
          },
          "last_seq": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the newest article on the server the file comes from."
          },
          "read_upto": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ArticleRef",
                "description": "The article the mark stands at: it and everything before it is read,\nbut for the articles below that say otherwise. None if the mark is at\nthe start."
              },
              {
                "type": "null"
              }
            ]
          },
          "articles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedArticle"
            },
            "description": "The articles that are read above the mark or unread below it, starred\nor labelled."
          }
        }
      },
      "ExportedLabel": {
        "type": "object",
        "required": [
          "title",
          "color"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      },
      "ExportedNode": {
        "oneOf": [
          {
            "type": "object",
            "description": "A folder, by its name and the names of the folders it is in, from the\ntop down.",
            "required": [
              "path",
              "kind"
            ],
            "properties": {
              "path": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "kind": {
                "type": "string",
                "enum": [
                  "folder"
                ]
              }
            }
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExportedFeed"
              },
              {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "feed"
                    ]
                  }
                }
              }
            ]
          }
        ],
        "description": "A folder or a feed of the tree."
      },
      "ExportedRule": {
        "type": "object",
        "required": [
          "enabled",
          "scope",
          "field",
          "match",
          "pattern",
          "action"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "scope": {
            "$ref": "#/components/schemas/ExportedScope"
          },
          "field": {
            "$ref": "#/components/schemas/RuleField"
          },
          "match": {
            "$ref": "#/components/schemas/RuleMatch"
          },
          "pattern": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/RuleAction"
          }
        }
      },
      "ExportedScope": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "all"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "path",
              "kind"
            ],
            "properties": {
              "path": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "kind": {
                "type": "string",
                "enum": [
                  "folder"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "url",
              "kind"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "feed"
                ]
              }
            }
          }
        ],
        "description": "Where a rule holds: a folder by its path, a feed by its address."
      },
      "Farewell": {
        "type": "object",
        "description": "What `DELETE /api/account` reads: proof that the reader means it.",
        "properties": {
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account's password. An account that has none sends its name."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "A code of the app or a recovery code, where the second factor is on."
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer",
                "description": "A passkey of the account, instead of all the above."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Feed": {
        "type": "object",
        "description": "A subscription with what the tree shows of its feed.\n\n`folder_id` is the folder it lies in, null at the top.",
        "required": [
          "id",
          "position",
          "title",
          "feed_title",
          "feed_url",
          "fetch_agent",
          "fetched",
          "blocked",
          "last_seq",
          "read_upto",
          "unread"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "folder_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "position": {
            "type": "number",
            "format": "double"
          },
          "title": {
            "type": "string",
            "description": "The name the reader gave it, else the feed's own, else, for a feed\nthat has none (yet), the host of its address."
          },
          "feed_title": {
            "type": "string"
          },
          "feed_url": {
            "type": "string"
          },
          "site_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "fetch_agent": {
            "$ref": "#/components/schemas/FetchAgent"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last fetch failed, if it did."
          },
          "fetched": {
            "type": "boolean",
            "description": "Whether the feed was fetched at all yet. One that came with an OPML\nfile waits for the next round."
          },
          "blocked": {
            "type": "boolean",
            "description": "The operator blocked the feed: nobody sees its articles, and it is not\nfetched."
          },
          "last_seq": {
            "type": "integer",
            "format": "int32"
          },
          "read_upto": {
            "type": "integer",
            "format": "int32"
          },
          "unread": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "FeedCandidate": {
        "type": "object",
        "description": "A feed found at an address.",
        "required": [
          "url",
          "title",
          "page"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "feed_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The number of the feed if the reader subscribes to it already."
          },
          "page": {
            "type": "boolean",
            "description": "A web page without a feed, whose feed RSSifier makes: of titles and\nsummaries, not of whole texts."
          }
        }
      },
      "FeedInfo": {
        "type": "object",
        "description": "What the server knows of a feed and how it is fetched, for a reader to\npass on to whoever helps with it. Nothing in it is about other accounts.\n\n`GET /api/feeds/{id}/info` answers with it; `rueder feed show` prints it.",
        "required": [
          "id",
          "title",
          "feed_url",
          "fetch_agent",
          "fetch_interval_s",
          "next_fetch_at",
          "last_seq",
          "blocked"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "description": "The feed's own name."
          },
          "feed_url": {
            "type": "string"
          },
          "site_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "fetch_agent": {
            "$ref": "#/components/schemas/FetchAgent"
          },
          "fetch_interval_s": {
            "type": "integer",
            "format": "int32",
            "description": "How long it waits from one fetch to the next, in seconds."
          },
          "fetched_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was fetched last, whether that worked or not; null before the\nfirst time."
          },
          "last_success_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When a fetch worked last."
          },
          "last_error_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When a fetch failed last, also if one worked since."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last fetch failed, if it did."
          },
          "next_fetch_at": {
            "type": "string",
            "description": "When it is fetched next, unless it is blocked."
          },
          "last_seq": {
            "type": "integer",
            "format": "int32",
            "description": "The number of its newest article."
          },
          "blocked": {
            "type": "boolean",
            "description": "The operator blocked the feed: nobody sees its articles, and it is not\nfetched."
          }
        }
      },
      "FetchAgent": {
        "type": "string",
        "description": "Who a feed is fetched as: as rueder, or as a browser, for sites that turn\nreaders like rueder away.",
        "enum": [
          "rueder",
          "browser"
        ]
      },
      "FetchFailure": {
        "type": "string",
        "description": "Why fetches fail.",
        "enum": [
          "status",
          "timeout",
          "blocked",
          "dns",
          "network",
          "too_large",
          "redirects",
          "unreadable",
          "other"
        ]
      },
      "FindFeeds": {
        "type": "object",
        "description": "What `POST /api/feeds/find` reads: the address of a feed or of a page that\nnames its feeds.",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "Folder": {
        "type": "object",
        "description": "A folder of the tree. `parent_id` is the folder it lies in, null at the top.",
        "required": [
          "id",
          "title",
          "position"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "parent_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "position": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "ForgotPassword": {
        "type": "object",
        "description": "What `POST /api/password/forgot` reads: the account's name or its address.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "FoundFeeds": {
        "type": "object",
        "description": "What `POST /api/feeds/find` answers.",
        "required": [
          "feeds"
        ],
        "properties": {
          "feeds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedCandidate"
            }
          },
          "moved_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the site sent the request on to, if it did: a site that turns\nreaders away often sends them to its login."
          }
        }
      },
      "GreaderClientLogin": {
        "type": "object",
        "description": "What `ClientLogin` reads, as a form.",
        "required": [
          "Email",
          "Passwd"
        ],
        "properties": {
          "Email": {
            "type": "string",
            "description": "The name of the account (apps call it the e-mail)."
          },
          "Passwd": {
            "type": "string",
            "description": "An app password of the account, as Settings, Apps made it."
          },
          "output": {
            "type": [
              "string",
              "null"
            ],
            "description": "`json` for an answer in JSON instead of text."
          }
        }
      },
      "GreaderDisableTag": {
        "type": "object",
        "description": "What `disable-tag` reads, as a form.",
        "required": [
          "s"
        ],
        "properties": {
          "s": {
            "type": "string",
            "description": "The folder or label to take away: `user/-/label/<name>`. A folder's\nfeeds move to the top; a label leaves its articles."
          }
        }
      },
      "GreaderEditSubscription": {
        "type": "object",
        "description": "What `subscription/edit` reads, as a form.",
        "required": [
          "ac",
          "s"
        ],
        "properties": {
          "ac": {
            "type": "string",
            "description": "`subscribe`, `unsubscribe` or `edit`."
          },
          "s": {
            "type": "string",
            "description": "The feed: `feed/<address>` to subscribe, `feed/<id>` otherwise."
          },
          "a": {
            "type": [
              "string",
              "null"
            ],
            "description": "The folder to put it in: `user/-/label/<folder>`."
          },
          "r": {
            "type": [
              "string",
              "null"
            ],
            "description": "The folder to take it out of."
          },
          "t": {
            "type": [
              "string",
              "null"
            ],
            "description": "A name of the reader's own for it."
          }
        }
      },
      "GreaderEditTag": {
        "type": "object",
        "description": "What `edit-tag` reads, as a form.",
        "required": [
          "i"
        ],
        "properties": {
          "i": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The ID of an item; once per item."
          },
          "a": {
            "type": [
              "string",
              "null"
            ],
            "description": "A state or label to give them: `user/-/state/com.google/read`,\n`.../starred` or `user/-/label/<label>`."
          },
          "r": {
            "type": [
              "string",
              "null"
            ],
            "description": "A state or label to take from them."
          }
        }
      },
      "GreaderMarkAllRead": {
        "type": "object",
        "description": "What `mark-all-as-read` reads, as a form.",
        "required": [
          "s"
        ],
        "properties": {
          "s": {
            "type": "string",
            "description": "The stream to mark read, as for `stream/contents`."
          },
          "ts": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Only what arrived before this time, as `ot` of `stream/contents`, so\nthat nothing that arrived since the app looked is marked."
          }
        }
      },
      "GreaderQuickAdd": {
        "type": "object",
        "description": "What `subscription/quickadd` reads, as a form.",
        "required": [
          "quickadd"
        ],
        "properties": {
          "quickadd": {
            "type": "string",
            "description": "The address of a feed, or of a web page that names one."
          }
        }
      },
      "GreaderRenameTag": {
        "type": "object",
        "description": "What `rename-tag` reads, as a form.",
        "required": [
          "s",
          "dest"
        ],
        "properties": {
          "s": {
            "type": "string",
            "description": "The folder or label: `user/-/label/<name>`."
          },
          "dest": {
            "type": "string",
            "description": "What it is called from now on: `user/-/label/<name>`."
          }
        }
      },
      "GreaderUserInfo": {
        "type": "object",
        "description": "Who is logged in, as `GET /reader/api/0/user-info` answers.",
        "required": [
          "userId",
          "userName",
          "userProfileId",
          "userEmail"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "userProfileId": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          }
        }
      },
      "Health": {
        "type": "object",
        "description": "What `GET /api/health` answers.",
        "required": [
          "status",
          "feeds"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Always `ok`: the server answers and its database too."
          },
          "feeds": {
            "type": "integer",
            "format": "int64",
            "description": "How many feeds the server knows."
          }
        }
      },
      "Invite": {
        "type": "object",
        "description": "An invitation as the one who made it sees it. The link itself is shown\nonce, when it is made.",
        "required": [
          "id",
          "max_uses",
          "uses",
          "created_at",
          "expires_at",
          "revoked",
          "usable"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "max_uses": {
            "type": "integer",
            "format": "int32",
            "description": "For how many accounts it is, and how many it brought."
          },
          "uses": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "usable": {
            "type": "boolean",
            "description": "It can still be used: not taken back, not run out, not used up."
          }
        }
      },
      "Invites": {
        "type": "object",
        "description": "The reader's invitations and how many more they can make.\n\n`GET /api/invites` answers with it.",
        "required": [
          "invites",
          "days"
        ],
        "properties": {
          "invites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invite"
            },
            "description": "The newest first."
          },
          "left": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "For how many more accounts the reader can make invitations. Left out\nfor an admin, who has no quota."
          },
          "days": {
            "type": "integer",
            "format": "int32",
            "description": "How many days a new invitation is good for."
          }
        }
      },
      "Label": {
        "type": "object",
        "description": "A label. `GET /api/labels` answers with a list of them.",
        "required": [
          "id",
          "title",
          "color",
          "position"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "position": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "LabelChange": {
        "type": "object",
        "description": "What to change about a label; what is left out stays.\n\nWhat `PATCH /api/labels/{id}` reads.",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LegalLinks": {
        "type": "object",
        "description": "Where the operator's texts are, and which version of the terms counts.\n\n`GET /api/login/ways` answers with it, to anybody.",
        "properties": {
          "imprint": {
            "type": [
              "string",
              "null"
            ]
          },
          "privacy": {
            "type": [
              "string",
              "null"
            ]
          },
          "terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "terms_version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version of the terms an account has to agree to; none if nobody\nhas to."
          }
        }
      },
      "List": {
        "type": "object",
        "description": "A page of a list, the newest article first. For the next page, ask again\nwith `before` set to the `id` of the last article of this one. A list asked\nfor with `after` has the oldest article first and goes on the same way,\nwith `after`.",
        "required": [
          "articles"
        ],
        "properties": {
          "articles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListItem"
            }
          }
        }
      },
      "ListItem": {
        "allOf": [
          {
            "type": "object",
            "description": "One line of a list.",
            "required": [
              "feed_id",
              "seq",
              "id",
              "published_at",
              "version",
              "title",
              "teaser",
              "author",
              "read",
              "starred"
            ],
            "properties": {
              "feed_id": {
                "type": "integer",
                "format": "int32"
              },
              "seq": {
                "type": "integer",
                "format": "int32"
              },
              "id": {
                "type": "integer",
                "format": "int64",
                "description": "Where the article stands in the order of arrival; the anchor for the next page."
              },
              "published_at": {
                "type": "string"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the current version replaced the one before, if it ever did."
              },
              "updated_what": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Changed",
                    "description": "What was different then; null for a change from before rueder noted it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "format": "int32"
              },
              "title": {
                "type": "string"
              },
              "teaser": {
                "type": "string"
              },
              "author": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "thumbnail_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "read": {
                "type": "boolean"
              },
              "starred": {
                "type": "boolean"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "labels"
            ],
            "properties": {
              "labels": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        ],
        "description": "A line of a list, with the labels the reader gave the article."
      },
      "LoginWays": {
        "type": "object",
        "description": "The ways to log in this server has besides name and password.\n\n`GET /api/login/ways` answers with it, to anybody.",
        "required": [
          "oidc",
          "registration",
          "passkeys",
          "password_reset",
          "legal"
        ],
        "properties": {
          "oidc": {
            "type": "boolean",
            "description": "Through the OpenID Connect provider, at `/api/oidc/start`."
          },
          "registration": {
            "type": "boolean",
            "description": "Anybody can make an account for themselves, at `/api/register`."
          },
          "passkeys": {
            "type": "boolean",
            "description": "With a passkey, at `/api/login/passkey`."
          },
          "password_reset": {
            "type": "boolean",
            "description": "A forgotten password can be set anew with a link mailed to the\naccount's address, at `/api/password/forgot`."
          },
          "legal": {
            "$ref": "#/components/schemas/LegalLinks",
            "description": "The operator's legal texts, for the login page to link to."
          }
        }
      },
      "MadeInvite": {
        "type": "object",
        "description": "A new invitation, with its token, which is never shown again. The link is\nthe page's address with `#invite=<token>`.",
        "required": [
          "id",
          "token",
          "expires_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "token": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          }
        }
      },
      "Me": {
        "type": "object",
        "description": "Who is logged in, as the API says it.\n\n`GET /api/me` and `POST /api/login` answer with it.",
        "required": [
          "id",
          "username",
          "is_admin",
          "has_password",
          "admin_needs_second_factor",
          "content_reports",
          "app_api",
          "passkeys",
          "email_mode"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "username": {
            "type": "string"
          },
          "is_admin": {
            "type": "boolean"
          },
          "has_password": {
            "type": "boolean",
            "description": "Whether the account has a password, which deleting it asks for. One\nthat logs in only through OpenID Connect has none."
          },
          "admin_needs_second_factor": {
            "type": "boolean",
            "description": "An admin whose right waits for a login with a second factor, where the\nserver wants one of admins."
          },
          "terms_to_accept": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version of the terms of use the account has yet to agree to, where\nthe server names one; the page asks before anything else."
          },
          "content_reports": {
            "type": "boolean",
            "description": "Whether the account may report feeds and articles on this server."
          },
          "app_api": {
            "type": "boolean",
            "description": "Whether apps of other makers may log in to this server with app\npasswords."
          },
          "passkeys": {
            "type": "boolean",
            "description": "Whether this server has passkeys (see `PUBLIC_URL`)."
          },
          "email_mode": {
            "$ref": "#/components/schemas/EmailMode",
            "description": "Whether accounts here have an address, and whether they must; the page\nasks for one where the account has none."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account's confirmed address."
          },
          "email_pending": {
            "type": [
              "string",
              "null"
            ],
            "description": "An address whose link was mailed and not yet opened."
          }
        }
      },
      "Move": {
        "type": "object",
        "description": "Where a node goes, seen from the node it is dropped on, as in the\ninterface's own model of the tree.\n\nWhat `POST /api/tree/move` reads.",
        "required": [
          "node",
          "target",
          "position"
        ],
        "properties": {
          "node": {
            "$ref": "#/components/schemas/NodeRef"
          },
          "target": {
            "$ref": "#/components/schemas/NodeRef"
          },
          "position": {
            "$ref": "#/components/schemas/DropPosition"
          }
        }
      },
      "NewAccount": {
        "type": "object",
        "description": "What `POST /api/accounts` reads, for admins only. It answers with `Created`.",
        "required": [
          "username",
          "password",
          "proof"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string",
            "description": "The first password, which the admin hands over and the reader changes."
          },
          "is_admin": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "proof": {
            "$ref": "#/components/schemas/OwnerProof",
            "description": "That the admin is there: their own password and code, or a passkey."
          }
        }
      },
      "NewAgent": {
        "type": "object",
        "description": "What `PUT /api/feeds/{id}/agent` reads.",
        "required": [
          "agent"
        ],
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/FetchAgent"
          }
        }
      },
      "NewAppPassword": {
        "type": "object",
        "description": "What `POST /api/app-passwords` reads: a name for it, and the account's\npassword and, where the second factor is on, one of its codes; or a\npasskey instead of both.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "NewEmail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmailProof"
          },
          {
            "type": "object",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "language": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The language of the page, such as `de`: the account's mail is written\nin it from now on, unless a page made the account, whose language\nstays."
              }
            }
          }
        ],
        "description": "What `PUT /api/email` reads: the new address, and the account's password\nand, where the second factor is on, one of its codes; or a passkey instead\nof both. A stolen session must not be able to send the account's mail\nelsewhere."
      },
      "NewFolder": {
        "type": "object",
        "description": "What `POST /api/folders` reads. It answers with `Created`.",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "parent_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "NewInvite": {
        "type": "object",
        "description": "What `POST /api/invites` reads. It answers with `MadeInvite`.",
        "properties": {
          "uses": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "For how many accounts the link is; one if left out."
          }
        }
      },
      "NewLabel": {
        "type": "object",
        "description": "What `POST /api/labels` reads. It answers with `Created`.",
        "required": [
          "title",
          "color"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      },
      "NewPasskey": {
        "type": "object",
        "description": "What `POST /api/passkeys/register` reads: a name for the passkey, and what\nshows that the owner is there (see [`second_factor::prove`]).",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "NewPassword": {
        "type": "object",
        "description": "What `PUT /api/password` reads: the new password, and what shows that the\nowner asks, as for an app password.",
        "required": [
          "new"
        ],
        "properties": {
          "current": {
            "type": [
              "string",
              "null"
            ],
            "description": "The password so far. An account that has none needs none."
          },
          "new": {
            "type": "string"
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the second factor is on: a code from the app or a recovery code."
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer",
                "description": "A passkey of the account, instead of the password so far and the code."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "NewRegistration": {
        "type": "object",
        "description": "What `POST /api/register` reads. It answers with `Me` and sets the\nsession's cookie, as a login does.\n\nA refusal is 403 with one word: `terms` (the terms of use the server names\nwere not agreed to), `closed` (no invitation, and registration is not open),\n`invite` (the invitation cannot be used), `full` (no room for another\naccount), `today` (enough accounts for one day) or `captcha` (no captcha\ncame that counts, where open registration asks for one). A name or a\npassword that cannot be one is 400 with the reason, a name that is taken\n409.",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "invite": {
            "type": [
              "string",
              "null"
            ],
            "description": "The token of an invitation."
          },
          "accepted_terms": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version of the terms of use agreed to, where the server names one."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address, where the server asks for one (`email` in\n`GET /api/register`)."
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "The language of the page, such as `de`: the account's mail is\nwritten in it."
          },
          "captcha": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CaptchaSolution",
                "description": "The solved captcha of `GET /api/register`, where it named one."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "NewSubscription": {
        "type": "object",
        "description": "What `POST /api/feeds` reads. It answers with `Subscribed`.",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "folder_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "page": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The address is of a web page without a feed, as the search found it:\nits feed comes from RSSifier."
          }
        }
      },
      "NodeRef": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "id",
              "kind"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "folder"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "kind"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "feed"
                ]
              }
            }
          }
        ],
        "description": "A folder or a subscription, as the tree's changes name them."
      },
      "OidcLink": {
        "type": "object",
        "description": "What `POST /api/oidc/link` answers.",
        "required": [
          "ticket"
        ],
        "properties": {
          "ticket": {
            "type": "string",
            "description": "For `GET /api/oidc/start?link=<ticket>`, once, within five minutes,\nfrom this session."
          }
        }
      },
      "OpmlImported": {
        "type": "object",
        "description": "What an import did.\n\n`POST /api/opml` answers with it; the request is the file itself.",
        "required": [
          "feeds",
          "folders",
          "known",
          "skipped"
        ],
        "properties": {
          "feeds": {
            "type": "integer",
            "description": "Feeds the account reads now and did not before.",
            "minimum": 0
          },
          "folders": {
            "type": "integer",
            "description": "Folders that were made.",
            "minimum": 0
          },
          "known": {
            "type": "integer",
            "description": "Feeds of the file the account read already.",
            "minimum": 0
          },
          "skipped": {
            "type": "integer",
            "description": "Outlines that were left out, see [`Outline::skipped`].",
            "minimum": 0
          }
        }
      },
      "Order": {
        "type": "object",
        "description": "A new order: every number once, in the order they shall stand in.",
        "required": [
          "ids"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "OwnerProof": {
        "type": "object",
        "description": "How the owner of a session's account shows, for a change that needs it,\nthat they are there: the password, which an account without one does\nwithout, and where the second factor is on, a code from the app or a\nrecovery code; or a passkey instead of both (see [`prove`]).",
        "properties": {
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Passkey": {
        "type": "object",
        "description": "A passkey as the list shows it.",
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "used_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it last logged in or showed it was the owner; null until then."
          }
        }
      },
      "PasskeyAnswer": {
        "type": "object",
        "description": "The device's answer to a ceremony that asked for a passkey, which logs in\nor shows that the owner is there.",
        "required": [
          "ceremony",
          "credential"
        ],
        "properties": {
          "ceremony": {
            "type": "string"
          },
          "credential": {}
        }
      },
      "PasskeyChallenge": {
        "type": "object",
        "description": "What a ceremony asks the device: the options for\n`navigator.credentials.create()` or `.get()`, in WebAuthn's JSON, with the\nname of the ceremony to send the answer back with.",
        "required": [
          "ceremony",
          "options"
        ],
        "properties": {
          "ceremony": {
            "type": "string"
          },
          "options": {}
        }
      },
      "PasskeyRegistration": {
        "type": "object",
        "description": "The device's answer to a ceremony that made a new passkey.\n\n`POST /api/passkeys` reads it.",
        "required": [
          "ceremony",
          "credential"
        ],
        "properties": {
          "ceremony": {
            "type": "string"
          },
          "credential": {}
        }
      },
      "Passkeys": {
        "type": "object",
        "description": "What `GET /api/passkeys` answers.",
        "required": [
          "passkeys",
          "max"
        ],
        "properties": {
          "passkeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Passkey"
            }
          },
          "max": {
            "type": "integer",
            "format": "int64",
            "description": "How many the account can have."
          }
        }
      },
      "Pending": {
        "type": "object",
        "description": "An address that waits for its link.",
        "required": [
          "pending"
        ],
        "properties": {
          "pending": {
            "type": "string"
          }
        }
      },
      "RecoveryCodes": {
        "type": "object",
        "description": "The recovery codes, shown once.\n\n`POST /api/second-factor/confirm` answers with them.",
        "required": [
          "codes"
        ],
        "properties": {
          "codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RegisteredPasskey": {
        "type": "object",
        "description": "What `POST /api/passkeys` answers: the new passkey, and the recovery codes\nwhere it turned the second factor on.",
        "required": [
          "passkey"
        ],
        "properties": {
          "passkey": {
            "$ref": "#/components/schemas/Passkey"
          },
          "recovery_codes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Registering": {
        "type": "object",
        "description": "What the page for registering needs to know before anybody typed a name.\n\n`GET /api/register` answers with it, to anybody; with the token of an\ninvitation in the header `X-Rueder-Invite` it also says whether that\ninvitation can be used.",
        "required": [
          "open",
          "email"
        ],
        "properties": {
          "open": {
            "type": "boolean",
            "description": "Anybody can register, and there is room."
          },
          "email": {
            "$ref": "#/components/schemas/EmailMode",
            "description": "Whether the form asks for an address, and whether it must be one."
          },
          "invite": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the invitation that was asked about is good: known, not taken\nback, not run out, not used up. Left out if none was asked about."
          },
          "captcha": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CaptchaChallenge",
                "description": "The captcha to solve before registering without an invitation, while\nregistration is open and asks for one. Each is good for a few minutes\nand once, so the page asks for it when it sends."
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "RemovePasskey": {
        "type": "object",
        "description": "What `DELETE /api/passkeys/{id}` reads: what shows that the owner is there.",
        "properties": {
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Rename": {
        "type": "object",
        "description": "What `PATCH /api/folders/{id}` and `PATCH /api/feeds/{id}` read. A\nsubscription without a title of its own goes by its feed's.",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReportKind": {
        "type": "string",
        "description": "What kind of error a report is about.",
        "enum": [
          "error",
          "rejection",
          "component",
          "request"
        ]
      },
      "ReportReason": {
        "type": "string",
        "description": "Why something is reported.",
        "enum": [
          "illegal",
          "copyright",
          "malicious",
          "spam",
          "other"
        ]
      },
      "ReportReasonCount": {
        "type": "object",
        "required": [
          "reason",
          "reports"
        ],
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/ReportReason"
          },
          "reports": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ReportedFeed": {
        "type": "object",
        "description": "A feed readers reported, for the status page: its address, never who.",
        "required": [
          "feed_id",
          "url",
          "title",
          "reports",
          "reasons",
          "last_at",
          "blocked"
        ],
        "properties": {
          "feed_id": {
            "type": "integer",
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "reports": {
            "type": "integer",
            "format": "int64"
          },
          "reasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportReasonCount"
            },
            "description": "How many reports gave each reason, the most first."
          },
          "last_at": {
            "type": "string"
          },
          "blocked": {
            "type": "boolean"
          }
        }
      },
      "ReportsConsent": {
        "type": "object",
        "description": "What `GET /api/reports/consent` answers.",
        "required": [
          "available",
          "on"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether this server takes reports at all."
          },
          "on": {
            "type": "boolean",
            "description": "Whether this account sends them."
          }
        }
      },
      "ReportsConsentChange": {
        "type": "object",
        "description": "What `PUT /api/reports/consent` reads. Off deletes what the account sent.",
        "required": [
          "on"
        ],
        "properties": {
          "on": {
            "type": "boolean"
          }
        }
      },
      "Resend": {
        "type": "object",
        "description": "What `POST /api/email/resend` reads: the name and password of an account\nthat waits for its address.",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "ResetPassword": {
        "type": "object",
        "description": "What `POST /api/password/reset` reads: the token from the link and the new\npassword.",
        "required": [
          "token",
          "new"
        ],
        "properties": {
          "token": {
            "type": "string"
          },
          "new": {
            "type": "string"
          }
        }
      },
      "RssifierLimits": {
        "type": "object",
        "description": "A token's limits in RSSifier.",
        "properties": {
          "per_minute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "fetches_per_hour": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "at_once": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "RssifierUsage": {
        "type": "object",
        "description": "What RSSifier says rueder's token used of its limits (`GET /v1/usage`).",
        "required": [
          "name",
          "limits",
          "requests",
          "fetches",
          "under_way"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the token."
          },
          "limits": {
            "$ref": "#/components/schemas/RssifierLimits"
          },
          "requests": {
            "type": "integer",
            "format": "int32",
            "description": "Requests in the last minute, as far as the limit counts them.",
            "minimum": 0
          },
          "fetches": {
            "type": "integer",
            "format": "int32",
            "description": "Pages fetched in the last hour, as far as the limit counts them.",
            "minimum": 0
          },
          "under_way": {
            "type": "integer",
            "format": "int32",
            "description": "Requests under way now.",
            "minimum": 0
          }
        }
      },
      "Rule": {
        "type": "object",
        "description": "A rule as the API takes and gives it.\n\n`GET /api/rules` answers with a list of them. `POST /api/rules`,\n`PUT /api/rules/{id}` and `POST /api/rules/preview` read one; there the `id`\ncounts for nothing, and a rule without `enabled` is enabled.",
        "required": [
          "scope",
          "field",
          "match",
          "pattern",
          "action"
        ],
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "scope": {
            "$ref": "#/components/schemas/RuleScope"
          },
          "field": {
            "$ref": "#/components/schemas/RuleField"
          },
          "match": {
            "$ref": "#/components/schemas/RuleMatch"
          },
          "pattern": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/RuleAction"
          }
        }
      },
      "RuleAction": {
        "type": "string",
        "description": "What a rule does with an article it matches.",
        "enum": [
          "hide",
          "read"
        ]
      },
      "RuleChanged": {
        "type": "object",
        "description": "What a look at the articles changed.",
        "required": [
          "hidden",
          "shown",
          "read"
        ],
        "properties": {
          "hidden": {
            "type": "integer",
            "description": "Articles that are hidden now and were not.",
            "minimum": 0
          },
          "shown": {
            "type": "integer",
            "description": "Articles that were hidden and are back.",
            "minimum": 0
          },
          "read": {
            "type": "integer",
            "description": "Articles marked read.",
            "minimum": 0
          }
        }
      },
      "RuleField": {
        "type": "string",
        "description": "The part of an article a rule looks at.",
        "enum": [
          "any",
          "title",
          "content",
          "author",
          "tag"
        ]
      },
      "RuleHits": {
        "type": "object",
        "description": "What one of the stored rules finds.",
        "required": [
          "id",
          "matches",
          "of"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "matches": {
            "type": "integer",
            "description": "The articles the rule matches, whether it is switched on or not,",
            "minimum": 0
          },
          "of": {
            "type": "integer",
            "description": "of this many it looked at: the newest of each feed in its scope.",
            "minimum": 0
          }
        }
      },
      "RuleMatch": {
        "type": "string",
        "description": "How a rule's pattern is read: as text that stands anywhere, as a whole\nword, at the start or at the end of the text, or as a regular expression.\nA rule for all articles has no pattern.",
        "enum": [
          "contains",
          "word",
          "starts",
          "ends",
          "regex",
          "all"
        ]
      },
      "RuleOutcome": {
        "type": "object",
        "description": "What a change to the rules did to the articles that are there.\n\n`POST /api/rules`, `PUT` and `DELETE /api/rules/{id}` answer with it.",
        "required": [
          "id",
          "changed"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "changed": {
            "$ref": "#/components/schemas/RuleChanged"
          }
        }
      },
      "RulePreview": {
        "type": "object",
        "description": "How many articles a rule would catch.\n\nWhat `POST /api/rules/preview` answers.",
        "required": [
          "matches",
          "of"
        ],
        "properties": {
          "matches": {
            "type": "integer",
            "description": "The articles the rule matches,",
            "minimum": 0
          },
          "of": {
            "type": "integer",
            "description": "of this many it looked at: the newest of each feed in its scope.",
            "minimum": 0
          }
        }
      },
      "RuleScope": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "all"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "kind"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "folder"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "id",
              "kind"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "feed"
                ]
              }
            }
          }
        ],
        "description": "Where a rule holds: everywhere, in a folder with all that is in it, or in\none feed."
      },
      "RulesHits": {
        "type": "object",
        "description": "What `GET /api/rules/hits` answers: for every rule of the account what it\nfinds among the articles that are there, as a preview of it would say.",
        "required": [
          "hits"
        ],
        "properties": {
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuleHits"
            }
          }
        }
      },
      "SearchHits": {
        "type": "object",
        "description": "A page of what a search found, the newest first.",
        "required": [
          "articles"
        ],
        "properties": {
          "articles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListItem"
            }
          },
          "next": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Where the next page begins, as `before`; null if nothing older is\nleft. A page can hold fewer articles than asked for, even none, and\nstill have a `next`: the server searches for so long per request."
          }
        }
      },
      "SecondFactor": {
        "type": "object",
        "description": "Whether an account has the second factor, by the app or by passkeys, and\nhow many recovery codes it has left.\n\n`GET /api/second-factor` answers with it.",
        "required": [
          "on",
          "app",
          "passkeys",
          "recovery_codes_left",
          "required_for_admins"
        ],
        "properties": {
          "on": {
            "type": "boolean",
            "description": "Whether the second factor is on: the app or a passkey."
          },
          "app": {
            "type": "boolean",
            "description": "Whether the authenticator app is set up."
          },
          "passkeys": {
            "type": "integer",
            "format": "int64",
            "description": "How many passkeys the account has."
          },
          "recovery_codes_left": {
            "type": "integer",
            "format": "int64"
          },
          "required_for_admins": {
            "type": "boolean",
            "description": "Whether this server lets admins be admins only with it."
          }
        }
      },
      "SecondFactorCode": {
        "type": "object",
        "description": "A code from the app.\n\n`POST /api/second-factor/confirm` reads it.",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "SecondFactorPassword": {
        "type": "object",
        "description": "What setting up reads: the password of the account, which an account that\nhas none does without, and where the second factor is on already through\npasskeys, a recovery code; or a passkey instead of both. Otherwise a\npassword that got out with a session could add an app of its own.",
        "properties": {
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SecondFactorSetup": {
        "type": "object",
        "description": "A new secret for the app, waiting for a code to confirm it.\n\n`POST /api/second-factor/setup` answers with it.",
        "required": [
          "secret",
          "uri",
          "qr_svg"
        ],
        "properties": {
          "secret": {
            "type": "string",
            "description": "The secret in base32, to type into an app by hand."
          },
          "uri": {
            "type": "string",
            "description": "The `otpauth://` address apps read from the QR code."
          },
          "qr_svg": {
            "type": "string",
            "description": "The QR code of `uri`, as SVG."
          }
        }
      },
      "SecondFactorSwitchOff": {
        "type": "object",
        "description": "What switching off reads: the password, as for setting up, and a code from\nthe app or a recovery code; or a passkey instead of both.",
        "properties": {
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "passkey": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PasskeyAnswer"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ServerStatus": {
        "type": "object",
        "description": "What `GET /api/status` answers, for admins only.",
        "required": [
          "version",
          "build",
          "started_at",
          "uptime_s",
          "hints",
          "counts",
          "requests",
          "database",
          "fetcher",
          "finder",
          "rssifier",
          "images",
          "problems",
          "browsers",
          "reported"
        ],
        "properties": {
          "version": {
            "type": "string",
            "description": "The version of the server."
          },
          "build": {
            "$ref": "#/components/schemas/BuildInfo",
            "description": "What this build is: commit, branch, when and how it was built."
          },
          "started_at": {
            "type": "string"
          },
          "uptime_s": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "memory_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The memory the server holds, if the system says.",
            "minimum": 0
          },
          "hints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusHint"
            },
            "description": "What looks like a bottleneck or a problem, the most pressing first."
          },
          "counts": {
            "$ref": "#/components/schemas/StatusCounts"
          },
          "requests": {
            "$ref": "#/components/schemas/StatusRequests"
          },
          "database": {
            "$ref": "#/components/schemas/StatusDatabase"
          },
          "fetcher": {
            "$ref": "#/components/schemas/StatusFetcher"
          },
          "finder": {
            "$ref": "#/components/schemas/StatusFinder"
          },
          "rssifier": {
            "$ref": "#/components/schemas/StatusRssifier"
          },
          "images": {
            "$ref": "#/components/schemas/StatusImages"
          },
          "problems": {
            "$ref": "#/components/schemas/StatusProblems"
          },
          "browsers": {
            "$ref": "#/components/schemas/StatusBrowserErrors",
            "description": "Errors in the browsers of readers who agreed to send them."
          },
          "reported": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportedFeed"
            },
            "description": "Feeds readers reported, with their address: the one place the status\nnames feeds, as the admins have to look at them. Never who reported."
          }
        }
      },
      "StateChange": {
        "type": "object",
        "description": "What to change about one article; what is left out stays.\n\nWhat `PUT /api/feeds/{id}/articles/{seq}/state` reads.",
        "properties": {
          "read": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "starred": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "StatusBrowserError": {
        "type": "object",
        "required": [
          "kind",
          "message",
          "stack",
          "count",
          "accounts",
          "versions",
          "browsers",
          "first",
          "last"
        ],
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "message": {
            "type": "string"
          },
          "stack": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "How often it happened, in all browsers."
          },
          "accounts": {
            "type": "integer",
            "format": "int64",
            "description": "In how many accounts."
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The versions of the frontend and the browsers it happened in."
          },
          "browsers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "first": {
            "type": "string"
          },
          "last": {
            "type": "string"
          }
        }
      },
      "StatusBrowserErrors": {
        "type": "object",
        "description": "The errors in browsers, for the status page.",
        "required": [
          "available",
          "consenting",
          "errors"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether the server takes reports at all."
          },
          "consenting": {
            "type": "integer",
            "format": "int64",
            "description": "How many accounts send reports."
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusBrowserError"
            },
            "description": "The errors, the one that happened last first. No account is named."
          }
        }
      },
      "StatusCounts": {
        "type": "object",
        "description": "How much there is.",
        "required": [
          "accounts",
          "feeds",
          "subscribed_feeds",
          "articles",
          "live_connections"
        ],
        "properties": {
          "accounts": {
            "type": "integer",
            "format": "int64"
          },
          "feeds": {
            "type": "integer",
            "format": "int64"
          },
          "subscribed_feeds": {
            "type": "integer",
            "format": "int64",
            "description": "Feeds that are fetched: not blocked, and read by an account that is not\ndisabled."
          },
          "articles": {
            "type": "integer",
            "format": "int64",
            "description": "About how many articles: what PostgreSQL estimates."
          },
          "live_connections": {
            "type": "integer",
            "description": "Open streams of events: about how many tabs are open.",
            "minimum": 0
          }
        }
      },
      "StatusDatabase": {
        "type": "object",
        "description": "The database.",
        "required": [
          "pool_size",
          "pool_idle",
          "pool_max",
          "connections",
          "size_bytes",
          "deadlocks",
          "tables"
        ],
        "properties": {
          "pool_size": {
            "type": "integer",
            "format": "int32",
            "description": "The connections of the server: open, idle, at most.",
            "minimum": 0
          },
          "pool_idle": {
            "type": "integer",
            "minimum": 0
          },
          "pool_max": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "connections": {
            "type": "integer",
            "format": "int64",
            "description": "All connections to the database, the server's and others'."
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "size_warn_bytes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The size from which the status warns, if the operator named one."
          },
          "cache_hit_ratio": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "The share of blocks found in memory, since the statistics began."
          },
          "deadlocks": {
            "type": "integer",
            "format": "int64"
          },
          "longest_query_s": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "The query that has been running longest, in seconds."
          },
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusTable"
            }
          }
        }
      },
      "StatusFailing": {
        "type": "object",
        "required": [
          "failure",
          "feeds"
        ],
        "properties": {
          "failure": {
            "$ref": "#/components/schemas/FetchFailure"
          },
          "status": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "The status the site answered with, for `status`.",
            "minimum": 0
          },
          "feeds": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "StatusFetchPace": {
        "type": "object",
        "description": "How fast feeds are fetched (`FETCH_ROUND`, `FETCH_AT_ONCE`, `FETCH_EVERY`).",
        "required": [
          "round",
          "at_once",
          "every_s",
          "per_hour"
        ],
        "properties": {
          "round": {
            "type": "integer",
            "format": "int64"
          },
          "at_once": {
            "type": "integer",
            "minimum": 0
          },
          "every_s": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_hour": {
            "type": "integer",
            "format": "int64",
            "description": "The most fetches an hour can have at this pace.",
            "minimum": 0
          }
        }
      },
      "StatusFetcher": {
        "type": "object",
        "description": "Fetching feeds.",
        "required": [
          "running",
          "per_hour",
          "behind_s",
          "took",
          "fetched",
          "unchanged",
          "failed",
          "broken",
          "new_articles",
          "failing",
          "overdue",
          "waiting"
        ],
        "properties": {
          "running": {
            "type": "boolean",
            "description": "Whether the server fetches feeds at all."
          },
          "pace": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StatusFetchPace",
                "description": "The pace it fetches at, where it does."
              },
              {
                "type": "null"
              }
            ]
          },
          "per_hour": {
            "type": "integer",
            "format": "int64",
            "description": "How many fetches the last hour had, of all kinds.",
            "minimum": 0
          },
          "behind_s": {
            "type": "number",
            "format": "double",
            "description": "How long the feed that has waited longest past its time has waited, in\nseconds; 0 when none is due."
          },
          "last_round_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_round_feeds": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "last_round_s": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "took": {
            "$ref": "#/components/schemas/Durations",
            "description": "The fetches of the last hour."
          },
          "fetched": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "unchanged": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "broken": {
            "type": "integer",
            "format": "int64",
            "description": "Fetches that failed at the database.",
            "minimum": 0
          },
          "new_articles": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "failing": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusFailing"
            },
            "description": "Feeds whose last fetch failed, by why."
          },
          "overdue": {
            "type": "integer",
            "format": "int64",
            "description": "Feeds fetched more than ten minutes after they were due."
          },
          "most_overdue_s": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "waiting": {
            "type": "integer",
            "format": "int64",
            "description": "Feeds not fetched yet at all."
          }
        }
      },
      "StatusFinder": {
        "type": "object",
        "description": "The feed search, in the last hour.",
        "required": [
          "on",
          "took",
          "found",
          "none",
          "failed",
          "limited"
        ],
        "properties": {
          "on": {
            "type": "boolean",
            "description": "Whether the server looks at addresses at all."
          },
          "took": {
            "$ref": "#/components/schemas/Durations"
          },
          "found": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "none": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "limited": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "StatusHint": {
        "oneOf": [
          {
            "type": "object",
            "description": "Requests to a route take long.",
            "required": [
              "route",
              "p95_ms",
              "kind"
            ],
            "properties": {
              "route": {
                "type": "string"
              },
              "p95_ms": {
                "type": "number",
                "format": "double"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "slow_route"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "A route failed with errors of the server.",
            "required": [
              "route",
              "count",
              "kind"
            ],
            "properties": {
              "route": {
                "type": "string"
              },
              "count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "server_errors"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Every connection to the database is in use.",
            "required": [
              "size",
              "kind"
            ],
            "properties": {
              "size": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "pool_busy"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Feeds are fetched later than they are due.",
            "required": [
              "overdue",
              "most_overdue_s",
              "kind"
            ],
            "properties": {
              "overdue": {
                "type": "integer",
                "format": "int64"
              },
              "most_overdue_s": {
                "type": "number",
                "format": "double"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "fetch_backlog"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Rounds come full and feeds wait: the pace, not the sites, holds the\nfetching back, and `FETCH_ROUND` or `FETCH_EVERY` would let more through.",
            "required": [
              "per_hour",
              "kind"
            ],
            "properties": {
              "per_hour": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "fetch_pace_full"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Many feeds fail.",
            "required": [
              "failing",
              "subscribed",
              "kind"
            ],
            "properties": {
              "failing": {
                "type": "integer",
                "format": "int64"
              },
              "subscribed": {
                "type": "integer",
                "format": "int64"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "feeds_failing"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The fetching does not run.",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "not_fetching"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The database reads much from the disk.",
            "required": [
              "hit_ratio",
              "kind"
            ],
            "properties": {
              "hit_ratio": {
                "type": "number",
                "format": "double"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "cache_misses"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The database has grown to the size the operator warns from\n(`DATABASE_WARN_GB`).",
            "required": [
              "size_bytes",
              "warn_bytes",
              "kind"
            ],
            "properties": {
              "size_bytes": {
                "type": "integer",
                "format": "int64"
              },
              "warn_bytes": {
                "type": "integer",
                "format": "int64"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "database_large"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "A query has been running for a long time.",
            "required": [
              "seconds",
              "kind"
            ],
            "properties": {
              "seconds": {
                "type": "number",
                "format": "double"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "long_query"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The image cache is nearly full.",
            "required": [
              "percent",
              "kind"
            ],
            "properties": {
              "percent": {
                "type": "number",
                "format": "double"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "image_cache_full"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "The server logged errors in the last hour.",
            "required": [
              "count",
              "kind"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "errors"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Readers were turned away for asking too much.",
            "required": [
              "count",
              "kind"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "limited"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Browsers reported errors in the last day.",
            "required": [
              "errors",
              "kind"
            ],
            "properties": {
              "errors": {
                "type": "integer",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "browser_errors"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Readers reported feeds that are not blocked.",
            "required": [
              "feeds",
              "kind"
            ],
            "properties": {
              "feeds": {
                "type": "integer",
                "minimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "reported_feeds"
                ]
              }
            }
          }
        ],
        "description": "Something on the status page that wants looking at."
      },
      "StatusImages": {
        "type": "object",
        "description": "The image proxy.",
        "required": [
          "on",
          "cache_bytes",
          "cache_max_bytes",
          "failing_sources",
          "took",
          "cached",
          "fetched",
          "not_found",
          "source_failed",
          "not_image",
          "too_large"
        ],
        "properties": {
          "on": {
            "type": "boolean"
          },
          "cache_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "cache_max_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "failing_sources": {
            "type": "integer",
            "description": "Sources left alone for now because they failed.",
            "minimum": 0
          },
          "took": {
            "$ref": "#/components/schemas/Durations",
            "description": "Images not in the cache, in the last hour."
          },
          "cached": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "fetched": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "not_found": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "source_failed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "not_image": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "too_large": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "StatusProblem": {
        "type": "object",
        "required": [
          "error",
          "target",
          "text",
          "count",
          "first",
          "last"
        ],
        "properties": {
          "error": {
            "type": "boolean"
          },
          "target": {
            "type": "string",
            "description": "Where in the server it comes from, such as \"rueder::fetch\"."
          },
          "text": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "first": {
            "type": "string"
          },
          "last": {
            "type": "string"
          }
        }
      },
      "StatusProblems": {
        "type": "object",
        "description": "The warnings and errors of the log.",
        "required": [
          "errors",
          "warnings",
          "recent"
        ],
        "properties": {
          "errors": {
            "type": "integer",
            "format": "int64",
            "description": "In the last hour.",
            "minimum": 0
          },
          "warnings": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "recent": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusProblem"
            },
            "description": "The latest first. The same text from the same place is one."
          }
        }
      },
      "StatusRequests": {
        "type": "object",
        "description": "The requests of the last hour.",
        "required": [
          "all",
          "answers",
          "limited",
          "routes"
        ],
        "properties": {
          "all": {
            "$ref": "#/components/schemas/Durations"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Answers by their first digit: 1xx to 5xx. An image whose source did\nnot deliver it counts as refused, not as an error of the server; the\nimage proxy counts it as \"source failed\"."
          },
          "limited": {
            "type": "integer",
            "format": "int64",
            "description": "Answers that said \"too many requests\".",
            "minimum": 0
          },
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatusRoute"
            },
            "description": "The routes, the slowest first by their 95th percentile."
          }
        }
      },
      "StatusRoute": {
        "type": "object",
        "required": [
          "route",
          "took",
          "errors"
        ],
        "properties": {
          "route": {
            "type": "string",
            "description": "The method and the route, such as \"GET /api/feeds/{id}/articles\"."
          },
          "took": {
            "$ref": "#/components/schemas/Durations"
          },
          "errors": {
            "type": "integer",
            "format": "int64",
            "description": "Answers with an error of the server.",
            "minimum": 0
          }
        }
      },
      "StatusRssifier": {
        "type": "object",
        "description": "RSSifier, for web pages without a feed.",
        "required": [
          "on",
          "pages",
          "failing"
        ],
        "properties": {
          "on": {
            "type": "boolean",
            "description": "Whether the server has RSSifier (`RSSIFIER_URL`)."
          },
          "pages": {
            "type": "integer",
            "format": "int64",
            "description": "Web pages that are read, as `subscribed_feeds` counts feeds."
          },
          "failing": {
            "type": "integer",
            "format": "int64",
            "description": "Of them, those whose last fetch failed."
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RssifierUsage",
                "description": "What RSSifier says the server's token used; null where it is off or\ndid not answer."
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why RSSifier did not answer."
          }
        }
      },
      "StatusTable": {
        "type": "object",
        "required": [
          "name",
          "bytes",
          "rows"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "format": "int64",
            "description": "With its indexes and, for a table in parts, all of them."
          },
          "rows": {
            "type": "integer",
            "format": "int64",
            "description": "What PostgreSQL estimates."
          }
        }
      },
      "Subscribed": {
        "type": "object",
        "description": "The answer to subscribing: the number of the feed.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TermsAgreement": {
        "type": "object",
        "description": "The version of the terms the reader agrees to.\n\n`PUT /api/terms` reads it.",
        "required": [
          "version"
        ],
        "properties": {
          "version": {
            "type": "string"
          }
        }
      },
      "Tree": {
        "type": "object",
        "description": "What `GET /api/tree` answers: the account's folders and subscriptions, each\nas a plain list. `parent_id` and `folder_id` say what lies where, `position`\nin which order.",
        "required": [
          "folders",
          "feeds",
          "hidden"
        ],
        "properties": {
          "folders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Folder"
            }
          },
          "feeds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Feed"
            }
          },
          "hidden": {
            "type": "integer",
            "format": "int64",
            "description": "How many articles the account's rules hide, for the list of them."
          }
        }
      },
      "Upto": {
        "type": "object",
        "description": "How far to mark as read: up to a number in the feed, or up to the article\nof this `id` in the order of arrival, which is what a mixed list knows.\nWith `older_than`, only what was published more than that many seconds\nago.\n\nWhat `POST /api/feeds/{id}/read`, `/api/folders/{id}/read` and `/api/read`\nread.",
        "properties": {
          "upto": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "upto_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "older_than": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          }
        }
      },
      "Versions": {
        "type": "object",
        "description": "What `GET /api/feeds/{id}/articles/{seq}/versions` answers: the versions of\nthe article that are kept, oldest first.",
        "required": [
          "versions"
        ],
        "properties": {
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArticleVersion"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "app_password": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "GoogleLogin auth=<token>, with the token that POST /greader/accounts/ClientLogin answers for an app password."
      },
      "metrics_token": {
        "type": "http",
        "scheme": "bearer",
        "description": "The token the operator set in METRICS_TOKEN, for Prometheus."
      },
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-rueder",
        "description": "The session, as POST /api/login, a passkey or OpenID Connect set it."
      }
    }
  },
  "tags": [
    {
      "name": "Session",
      "description": "Logging in and out, with a password, a passkey or OpenID Connect, and who is logged in."
    },
    {
      "name": "Reading",
      "description": "The tree of folders and feeds with their unread counts, the lists of articles, an article with its versions, what was read, and the search."
    },
    {
      "name": "Feeds and folders",
      "description": "Changing the tree: folders, renaming, moving and ending subscriptions, and the reader's settings."
    },
    {
      "name": "Subscribing",
      "description": "Finding the feeds of a web page, subscribing to one, and OPML in and out."
    },
    {
      "name": "Labels",
      "description": "The reader's own colored marks for articles."
    },
    {
      "name": "Filter rules",
      "description": "Rules that hide articles, or mark them read, as they arrive."
    },
    {
      "name": "Account",
      "description": "The reader's own account: sessions, password, second factor, passkeys, app passwords, moving it to another rueder, and deleting it."
    },
    {
      "name": "Registration",
      "description": "Accounts that make themselves, where the operator allows it, and invitations."
    },
    {
      "name": "Admin",
      "description": "For admins only: the status of the server and the accounts."
    },
    {
      "name": "Reports",
      "description": "Reports of feeds and articles by their readers, and errors in browsers of readers who agreed to send them."
    },
    {
      "name": "Legal",
      "description": "Where the operator's imprint, privacy policy and terms of use are, and agreeing to the terms."
    },
    {
      "name": "Live updates",
      "description": "What changes for the account, as server-sent events to every open page."
    },
    {
      "name": "Images",
      "description": "The image proxy, at addresses the server signs and sends in what it answers."
    },
    {
      "name": "Android",
      "description": "What the Android app needs from the server."
    },
    {
      "name": "Google Reader API",
      "description": "For feed reader apps of other makers (NetNewsWire, Read You, Reeder and others), as FreshRSS and Miniflux have it: an app logs in with an app password at `ClientLogin` and names the token it gets in `Authorization: GoogleLogin auth=<token>`. Requests are forms or query parameters; what only reads takes GET and POST alike, as some apps send everything as a form."
    }
  ]
}
