{
  "components": {
    "schemas": {
      "AccessControl": {
        "enum": [
          "off",
          "enforced"
        ],
        "type": "string"
      },
      "AccessRuleJobResponse": {
        "additionalProperties": false,
        "description": "A rule change that moves files: the rule and its ``apply_access_rule``\njob. The files under the rule stay hidden until the job succeeds.",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/JobResponse"
          },
          "rule": {
            "$ref": "#/components/schemas/AccessRuleResponse"
          }
        },
        "required": [
          "rule",
          "job"
        ],
        "title": "AccessRuleJobResponse",
        "type": "object"
      },
      "AccessRulePage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AccessRuleResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AccessRulePage",
        "type": "object"
      },
      "AccessRuleResponse": {
        "additionalProperties": false,
        "description": "An access rule. It has ``folder`` or ``file``, never both.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "folder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "readers": {
            "items": {
              "type": "string"
            },
            "title": "Readers",
            "type": "array"
          },
          "sealed": {
            "title": "Sealed",
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "readers",
          "sealed",
          "created_at",
          "updated_at"
        ],
        "title": "AccessRuleResponse",
        "type": "object"
      },
      "Action": {
        "enum": [
          "read",
          "write",
          "search",
          "query"
        ],
        "type": "string"
      },
      "AddFileRequest": {
        "additionalProperties": false,
        "properties": {
          "metadata": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Metadata",
            "type": "object"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/FileSourceBody"
          }
        },
        "required": [
          "path",
          "source"
        ],
        "title": "AddFileRequest",
        "type": "object"
      },
      "AddFileResponse": {
        "additionalProperties": false,
        "description": "The added file and its job. ``upload`` is only in the answer for an\n``upload`` source.",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/FileResponse"
          },
          "job": {
            "$ref": "#/components/schemas/JobResponse"
          },
          "upload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UploadResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "file",
          "job"
        ],
        "title": "AddFileResponse",
        "type": "object"
      },
      "AnswerEffort": {
        "enum": [
          "medium",
          "high"
        ],
        "type": "string"
      },
      "AnswerRequest": {
        "additionalProperties": false,
        "description": "An Answer request. ``conversation_id`` and ``allow_partial`` are unknown\nfields here, so each is 400.\n\n``effort``: ``medium`` (the default) or ``high``. ``high`` reads more and\ntakes longer. Deep, many-step work is a research run, not an Answer.\n\n``query_image`` needs a cluster key. ``instructions`` set the answer\nstyle. ``sources`` selects the listed sources: ``all``, ``cited``, or\n``none`` (no markers either).",
        "properties": {
          "effort": {
            "$ref": "#/components/schemas/AnswerEffort",
            "default": "medium"
          },
          "filter": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter"
          },
          "history": {
            "items": {
              "$ref": "#/components/schemas/QueryMessage"
            },
            "maxItems": 32,
            "title": "History",
            "type": "array"
          },
          "instructions": {
            "anyOf": [
              {
                "maxLength": 8000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "principals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principals"
          },
          "query": {
            "maxLength": 32000,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "query_image": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryImageBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "sources": {
            "$ref": "#/components/schemas/AnswerSources",
            "default": "all"
          }
        },
        "required": [
          "query"
        ],
        "title": "AnswerRequest",
        "type": "object"
      },
      "AnswerResponse": {
        "additionalProperties": false,
        "description": "An answer with ``[[SRC:nnnn]]`` markers. ``sources`` lists the sources\nin ``ref`` order: the cited ones first, in the order the answer first cites\nthem, then the rest by score. With ``sources: \"none\"`` the answer has no\nmarkers and ``sources`` is empty. ``usage`` is what the\nquery was metered at. ``image_description`` is a description of the\nquery image, or null when the query had no image. ``effort`` is the effort\nthat answered.",
        "properties": {
          "answer": {
            "title": "Answer",
            "type": "string"
          },
          "effort": {
            "$ref": "#/components/schemas/AnswerEffort"
          },
          "image_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Description"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/SourceResponse"
            },
            "title": "Sources",
            "type": "array"
          },
          "usage": {
            "$ref": "#/components/schemas/QueryUsage"
          }
        },
        "required": [
          "request_id",
          "answer",
          "effort",
          "sources",
          "usage"
        ],
        "title": "AnswerResponse",
        "type": "object"
      },
      "AnswerSources": {
        "enum": [
          "all",
          "cited",
          "none"
        ],
        "type": "string"
      },
      "AttemptStatus": {
        "enum": [
          "succeeded",
          "retry",
          "failed"
        ],
        "type": "string"
      },
      "BBox": {
        "additionalProperties": false,
        "description": "Not returned yet. The box of a one-page figure, as fractions of the\npage from its top-left corner.",
        "properties": {
          "bottom": {
            "maximum": 1,
            "minimum": 0,
            "title": "Bottom",
            "type": "number"
          },
          "left": {
            "maximum": 1,
            "minimum": 0,
            "title": "Left",
            "type": "number"
          },
          "right": {
            "maximum": 1,
            "minimum": 0,
            "title": "Right",
            "type": "number"
          },
          "top": {
            "maximum": 1,
            "minimum": 0,
            "title": "Top",
            "type": "number"
          }
        },
        "required": [
          "left",
          "top",
          "right",
          "bottom"
        ],
        "title": "BBox",
        "type": "object"
      },
      "BatchAccessRulesRequest": {
        "additionalProperties": false,
        "properties": {
          "operations": {
            "items": {
              "$ref": "#/components/schemas/BatchOperation"
            },
            "title": "Operations",
            "type": "array"
          }
        },
        "required": [
          "operations"
        ],
        "title": "BatchAccessRulesRequest",
        "type": "object"
      },
      "BatchAccessRulesResponse": {
        "additionalProperties": false,
        "description": "The rules that ``upsert`` and ``update`` left, in operation order, and\nthe job when some operation moves files (202).",
        "properties": {
          "job": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/AccessRuleResponse"
            },
            "title": "Rules",
            "type": "array"
          }
        },
        "required": [
          "rules"
        ],
        "title": "BatchAccessRulesResponse",
        "type": "object"
      },
      "BatchOperation": {
        "additionalProperties": false,
        "description": "One ``:batch`` operation on the rule of one ``folder`` or ``file``.\n\n``upsert`` takes ``readers`` and ``sealed``. ``update`` takes ``readers``,\n``add_readers``, ``remove_readers``, or ``sealed``. ``delete`` takes none.",
        "properties": {
          "add_readers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Add Readers"
          },
          "file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "folder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder"
          },
          "op": {
            "enum": [
              "upsert",
              "update",
              "delete"
            ],
            "title": "Op",
            "type": "string"
          },
          "readers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Readers"
          },
          "remove_readers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remove Readers"
          },
          "sealed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sealed"
          }
        },
        "required": [
          "op"
        ],
        "title": "BatchOperation",
        "type": "object"
      },
      "ClusterScope": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "cluster",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "ClusterScope",
        "type": "object"
      },
      "CollectionPage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CollectionResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "CollectionPage",
        "type": "object"
      },
      "CollectionResponse": {
        "additionalProperties": false,
        "properties": {
          "access_control": {
            "$ref": "#/components/schemas/AccessControl"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "file_counts": {
            "$ref": "#/components/schemas/FileCountsResponse"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "index_generation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Index Generation"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "namespace": {
            "title": "Namespace",
            "type": "string"
          },
          "processing": {
            "$ref": "#/components/schemas/ProcessingProfile"
          },
          "status": {
            "$ref": "#/components/schemas/CollectionStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "namespace",
          "name",
          "display_name",
          "status",
          "processing",
          "access_control",
          "index_generation",
          "file_counts",
          "created_at",
          "updated_at"
        ],
        "title": "CollectionResponse",
        "type": "object"
      },
      "CollectionScope": {
        "additionalProperties": false,
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/Action"
            },
            "title": "Actions",
            "type": "array"
          },
          "collections": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Collections",
            "type": "array"
          },
          "kind": {
            "const": "collection",
            "title": "Kind",
            "type": "string"
          },
          "namespace": {
            "title": "Namespace",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "namespace",
          "collections",
          "actions"
        ],
        "title": "CollectionScope",
        "type": "object"
      },
      "CollectionStatus": {
        "enum": [
          "empty",
          "indexing",
          "ready",
          "degraded",
          "failed",
          "deleting"
        ],
        "type": "string"
      },
      "CreateAccessRuleRequest": {
        "additionalProperties": false,
        "description": "Create or replace the rule on one ``folder`` (ends with ``/``) or ``file``.",
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "folder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder"
          },
          "readers": {
            "items": {
              "type": "string"
            },
            "title": "Readers",
            "type": "array"
          },
          "sealed": {
            "default": false,
            "title": "Sealed",
            "type": "boolean"
          }
        },
        "required": [
          "readers"
        ],
        "title": "CreateAccessRuleRequest",
        "type": "object"
      },
      "CreateCollectionRequest": {
        "additionalProperties": false,
        "properties": {
          "access_control": {
            "$ref": "#/components/schemas/AccessControl",
            "default": "off"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "exist_ok": {
            "default": false,
            "title": "Exist Ok",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "processing": {
            "$ref": "#/components/schemas/ProcessingRequest",
            "default": {}
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateCollectionRequest",
        "type": "object"
      },
      "CreateKeyRequest": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/KeyScopeBody"
          }
        },
        "required": [
          "name",
          "scope"
        ],
        "title": "CreateKeyRequest",
        "type": "object"
      },
      "CreateNamespaceRequest": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "exist_ok": {
            "default": false,
            "title": "Exist Ok",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateNamespaceRequest",
        "type": "object"
      },
      "CreateWebhookRequest": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "default": true,
            "title": "Enabled",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/WebhookScopeBody"
          },
          "types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Types"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "name",
          "scope",
          "url"
        ],
        "title": "CreateWebhookRequest",
        "type": "object"
      },
      "DeleteNamespaceRequest": {
        "additionalProperties": false,
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          }
        },
        "title": "DeleteNamespaceRequest",
        "type": "object"
      },
      "Delivery": {
        "enum": [
          "inline",
          "url"
        ],
        "type": "string"
      },
      "DeliveryStatus": {
        "enum": [
          "pending",
          "succeeded",
          "failed"
        ],
        "type": "string"
      },
      "DisabledReason": {
        "enum": [
          "requested",
          "failing"
        ],
        "type": "string"
      },
      "ErrorBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "details": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Details",
            "type": "object"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "retryable": {
            "title": "Retryable",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "message",
          "request_id",
          "retryable",
          "details"
        ],
        "title": "ErrorBody",
        "type": "object"
      },
      "ErrorResponse": {
        "additionalProperties": false,
        "description": "Every failure: ``{\"error\": {code, message, request_id, retryable, details}}``.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "FileContentResponse": {
        "additionalProperties": false,
        "description": "A short-lived signed GET URL for the file's bytes.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "title": "FileContentResponse",
        "type": "object"
      },
      "FileCountsResponse": {
        "additionalProperties": false,
        "properties": {
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "indexing": {
            "title": "Indexing",
            "type": "integer"
          },
          "pending": {
            "title": "Pending",
            "type": "integer"
          },
          "ready": {
            "title": "Ready",
            "type": "integer"
          }
        },
        "required": [
          "pending",
          "indexing",
          "ready",
          "failed"
        ],
        "title": "FileCountsResponse",
        "type": "object"
      },
      "FileErrorResponse": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "FileErrorResponse",
        "type": "object"
      },
      "FilePage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FileResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "FilePage",
        "type": "object"
      },
      "FileResponse": {
        "additionalProperties": false,
        "description": "A file. ``error``, the source fields with no value, and\n``governing_rule`` off an enforced collection are left out. ``stage`` is\nalways sent: ``null`` for a file that is not ``indexing``.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FileErrorResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "governing_rule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GoverningRuleResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Metadata",
            "type": "object"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/FileSourceResponse"
          },
          "stage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FileStage"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/FileStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "path",
          "status",
          "source",
          "metadata",
          "created_at",
          "updated_at"
        ],
        "title": "FileResponse",
        "type": "object"
      },
      "FileSourceBody": {
        "discriminator": {
          "mapping": {
            "inline": "#/components/schemas/InlineSourceBody",
            "upload": "#/components/schemas/UploadSourceBody",
            "uri": "#/components/schemas/UriSourceBody"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/UriSourceBody"
          },
          {
            "$ref": "#/components/schemas/UploadSourceBody"
          },
          {
            "$ref": "#/components/schemas/InlineSourceBody"
          }
        ]
      },
      "FileSourceResponse": {
        "additionalProperties": false,
        "properties": {
          "bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "checksum": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum"
          },
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "type": {
            "enum": [
              "uri",
              "upload",
              "inline"
            ],
            "title": "Type",
            "type": "string"
          },
          "uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uri"
          }
        },
        "required": [
          "type",
          "content_type"
        ],
        "title": "FileSourceResponse",
        "type": "object"
      },
      "FileSpan": {
        "additionalProperties": false,
        "description": "A self-contained place in a file: ``[start, end)`` in ``unit``.\n\n``pages`` count from 1: page 7 is ``{start: 7, end: 8}``. ``chars`` count\nUnicode code points in the text form of the file, from 0. ``seconds`` are\nwhole seconds, from 0. ``file`` is the whole file and has no ``start`` or\n``end``.\n\nA ``chars`` span of a PDF or Office file also has ``pages``: the pages\nthat the char range covers, so a client can show a page number. Every\nother span has no ``pages``. A ``pages`` span already is a page range.\n``:read-spans`` accepts a span with or without ``pages``, and refuses\n``pages`` that do not match the char range.\n\nA ``:read-spans`` result span can be empty (``start`` equal to ``end``):\nthe ``text`` of pages or of a file that hold no text, or the transcript of\na file that has no audio. An empty ``chars`` span has the pages that were\nread: the pages of the request, or every page for a ``file`` span. A\nrequest span is never empty.\n\n``start``, ``end``, and ``pages`` are left out when they have no value.\n``bbox`` is not returned yet. A read accepts it and reads the whole page.",
        "properties": {
          "bbox": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BBox"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet."
          },
          "end": {
            "anyOf": [
              {
                "maximum": 2147483647,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          },
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "pages": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageRangeResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "start": {
            "anyOf": [
              {
                "maximum": 2147483647,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "unit": {
            "$ref": "#/components/schemas/SpanUnit"
          }
        },
        "required": [
          "file_id",
          "unit"
        ],
        "title": "FileSpan",
        "type": "object"
      },
      "FileStage": {
        "enum": [
          "engine_queued",
          "checking_source",
          "core_queued",
          "processing",
          "building_index"
        ],
        "type": "string"
      },
      "FileStatus": {
        "enum": [
          "pending",
          "indexing",
          "ready",
          "failed",
          "deleting"
        ],
        "type": "string"
      },
      "GoverningRuleResponse": {
        "additionalProperties": false,
        "description": "The rule that governs a file: its id and its ``folder`` or ``file``.",
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File"
          },
          "folder": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder"
          },
          "id": {
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "GoverningRuleResponse",
        "type": "object"
      },
      "HealthResponse": {
        "additionalProperties": false,
        "properties": {
          "status": {
            "const": "ok",
            "default": "ok",
            "title": "Status",
            "type": "string"
          }
        },
        "title": "HealthResponse",
        "type": "object"
      },
      "Highlight": {
        "additionalProperties": false,
        "description": "Not returned yet. About 300 characters around a match, and the\n``[start, end)`` code point ranges of the matched words in ``text``.",
        "properties": {
          "match_ranges": {
            "items": {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "integer"
                },
                {
                  "type": "integer"
                }
              ],
              "type": "array"
            },
            "title": "Match Ranges",
            "type": "array"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text",
          "match_ranges"
        ],
        "title": "Highlight",
        "type": "object"
      },
      "InfoAuth": {
        "additionalProperties": false,
        "properties": {
          "required": {
            "title": "Required",
            "type": "boolean"
          }
        },
        "required": [
          "required"
        ],
        "title": "InfoAuth",
        "type": "object"
      },
      "InfoEfforts": {
        "additionalProperties": false,
        "properties": {
          "efforts": {
            "items": {
              "type": "string"
            },
            "title": "Efforts",
            "type": "array"
          }
        },
        "required": [
          "efforts"
        ],
        "title": "InfoEfforts",
        "type": "object"
      },
      "InfoEvents": {
        "additionalProperties": false,
        "properties": {
          "types": {
            "items": {
              "type": "string"
            },
            "title": "Types",
            "type": "array"
          },
          "webhooks": {
            "title": "Webhooks",
            "type": "integer"
          }
        },
        "required": [
          "webhooks",
          "types"
        ],
        "title": "InfoEvents",
        "type": "object"
      },
      "InfoModes": {
        "additionalProperties": false,
        "properties": {
          "modes": {
            "items": {
              "type": "string"
            },
            "title": "Modes",
            "type": "array"
          }
        },
        "required": [
          "modes"
        ],
        "title": "InfoModes",
        "type": "object"
      },
      "InfoResponse": {
        "additionalProperties": false,
        "properties": {
          "answer": {
            "$ref": "#/components/schemas/InfoEfforts"
          },
          "api_version": {
            "title": "Api Version",
            "type": "string"
          },
          "auth": {
            "$ref": "#/components/schemas/InfoAuth"
          },
          "events": {
            "$ref": "#/components/schemas/InfoEvents"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "search": {
            "$ref": "#/components/schemas/InfoModes"
          },
          "storage": {
            "$ref": "#/components/schemas/InfoStorage"
          }
        },
        "required": [
          "name",
          "api_version",
          "auth",
          "storage",
          "search",
          "answer",
          "events"
        ],
        "title": "InfoResponse",
        "type": "object"
      },
      "InfoStorage": {
        "additionalProperties": false,
        "properties": {
          "primary": {
            "title": "Primary",
            "type": "string"
          },
          "schemes": {
            "items": {
              "type": "string"
            },
            "title": "Schemes",
            "type": "array"
          }
        },
        "required": [
          "primary",
          "schemes"
        ],
        "title": "InfoStorage",
        "type": "object"
      },
      "InlineSourceBody": {
        "additionalProperties": false,
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "type": {
            "const": "inline",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "content_type",
          "text"
        ],
        "title": "InlineSourceBody",
        "type": "object"
      },
      "Interpretation": {
        "enum": [
          "literal",
          "natural_language"
        ],
        "type": "string"
      },
      "JobErrorResponse": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "JobErrorResponse",
        "type": "object"
      },
      "JobResponse": {
        "additionalProperties": false,
        "description": "A job. ``namespace``, ``collection``, and ``file_id`` are left out when\nthe job has none; ``error`` is always present.",
        "properties": {
          "collection": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collection"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobErrorResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Namespace"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "type": {
            "$ref": "#/components/schemas/JobType"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "error",
          "created_at",
          "updated_at"
        ],
        "title": "JobResponse",
        "type": "object"
      },
      "JobStatus": {
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "canceled"
        ],
        "type": "string"
      },
      "JobType": {
        "enum": [
          "index_file",
          "delete_file",
          "reindex_collection",
          "delete_collection",
          "delete_namespace",
          "apply_access_rule",
          "reindex_metadata"
        ],
        "type": "string"
      },
      "JsonValue": {},
      "KeyPage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KeyResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "KeyPage",
        "type": "object"
      },
      "KeyResponse": {
        "additionalProperties": false,
        "description": "An API key. ``secret`` is only in the answer to the create.\n\nOptional fields are left out when they have no value.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scope": {
            "$ref": "#/components/schemas/KeyScopeBody"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scope",
          "created_at"
        ],
        "title": "KeyResponse",
        "type": "object"
      },
      "KeyScopeBody": {
        "discriminator": {
          "mapping": {
            "cluster": "#/components/schemas/ClusterScope",
            "collection": "#/components/schemas/CollectionScope",
            "namespace": "#/components/schemas/NamespaceScope"
          },
          "propertyName": "kind"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/ClusterScope"
          },
          {
            "$ref": "#/components/schemas/NamespaceScope"
          },
          {
            "$ref": "#/components/schemas/CollectionScope"
          }
        ]
      },
      "Match": {
        "additionalProperties": false,
        "description": "Not returned yet. One place inside a span: where a search matched, or\nthe passage that supports a citation, with the parts that ``include``\nasks for.",
        "properties": {
          "highlight": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Highlight"
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Part"
              },
              {
                "type": "null"
              }
            ]
          },
          "screenshots": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Part"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Screenshots"
          },
          "span": {
            "$ref": "#/components/schemas/FileSpan"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "required": [
          "span"
        ],
        "title": "Match",
        "type": "object"
      },
      "MetadataFieldResponse": {
        "additionalProperties": false,
        "properties": {
          "invalid_values": {
            "title": "Invalid Values",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/MetadataFieldStatus"
          },
          "type": {
            "enum": [
              "text",
              "number",
              "time",
              "bool"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "status",
          "invalid_values"
        ],
        "title": "MetadataFieldResponse",
        "type": "object"
      },
      "MetadataFieldSetting": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "enum": [
              "text",
              "number",
              "time",
              "bool"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "MetadataFieldSetting",
        "type": "object"
      },
      "MetadataFieldStatus": {
        "enum": [
          "ready",
          "indexing"
        ],
        "type": "string"
      },
      "MetadataFieldsResponse": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "additionalProperties": {
              "$ref": "#/components/schemas/MetadataFieldResponse"
            },
            "title": "Fields",
            "type": "object"
          }
        },
        "required": [
          "fields"
        ],
        "title": "MetadataFieldsResponse",
        "type": "object"
      },
      "NamespacePage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/NamespaceResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "NamespacePage",
        "type": "object"
      },
      "NamespaceResponse": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/NamespaceUsageResponse"
          }
        },
        "required": [
          "id",
          "name",
          "display_name",
          "usage",
          "created_at",
          "updated_at"
        ],
        "title": "NamespaceResponse",
        "type": "object"
      },
      "NamespaceScope": {
        "additionalProperties": false,
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/Action"
            },
            "title": "Actions",
            "type": "array"
          },
          "kind": {
            "const": "namespace",
            "title": "Kind",
            "type": "string"
          },
          "namespace": {
            "title": "Namespace",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "namespace",
          "actions"
        ],
        "title": "NamespaceScope",
        "type": "object"
      },
      "NamespaceUsageResponse": {
        "additionalProperties": false,
        "properties": {
          "collections": {
            "title": "Collections",
            "type": "integer"
          },
          "files": {
            "title": "Files",
            "type": "integer"
          },
          "index_bytes": {
            "title": "Index Bytes",
            "type": "string"
          },
          "source_bytes": {
            "title": "Source Bytes",
            "type": "string"
          }
        },
        "required": [
          "collections",
          "files",
          "source_bytes",
          "index_bytes"
        ],
        "title": "NamespaceUsageResponse",
        "type": "object"
      },
      "PageRangeResponse": {
        "additionalProperties": false,
        "description": "Pages as ``[start, end)``, from 1, the same as a ``pages`` span.",
        "properties": {
          "end": {
            "minimum": 1,
            "title": "End",
            "type": "integer"
          },
          "start": {
            "minimum": 1,
            "title": "Start",
            "type": "integer"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "PageRangeResponse",
        "type": "object"
      },
      "Part": {
        "additionalProperties": false,
        "description": "Binary content: ``data`` (base64) inline, or a ``url`` that works until\n``expires_at``. ``size_bytes`` is the decoded size.",
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet. The page of a page screenshot, from 1.",
            "title": "Page"
          },
          "seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet. The time of a video frame, in seconds from the start.",
            "title": "Seconds"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "required": [
          "content_type",
          "size_bytes"
        ],
        "title": "Part",
        "type": "object"
      },
      "ProcessingProfile": {
        "additionalProperties": false,
        "properties": {
          "graph": {
            "title": "Graph",
            "type": "boolean"
          },
          "keyword": {
            "title": "Keyword",
            "type": "boolean"
          },
          "semantic": {
            "title": "Semantic",
            "type": "boolean"
          }
        },
        "required": [
          "keyword",
          "semantic",
          "graph"
        ],
        "title": "ProcessingProfile",
        "type": "object"
      },
      "ProcessingRequest": {
        "additionalProperties": false,
        "description": "A processing profile in a request. A flag left out is true on a create\nand keeps its value on a PATCH.",
        "properties": {
          "graph": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Graph"
          },
          "keyword": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keyword"
          },
          "semantic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Semantic"
          }
        },
        "title": "ProcessingRequest",
        "type": "object"
      },
      "QueryImageBody": {
        "additionalProperties": false,
        "description": "An image to ask about. ``data`` is base64 with no data-URI prefix, and\ndecodes to at most 4 MiB. The engine does not store or index it.",
        "properties": {
          "data": {
            "title": "Data",
            "type": "string"
          },
          "media_type": {
            "$ref": "#/components/schemas/QueryImageMediaType"
          }
        },
        "required": [
          "media_type",
          "data"
        ],
        "title": "QueryImageBody",
        "type": "object"
      },
      "QueryImageMediaType": {
        "enum": [
          "image/png",
          "image/jpeg",
          "image/webp"
        ],
        "type": "string"
      },
      "QueryMessage": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "maxLength": 32000,
            "title": "Content",
            "type": "string"
          },
          "role": {
            "enum": [
              "user",
              "assistant"
            ],
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "QueryMessage",
        "type": "object"
      },
      "QueryUsage": {
        "additionalProperties": false,
        "properties": {
          "credits": {
            "title": "Credits",
            "type": "integer"
          }
        },
        "required": [
          "credits"
        ],
        "title": "QueryUsage",
        "type": "object"
      },
      "ReadErrorResponse": {
        "additionalProperties": false,
        "description": "Why a span has no content: ``not_found``, ``invalid_span``, or\n``content_unavailable``.",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ReadErrorResponse",
        "type": "object"
      },
      "ReadInclude": {
        "enum": [
          "text",
          "raw",
          "file"
        ],
        "type": "string"
      },
      "ReadSpansNext": {
        "additionalProperties": false,
        "description": "The body of the next request: the rest of each span that did not fit,\nwith the parts and the delivery of this request. Send it back as it is,\nwith ``principals``.",
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/Delivery"
          },
          "include": {
            "items": {
              "$ref": "#/components/schemas/ReadInclude"
            },
            "title": "Include",
            "type": "array"
          },
          "spans": {
            "items": {
              "$ref": "#/components/schemas/FileSpan"
            },
            "title": "Spans",
            "type": "array"
          }
        },
        "required": [
          "spans",
          "include",
          "delivery"
        ],
        "title": "ReadSpansNext",
        "type": "object"
      },
      "ReadSpansRequest": {
        "additionalProperties": false,
        "description": "Up to 50 spans to read, as a search, an answer, or a research run gave\nthem, and the parts to return for each. ``principals`` has the same rules\nas on Search and Answer.\n\n``include`` names the parts, and each part fills the result field of the\nsame name. ``text`` (the default) is the text of the span: the text of a\ndocument, or the speech of a video or recording, with its ``lines``.\n``raw`` is the span cut from the file in its own format: a PDF of the\npages, a clip, the image, or the text of a text file. ``file`` is the\nwhole stored file. ``raw`` and ``file`` need the ``read`` action, so a key\nwithout it gets ``forbidden`` for the call. ``text`` needs only\n``search``.\n\n``delivery``: ``inline`` (the default) returns each binary part as base64\n``data``, up to 20 MiB of decoded data a call, in span order. A part past\nthat comes back as a ``url`` that lasts 15 minutes. ``url`` returns every\nbinary part as a ``url``. The raw part of a text file is always inline.",
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/Delivery",
            "default": "inline"
          },
          "include": {
            "items": {
              "$ref": "#/components/schemas/ReadInclude"
            },
            "minItems": 1,
            "title": "Include",
            "type": "array"
          },
          "principals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principals"
          },
          "spans": {
            "items": {
              "$ref": "#/components/schemas/FileSpan"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Spans",
            "type": "array"
          }
        },
        "required": [
          "spans"
        ],
        "title": "ReadSpansRequest",
        "type": "object"
      },
      "ReadSpansResponse": {
        "additionalProperties": false,
        "description": "One result for each request span, in order. ``next`` is the request\nfor the rest of the spans that did not fit, or ``null``.",
        "properties": {
          "next": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReadSpansNext"
              },
              {
                "type": "null"
              }
            ]
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/ReadSpansResult"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "request_id",
          "results",
          "next"
        ],
        "title": "ReadSpansResponse",
        "type": "object"
      },
      "ReadSpansResult": {
        "additionalProperties": false,
        "description": "The content of one span: ``error``, or ``content_type`` and the parts.\nNever both.\n\n``span`` is the place that the parts show, in the unit of the content,\nwhich can differ from the request: the text of a ``pages`` span comes back\nas ``chars`` with ``pages``. It can be empty: pages with no text, or media\nwith no audio. The span of a result with ``error`` is the request span.\nEvery part shows the same place: with ``text``, ``raw`` is cut to the\nspan of the text. A part that the file has no form for, such as the text\nof an image, is left out.\n\n``text`` of a video or recording holds the words of its ``lines``, one line\neach. ``content_type`` is the type of the file.",
        "properties": {
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReadErrorResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Part"
              },
              {
                "type": "null"
              }
            ]
          },
          "lines": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TranscriptLineResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lines"
          },
          "raw": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Part"
              },
              {
                "type": "null"
              }
            ]
          },
          "screenshots": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Part"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet.",
            "title": "Screenshots"
          },
          "span": {
            "$ref": "#/components/schemas/FileSpan"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "required": [
          "span"
        ],
        "title": "ReadSpansResult",
        "type": "object"
      },
      "ReplayWebhookRequest": {
        "additionalProperties": false,
        "description": "Exactly one of ``event_ids`` and ``since``. ``until`` goes with\n``since`` and defaults to now.",
        "properties": {
          "event_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Ids"
          },
          "only_failed": {
            "default": false,
            "title": "Only Failed",
            "type": "boolean"
          },
          "since": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Since"
          },
          "until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Until"
          }
        },
        "title": "ReplayWebhookRequest",
        "type": "object"
      },
      "ReplayWebhookResponse": {
        "additionalProperties": false,
        "properties": {
          "queued": {
            "title": "Queued",
            "type": "integer"
          }
        },
        "required": [
          "queued"
        ],
        "title": "ReplayWebhookResponse",
        "type": "object"
      },
      "ResearchErrorResponse": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "retryable": {
            "title": "Retryable",
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "message",
          "retryable"
        ],
        "title": "ResearchErrorResponse",
        "type": "object"
      },
      "ResearchProgressResponse": {
        "additionalProperties": false,
        "description": "The stage the run reported last.",
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          },
          "stage": {
            "title": "Stage",
            "type": "string"
          },
          "step": {
            "title": "Step",
            "type": "integer"
          },
          "total_steps": {
            "title": "Total Steps",
            "type": "integer"
          }
        },
        "required": [
          "stage",
          "label",
          "step",
          "total_steps"
        ],
        "title": "ResearchProgressResponse",
        "type": "object"
      },
      "ResearchRequest": {
        "additionalProperties": false,
        "description": "A research request: the fields that ``:answer`` takes, except\n``effort``, plus ``web_search``. A research run plans and runs many\nsearch and read steps before it answers. It has no mode or effort.\n\n``web_search``: ``never`` (the default) or ``use_if_needed``.\n``use_if_needed`` needs a cluster key, and the deployment must turn web\nsearch on.\n\n``query_image`` needs a cluster key. ``instructions`` set the answer\nstyle. ``sources`` selects the listed sources: ``all``, ``cited``, or\n``none`` (no markers either).",
        "properties": {
          "filter": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter"
          },
          "history": {
            "items": {
              "$ref": "#/components/schemas/QueryMessage"
            },
            "maxItems": 32,
            "title": "History",
            "type": "array"
          },
          "instructions": {
            "anyOf": [
              {
                "maxLength": 8000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "principals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principals"
          },
          "query": {
            "maxLength": 32000,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "query_image": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryImageBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "sources": {
            "$ref": "#/components/schemas/AnswerSources",
            "default": "all"
          },
          "web_search": {
            "$ref": "#/components/schemas/WebSearch",
            "default": "never"
          }
        },
        "required": [
          "query"
        ],
        "title": "ResearchRequest",
        "type": "object"
      },
      "ResearchResponse": {
        "additionalProperties": false,
        "description": "A research run, read by its id.\n\nA field the run has not set is null. ``progress`` is the last stage.\n``usage`` is set when the run answers, because the run is billed then. A\nrun that a cancel or an error ends after that keeps its ``usage``, so a\n``canceled`` or ``failed`` run can have one. When the run ends\n``succeeded``, ``answer``, ``sources`` (as in ``AnswerResponse``: empty,\nwith no markers in ``answer``, when the request set ``sources: \"none\"``), and\n``image_description`` are set. When it ends ``failed``, ``error`` is set.",
        "properties": {
          "answer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answer"
          },
          "collection": {
            "title": "Collection",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResearchErrorResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "image_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Description"
          },
          "namespace": {
            "title": "Namespace",
            "type": "string"
          },
          "progress": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResearchProgressResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "sources": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SourceResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sources"
          },
          "status": {
            "$ref": "#/components/schemas/ResearchStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueryUsage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "namespace",
          "collection",
          "status",
          "progress",
          "answer",
          "sources",
          "image_description",
          "usage",
          "error",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "title": "ResearchResponse",
        "type": "object"
      },
      "ResearchStatus": {
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "canceled"
        ],
        "type": "string"
      },
      "ResultUnit": {
        "enum": [
          "file",
          "passage"
        ],
        "type": "string"
      },
      "RotateWebhookSecretRequest": {
        "additionalProperties": false,
        "properties": {
          "previous_secret_expires_in_seconds": {
            "default": 86400,
            "title": "Previous Secret Expires In Seconds",
            "type": "integer"
          }
        },
        "title": "RotateWebhookSecretRequest",
        "type": "object"
      },
      "SearchExecution": {
        "additionalProperties": false,
        "properties": {
          "interpretation": {
            "$ref": "#/components/schemas/Interpretation"
          },
          "mode": {
            "$ref": "#/components/schemas/SearchMode"
          }
        },
        "required": [
          "mode",
          "interpretation"
        ],
        "title": "SearchExecution",
        "type": "object"
      },
      "SearchMode": {
        "enum": [
          "keyword",
          "hybrid"
        ],
        "type": "string"
      },
      "SearchRequest": {
        "additionalProperties": false,
        "description": "A Search. Later releases may add fields; this one refuses any it does\nnot list, such as ``allow_partial`` or ``debug``.\n\n``mode``: ``hybrid`` (the default) matches words and meaning together.\n``keyword`` matches words only.",
        "properties": {
          "cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cursor"
          },
          "filter": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filter"
          },
          "interpretation": {
            "$ref": "#/components/schemas/Interpretation",
            "default": "literal"
          },
          "limit": {
            "default": 10,
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "type": "integer"
          },
          "mode": {
            "$ref": "#/components/schemas/SearchMode",
            "default": "hybrid"
          },
          "principals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principals"
          },
          "query": {
            "maxLength": 32000,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "result_type": {
            "$ref": "#/components/schemas/ResultUnit",
            "default": "file"
          }
        },
        "required": [
          "query"
        ],
        "title": "SearchRequest",
        "type": "object"
      },
      "SearchResponse": {
        "additionalProperties": false,
        "description": "Ranked results with their spans. A Search never has an ``answer``.\n``results`` holds one row for each file with ``result_type: file``, and\none row for each place with ``result_type: passage``. Both rows have the\nsame shape.\n\n``warnings`` codes: ``collection_failed``, ``interpretation_failed``,\nand ``interpretation_filter_dropped``.",
        "properties": {
          "execution": {
            "$ref": "#/components/schemas/SearchExecution"
          },
          "index_generation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Index Generation"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "title": "Results",
            "type": "array"
          },
          "timing_ms": {
            "$ref": "#/components/schemas/SearchTiming"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/WarningResponse"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "request_id",
          "index_generation",
          "execution",
          "results",
          "timing_ms",
          "warnings",
          "next_cursor"
        ],
        "title": "SearchResponse",
        "type": "object"
      },
      "SearchResult": {
        "additionalProperties": false,
        "description": "One row. With ``result_type: file``, one file: ``spans`` are the places\nthat matched, best first, with no repeat, and at most three. With\n``result_type: passage``, one place: ``spans`` holds one span, and a file\ncan come back in several rows.",
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Part"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet. The whole stored file."
          },
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "matches": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Match"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet. One match for each span, in the same order.",
            "title": "Matches"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "rank": {
            "title": "Rank",
            "type": "integer"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "spans": {
            "items": {
              "$ref": "#/components/schemas/FileSpan"
            },
            "title": "Spans",
            "type": "array"
          }
        },
        "required": [
          "file_id",
          "path",
          "content_type",
          "rank",
          "score",
          "spans"
        ],
        "title": "SearchResult",
        "type": "object"
      },
      "SearchTiming": {
        "additionalProperties": false,
        "properties": {
          "retrieval": {
            "title": "Retrieval",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "retrieval",
          "total"
        ],
        "title": "SearchTiming",
        "type": "object"
      },
      "SourceResponse": {
        "additionalProperties": false,
        "description": "One answer or research source. ``ref`` is its marker in ``answer``:\n``SRC:0001`` stands there as ``[[SRC:0001]]``.",
        "properties": {
          "cited": {
            "title": "Cited",
            "type": "boolean"
          },
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Part"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet. The whole stored file."
          },
          "matches": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Match"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Not returned yet. On a cited source, one match: the passage that supports the answer.",
            "title": "Matches"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "ref": {
            "title": "Ref",
            "type": "string"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "span": {
            "$ref": "#/components/schemas/FileSpan"
          }
        },
        "required": [
          "ref",
          "span",
          "path",
          "content_type",
          "score",
          "cited"
        ],
        "title": "SourceResponse",
        "type": "object"
      },
      "SpanUnit": {
        "enum": [
          "pages",
          "chars",
          "seconds",
          "file"
        ],
        "type": "string"
      },
      "TranscriptLineResponse": {
        "additionalProperties": false,
        "description": "One line of speech. ``start`` and ``end`` are float seconds on the file\ntimeline. To clip a line, use the span ``[floor(start), ceil(end))``.",
        "properties": {
          "end": {
            "title": "End",
            "type": "number"
          },
          "start": {
            "title": "Start",
            "type": "number"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "text"
        ],
        "title": "TranscriptLineResponse",
        "type": "object"
      },
      "UpdateAccessRuleRequest": {
        "additionalProperties": false,
        "description": "``readers`` replaces the list. ``remove_readers`` then ``add_readers``\nedit it; neither goes with ``readers``.",
        "properties": {
          "add_readers": {
            "items": {
              "type": "string"
            },
            "title": "Add Readers",
            "type": "array"
          },
          "readers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Readers"
          },
          "remove_readers": {
            "items": {
              "type": "string"
            },
            "title": "Remove Readers",
            "type": "array"
          },
          "sealed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sealed"
          }
        },
        "title": "UpdateAccessRuleRequest",
        "type": "object"
      },
      "UpdateCollectionRequest": {
        "additionalProperties": false,
        "description": "Each field left out keeps its value. ``display_name: null`` clears it.",
        "properties": {
          "access_control": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccessControl"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "processing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProcessingRequest"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "UpdateCollectionRequest",
        "type": "object"
      },
      "UpdateMetadataFieldsRequest": {
        "additionalProperties": false,
        "description": "A key set to a setting is listed with that type. A key set to null is\nremoved. A key left out keeps its setting. A body names at most as many\nkeys as a collection may list.",
        "properties": {
          "fields": {
            "additionalProperties": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MetadataFieldSetting"
                },
                {
                  "type": "null"
                }
              ]
            },
            "maxProperties": 256,
            "title": "Fields",
            "type": "object"
          }
        },
        "required": [
          "fields"
        ],
        "title": "UpdateMetadataFieldsRequest",
        "type": "object"
      },
      "UpdateNamespaceRequest": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "UpdateNamespaceRequest",
        "type": "object"
      },
      "UpdateWebhookRequest": {
        "additionalProperties": false,
        "description": "Any of the four fields. ``types: null`` is every type; a field left out\ndoes not change.",
        "properties": {
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookScopeBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Types"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "UpdateWebhookRequest",
        "type": "object"
      },
      "UploadResponse": {
        "additionalProperties": false,
        "description": "Where to PUT an upload's bytes, and until when.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "title": "UploadResponse",
        "type": "object"
      },
      "UploadSourceBody": {
        "additionalProperties": false,
        "properties": {
          "bytes": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "type": {
            "const": "upload",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "content_type"
        ],
        "title": "UploadSourceBody",
        "type": "object"
      },
      "UriSourceBody": {
        "additionalProperties": false,
        "properties": {
          "bytes": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bytes"
          },
          "checksum": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checksum"
          },
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "type": {
            "const": "uri",
            "title": "Type",
            "type": "string"
          },
          "uri": {
            "title": "Uri",
            "type": "string"
          }
        },
        "required": [
          "type",
          "uri",
          "content_type"
        ],
        "title": "UriSourceBody",
        "type": "object"
      },
      "WarningResponse": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "WarningResponse",
        "type": "object"
      },
      "WebSearch": {
        "enum": [
          "never",
          "use_if_needed"
        ],
        "type": "string"
      },
      "WebhookAttemptResponse": {
        "additionalProperties": false,
        "description": "One POST of a batch. ``batch_id`` is that POST's ``webhook-id``.",
        "properties": {
          "batch_id": {
            "title": "Batch Id",
            "type": "string"
          },
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "event_count": {
            "title": "Event Count",
            "type": "integer"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status"
          },
          "sent_at": {
            "format": "date-time",
            "title": "Sent At",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AttemptStatus"
          }
        },
        "required": [
          "number",
          "batch_id",
          "event_count",
          "status",
          "response_status",
          "error",
          "duration_ms",
          "sent_at"
        ],
        "title": "WebhookAttemptResponse",
        "type": "object"
      },
      "WebhookClusterScope": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "cluster",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "title": "WebhookClusterScope",
        "type": "object"
      },
      "WebhookCollectionScope": {
        "additionalProperties": false,
        "properties": {
          "collections": {
            "items": {
              "type": "string"
            },
            "title": "Collections",
            "type": "array"
          },
          "kind": {
            "const": "collection",
            "title": "Kind",
            "type": "string"
          },
          "namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Namespace"
          }
        },
        "required": [
          "kind",
          "namespace",
          "collections"
        ],
        "title": "WebhookCollectionScope",
        "type": "object"
      },
      "WebhookDeliveryDetailResponse": {
        "additionalProperties": false,
        "description": "A delivery with the event's exact JSON and every POST of it.",
        "properties": {
          "attempt_count": {
            "title": "Attempt Count",
            "type": "integer"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/WebhookAttemptResponse"
            },
            "title": "Attempts",
            "type": "array"
          },
          "body": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Body",
            "type": "object"
          },
          "collection": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collection"
          },
          "event_id": {
            "title": "Event Id",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "last_attempt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookAttemptResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Namespace"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "queued_at": {
            "format": "date-time",
            "title": "Queued At",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryStatus"
          }
        },
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "namespace",
          "collection",
          "status",
          "attempt_count",
          "next_attempt_at",
          "last_attempt",
          "queued_at",
          "body",
          "attempts"
        ],
        "title": "WebhookDeliveryDetailResponse",
        "type": "object"
      },
      "WebhookDeliveryPage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "WebhookDeliveryPage",
        "type": "object"
      },
      "WebhookDeliveryResponse": {
        "additionalProperties": false,
        "description": "One event at one webhook, and its last attempt.",
        "properties": {
          "attempt_count": {
            "title": "Attempt Count",
            "type": "integer"
          },
          "collection": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collection"
          },
          "event_id": {
            "title": "Event Id",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "last_attempt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebhookAttemptResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "namespace": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Namespace"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "queued_at": {
            "format": "date-time",
            "title": "Queued At",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryStatus"
          }
        },
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "namespace",
          "collection",
          "status",
          "attempt_count",
          "next_attempt_at",
          "last_attempt",
          "queued_at"
        ],
        "title": "WebhookDeliveryResponse",
        "type": "object"
      },
      "WebhookDeliverySummary": {
        "additionalProperties": false,
        "properties": {
          "last_failed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failed At"
          },
          "last_succeeded_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Succeeded At"
          },
          "pending_deliveries": {
            "title": "Pending Deliveries",
            "type": "integer"
          }
        },
        "required": [
          "pending_deliveries",
          "last_succeeded_at",
          "last_failed_at"
        ],
        "title": "WebhookDeliverySummary",
        "type": "object"
      },
      "WebhookNamespaceScope": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "namespace",
            "title": "Kind",
            "type": "string"
          },
          "namespaces": {
            "items": {
              "type": "string"
            },
            "title": "Namespaces",
            "type": "array"
          }
        },
        "required": [
          "kind",
          "namespaces"
        ],
        "title": "WebhookNamespaceScope",
        "type": "object"
      },
      "WebhookPage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "WebhookPage",
        "type": "object"
      },
      "WebhookResponse": {
        "additionalProperties": false,
        "description": "A webhook. ``secret`` is only in the answers to Create and Rotate.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivery": {
            "$ref": "#/components/schemas/WebhookDeliverySummary"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DisabledReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/WebhookScopeBody"
          },
          "secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Secret"
          },
          "signing": {
            "$ref": "#/components/schemas/WebhookSigning"
          },
          "types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Types"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "scope",
          "url",
          "types",
          "enabled",
          "disabled_reason",
          "signing",
          "delivery",
          "created_at",
          "updated_at"
        ],
        "title": "WebhookResponse",
        "type": "object"
      },
      "WebhookScopeBody": {
        "discriminator": {
          "mapping": {
            "cluster": "#/components/schemas/WebhookClusterScope",
            "collection": "#/components/schemas/WebhookCollectionScope",
            "namespace": "#/components/schemas/WebhookNamespaceScope"
          },
          "propertyName": "kind"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebhookClusterScope"
          },
          {
            "$ref": "#/components/schemas/WebhookNamespaceScope"
          },
          {
            "$ref": "#/components/schemas/WebhookCollectionScope"
          }
        ]
      },
      "WebhookSigning": {
        "additionalProperties": false,
        "properties": {
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Expires At"
          },
          "previous_secret_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Fingerprint"
          },
          "secret_fingerprint": {
            "title": "Secret Fingerprint",
            "type": "string"
          }
        },
        "required": [
          "secret_fingerprint",
          "previous_secret_fingerprint",
          "previous_secret_expires_at"
        ],
        "title": "WebhookSigning",
        "type": "object"
      },
      "WebhookTestAttempt": {
        "additionalProperties": false,
        "properties": {
          "duration_ms": {
            "title": "Duration Ms",
            "type": "integer"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status"
          },
          "sent_at": {
            "format": "date-time",
            "title": "Sent At",
            "type": "string"
          },
          "status": {
            "enum": [
              "succeeded",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "response_status",
          "error",
          "duration_ms",
          "sent_at"
        ],
        "title": "WebhookTestAttempt",
        "type": "object"
      },
      "WebhookTestResponse": {
        "additionalProperties": false,
        "description": "The test POST's answer. A receiver that failed is still a 200 here.",
        "properties": {
          "attempt": {
            "$ref": "#/components/schemas/WebhookTestAttempt"
          }
        },
        "required": [
          "attempt"
        ],
        "title": "WebhookTestResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      },
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Graphon Engine API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          }
        },
        "summary": "Health",
        "tags": [
          "cluster"
        ]
      }
    },
    "/info": {
      "get": {
        "description": "``events.webhooks`` counts the webhooks the calling key sees.",
        "operationId": "info",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InfoResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Info",
        "tags": [
          "cluster"
        ]
      }
    },
    "/jobs/{job_id}": {
      "get": {
        "description": "A job's current state. Use the events webhooks for live status.",
        "operationId": "get_job",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Job",
        "tags": [
          "jobs"
        ]
      }
    },
    "/jobs/{job_id}:cancel": {
      "post": {
        "description": "Cancel a job that has not started. Any other job comes back unchanged.",
        "operationId": "cancel_job",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Cancel Job",
        "tags": [
          "jobs"
        ]
      }
    },
    "/keys": {
      "get": {
        "operationId": "list_keys",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Keys",
        "tags": [
          "keys"
        ]
      },
      "post": {
        "description": "Create a key. The answer holds its ``secret``, and no later read does.",
        "operationId": "create_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Location": {
                "description": "The path of the new resource, by ids.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Key",
        "tags": [
          "keys"
        ]
      }
    },
    "/keys/{key_id}": {
      "delete": {
        "description": "Revoke a key. The next request with it gets 401.",
        "operationId": "revoke_key",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Revoke Key",
        "tags": [
          "keys"
        ]
      }
    },
    "/namespaces": {
      "get": {
        "operationId": "list_namespaces",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NamespacePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Namespaces",
        "tags": [
          "namespaces"
        ]
      },
      "post": {
        "description": "Create a namespace. ``exist_ok`` returns the live one of that name with 200.",
        "operationId": "create_namespace",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNamespaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NamespaceResponse"
                }
              }
            },
            "description": "OK"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NamespaceResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Location": {
                "description": "The path of the new resource, by ids.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Namespace",
        "tags": [
          "namespaces"
        ]
      }
    },
    "/namespaces/{namespace}": {
      "delete": {
        "description": "Delete the namespace and, in the background, its content.\n\n``force`` is needed only for a namespace that holds collections. The job\nends ``succeeded`` after the content is gone.",
        "operationId": "delete_namespace",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/DeleteNamespaceRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete Namespace",
        "tags": [
          "namespaces"
        ]
      },
      "get": {
        "operationId": "get_namespace",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NamespaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Namespace",
        "tags": [
          "namespaces"
        ]
      },
      "patch": {
        "description": "Change ``display_name``. The name never changes.",
        "operationId": "update_namespace",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNamespaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NamespaceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Namespace",
        "tags": [
          "namespaces"
        ]
      }
    },
    "/namespaces/{namespace}/collections": {
      "get": {
        "description": "Live collections, oldest first. A collection key sees only its own.",
        "operationId": "list_collections",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Collections",
        "tags": [
          "collections"
        ]
      },
      "post": {
        "description": "Create a collection. ``exist_ok`` returns the live one of that name with 200.",
        "operationId": "create_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCollectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            },
            "description": "OK"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Location": {
                "description": "The path of the new resource, by ids.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Collection",
        "tags": [
          "collections"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}": {
      "delete": {
        "description": "Delete the collection. Search and Query answer 404 from now on.",
        "operationId": "delete_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete Collection",
        "tags": [
          "collections"
        ]
      },
      "get": {
        "operationId": "get_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Collection",
        "tags": [
          "collections"
        ]
      },
      "patch": {
        "description": "Change ``display_name``, ``processing``, or ``access_control``. 200\nwith the collection.\n\nTurning a processing flag on is 202 with a ``reindex_collection`` job.\nTurning ``access_control`` to ``enforced`` is 202 with an\n``apply_access_rule`` job.",
        "operationId": "update_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCollectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Collection",
        "tags": [
          "collections"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/access-rules": {
      "get": {
        "description": "Rules, oldest first. ``folder`` or ``file``: the rule on exactly that\ntarget (zero or one item). ``under``: every rule at or under a folder.\nSend at most one.",
        "operationId": "list_access_rules",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Folder"
            }
          },
          {
            "in": "query",
            "name": "file",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "File"
            }
          },
          {
            "in": "query",
            "name": "under",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Under"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRulePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Access Rules",
        "tags": [
          "access-rules"
        ]
      },
      "post": {
        "description": "Create or replace the rule on one ``folder`` or ``file``.\n\n201: a new rule with no files under it. 200: a change of ``readers``\nonly, which applies on the next request. 202: the rule and an\n``apply_access_rule`` job; the files under the target stay hidden until\nit succeeds.",
        "operationId": "create_access_rule",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccessRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRuleResponse"
                }
              }
            },
            "description": "OK"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRuleResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Location": {
                "description": "The path of the new resource, by ids.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRuleJobResponse"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Access Rule",
        "tags": [
          "access-rules"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/access-rules/{rule_id}": {
      "delete": {
        "description": "Delete the rule. 202 with an ``apply_access_rule`` job: the files under\nit move to the next rule above them. The root rule ``/`` cannot be\ndeleted.",
        "operationId": "delete_access_rule",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete Access Rule",
        "tags": [
          "access-rules"
        ]
      },
      "get": {
        "operationId": "get_access_rule",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRuleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Access Rule",
        "tags": [
          "access-rules"
        ]
      },
      "patch": {
        "description": "Change ``readers`` (200, applies on the next request) or ``sealed``\n(202 with the rule and a job). ``add_readers`` and ``remove_readers``\nedit the list under a row lock: removes first, then adds.",
        "operationId": "update_access_rule",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "rule_id",
            "required": true,
            "schema": {
              "title": "Rule Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccessRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRuleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRuleJobResponse"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Access Rule",
        "tags": [
          "access-rules"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/access-rules:batch": {
      "post": {
        "description": "Apply ``upsert``, ``update``, and ``delete`` operations in one\ntransaction: all commit, or none does. 200 when every operation changes\nonly ``readers``; else 202 with one ``apply_access_rule`` job for the\nwhole batch. The first invalid operation fails the batch, and ``details``\nnames its ``index``.",
        "operationId": "batch_access_rules",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchAccessRulesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchAccessRulesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchAccessRulesResponse"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Batch Access Rules",
        "tags": [
          "access-rules"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/files": {
      "get": {
        "description": "Live files, oldest first. ``path`` is an exact match and ``prefix`` a\nbyte prefix; send at most one.",
        "operationId": "list_files",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Path"
            }
          },
          {
            "in": "query",
            "name": "prefix",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Prefix"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/FileStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Files",
        "tags": [
          "files"
        ]
      },
      "post": {
        "description": "Add a file, or replace the file at its path. 202 with the file and its\n``index_file`` job. An ``upload`` source is 201, with ``upload.url`` to PUT\nthe bytes to before ``upload.expires_at``. A source that the cluster\ncannot read is 422 ``storage_unreachable``.",
        "operationId": "add_file",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddFileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddFileResponse"
                }
              }
            },
            "description": "Created",
            "headers": {
              "Location": {
                "description": "The path of the new resource, by ids.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddFileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The cluster cannot read the source object: storage_unreachable"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Add File",
        "tags": [
          "files"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/files/{file}": {
      "delete": {
        "description": "Delete a file and, in the background, its index data. 202 with the\n``delete_file`` job. The source object is not deleted.",
        "operationId": "delete_file",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "title": "File",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete File",
        "tags": [
          "files"
        ]
      },
      "get": {
        "description": "A file by ``fil_`` id, or by URL-encoded path (``%2F``).",
        "operationId": "get_file",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "title": "File",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get File",
        "tags": [
          "files"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/files/{file}/content": {
      "get": {
        "description": "A short-lived signed GET URL for the bytes the cluster stores: an\nupload, inline text, or a ``graphon://`` copy. A ``gs://`` source is 409\n``external_source``.",
        "operationId": "get_file_content",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file",
            "required": true,
            "schema": {
              "title": "File",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileContentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get File Content",
        "tags": [
          "files"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/metadata-fields": {
      "get": {
        "description": "The metadata fields that filters can read, with their type and state.",
        "operationId": "get_metadata_fields",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataFieldsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Metadata Fields",
        "tags": [
          "collections"
        ]
      },
      "patch": {
        "description": "Merge the listed metadata fields. A key left out keeps its setting, and\na key set to null is removed.\n\nA change is 202 with a ``reindex_metadata`` job. Filters are checked\nagainst the new fields at once (a removed key is ``not_listed``), but\nthey read the old index until the job ends. On a collection with files,\nthe index is rebuilt in the background, and the job ends when the rebuild\nis done. A body that changes nothing is 200 with the fields, also while a\njob runs. 409 ``operation_in_progress`` while the last change is still\nindexing.",
        "operationId": "update_metadata_fields",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMetadataFieldsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataFieldsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Accepted"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Metadata Fields",
        "tags": [
          "collections"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/research": {
      "post": {
        "description": "Start a research run. It plans and runs many search and read steps,\nthen answers. The body is the ``:answer`` body with no ``effort``, plus\n``web_search``. Needs the ``query`` action. 202 with the run, ``queued``.\n\nThe checks and errors are those of ``:answer``. ``web_search:\nuse_if_needed`` and ``query_image`` need a cluster key.\nOnly this key, or a cluster key, can read or cancel the run. Events\n``research.updated`` and ``research.progress`` report it. A repeat with\nthe same ``Idempotency-Key`` and body returns the same run.",
        "operationId": "create_research",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Research",
        "tags": [
          "research"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/research/{research}": {
      "get": {
        "description": "A research run: its status, its last stage, and when it ends, the\nanswer or the error. Another key than the one that started it, unless a\ncluster key, gets 404.",
        "operationId": "get_research",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "research",
            "required": true,
            "schema": {
              "title": "Research",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Research",
        "tags": [
          "research"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}/research/{research}:cancel": {
      "post": {
        "description": "Cancel a research run. 202 with the run. A ``queued`` run is\n``canceled`` at once. A ``running`` one becomes ``canceled`` when Core has\nstopped it. Core does not bill a run that it stopped. When Core answered\nbefore it saw the cancel, Core billed the run, and the ``canceled`` run\nhas that ``usage``. A run that ended comes back unchanged.",
        "operationId": "cancel_research",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "research",
            "required": true,
            "schema": {
              "title": "Research",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Cancel Research",
        "tags": [
          "research"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}:answer": {
      "post": {
        "description": "An answer from the collection's files, with citations. Needs the\n``query`` action.\n\n``effort`` is ``medium`` (the default) or ``high``. Either allows 45\nseconds. A query image adds 45 seconds. ``query_image`` needs a cluster\nkey. Web search runs only in research. An empty collection is 409\n``collection_empty``. A query past its limit is\n503 ``temporarily_unavailable``, retryable. ``usage.credits`` is the\ncredits the query used.\n\nWhen the client disconnects, the query is canceled and not billed.",
        "operationId": "answer_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnswerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Answer Collection",
        "tags": [
          "search"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}:read-spans": {
      "post": {
        "description": "The content of 1 to 50 spans, in the parts that ``include`` names, with\none result for each span, in order. Needs the ``search`` action. ``raw``\nand ``file`` also need the ``read`` action, because they return the\noriginal content: without it, the call is ``forbidden``.\n\nEach result has the parts of its span, or an ``error`` for that span\nalone: ``not_found`` (no such file, a deleted file, or a file that the\nprincipals cannot read), ``invalid_span`` (the unit does not match the\nfile, the span is past its end, or ``pages`` do not match the chars), or\n``content_unavailable`` (the stored content is missing or cannot be read;\na retry gets the same answer). The other spans still read.\n\nA large span comes back in parts: the result's ``span`` is the part that\nit holds, in the unit of the content, and ``next`` is the body of the next\nrequest (the rest of each span that did not fit, with the same parts), or\n``null``. A span past the end of the file is cut to the file first. A\n``file`` span reads from the start of the file. Each part stops at 50,000\ncharacters of text, 500 pages, or 600 seconds.",
        "operationId": "read_spans",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReadSpansRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadSpansResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Read Spans",
        "tags": [
          "search"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}:reindex": {
      "post": {
        "description": "Rebuild the collection's index from its current files. 202 with a\n``reindex_collection`` job. Each old part of the index serves until its\nrebuild is ready. 409 ``operation_in_progress`` while a reindex runs.",
        "operationId": "reindex_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Reindex Collection",
        "tags": [
          "collections"
        ]
      }
    },
    "/namespaces/{namespace}/collections/{collection}:search": {
      "post": {
        "description": "Ranked files or passages with their spans. Needs the ``search`` action.\n\nAn empty collection answers no results, a failed one no results and one\nwarning, and one whose files are all still indexing 409\n``collection_not_ready``. When keyword search is not available, a\n``keyword`` search is 503 ``temporarily_unavailable``, not retryable.",
        "operationId": "search_collection",
        "parameters": [
          {
            "in": "path",
            "name": "namespace",
            "required": true,
            "schema": {
              "title": "Namespace",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "collection",
            "required": true,
            "schema": {
              "title": "Collection",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Search Collection",
        "tags": [
          "search"
        ]
      }
    },
    "/ready": {
      "get": {
        "operationId": "ready",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "summary": "Ready",
        "tags": [
          "cluster"
        ]
      }
    },
    "/webhooks": {
      "get": {
        "description": "The webhooks the key sees, oldest first. ``namespace`` and\n``collection`` keep the webhooks that get their events.",
        "operationId": "list_webhooks",
        "parameters": [
          {
            "in": "query",
            "name": "namespace",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Namespace"
            }
          },
          {
            "in": "query",
            "name": "collection",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Collection"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Webhooks",
        "tags": [
          "webhooks"
        ]
      },
      "post": {
        "description": "Register a webhook. The answer holds its ``secret``, and no later read\ndoes.",
        "operationId": "create_webhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Location": {
                "description": "The path of the new resource, by ids.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook}": {
      "delete": {
        "description": "Delete a webhook and its log. The name is free at once.",
        "operationId": "delete_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Delete Webhook",
        "tags": [
          "webhooks"
        ]
      },
      "get": {
        "operationId": "get_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Webhook",
        "tags": [
          "webhooks"
        ]
      },
      "patch": {
        "description": "Change ``scope``, ``url``, ``types``, or ``enabled``.",
        "operationId": "update_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Update Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook}/deliveries": {
      "get": {
        "description": "The delivery log, newest first: each event the webhook got and its\nlast attempt.",
        "operationId": "list_webhook_deliveries",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending",
                    "succeeded",
                    "failed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "file_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "File Id"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Webhook Deliveries",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook}/deliveries/{event}": {
      "get": {
        "description": "One delivery, with the event's exact JSON and every attempt.",
        "operationId": "get_webhook_delivery",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "event",
            "required": true,
            "schema": {
              "title": "Event",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Get Webhook Delivery",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook}:replay": {
      "post": {
        "description": "Queue past events again, by id or by time range.",
        "operationId": "replay_webhook_deliveries",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayWebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Replay Webhook Deliveries",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook}:rotate-secret": {
      "post": {
        "description": "A new secret, shown once. The previous one also signs until\n``previous_secret_expires_in_seconds`` passes.",
        "operationId": "rotate_webhook_secret",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RotateWebhookSecretRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Rotate Webhook Secret",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook}:test": {
      "post": {
        "description": "One signed ``webhook.test`` POST now, and the receiver's answer. A\nreceiver that failed is still a 200.",
        "operationId": "test_webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook",
            "required": true,
            "schema": {
              "title": "Webhook",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, invalid_filter, or invalid_span"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid key: unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The key lacks the action: forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing resource, or one this key may not see: not_found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Conflict: already_exists, idempotency_conflict, operation_in_progress, limit_exceeded, collection_empty, or collection_not_ready"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Body over the route's cap (6,291,456 bytes on :answer and research, 4,194,304 bytes on :search and :read-spans, 1,048,576 bytes elsewhere): request_too_large"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unexpected failure: internal_error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A dependency is down, or writes are paused: temporarily_unavailable. The folder access copy could not be written: access_copy_unavailable"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Test Webhook",
        "tags": [
          "webhooks"
        ]
      }
    }
  }
}
