{
  "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"
      },
      "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"
      },
      "CharSpan": {
        "additionalProperties": false,
        "properties": {
          "char_end": {
            "title": "Char End",
            "type": "integer"
          },
          "char_start": {
            "title": "Char Start",
            "type": "integer"
          }
        },
        "required": [
          "char_start",
          "char_end"
        ],
        "title": "CharSpan",
        "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"
      },
      "DeleteNamespaceRequest": {
        "additionalProperties": false,
        "properties": {
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          }
        },
        "title": "DeleteNamespaceRequest",
        "type": "object"
      },
      "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"
      },
      "EvidenceKind": {
        "enum": [
          "text",
          "transcript",
          "ocr",
          "json_path",
          "page",
          "image_region"
        ],
        "type": "string"
      },
      "EvidenceLocation": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/TimeSpan"
          },
          {
            "$ref": "#/components/schemas/PageLocation"
          },
          {
            "$ref": "#/components/schemas/JsonPathLocation"
          },
          {
            "$ref": "#/components/schemas/CharSpan"
          }
        ]
      },
      "EvidenceResponse": {
        "additionalProperties": false,
        "description": "One piece of evidence. ``location`` is left out when core gives none.",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/EvidenceKind"
          },
          "location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvidenceLocation"
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "text"
        ],
        "title": "EvidenceResponse",
        "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.",
        "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"
          },
          "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"
      },
      "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"
      },
      "InfoAuth": {
        "additionalProperties": false,
        "properties": {
          "required": {
            "title": "Required",
            "type": "boolean"
          }
        },
        "required": [
          "required"
        ],
        "title": "InfoAuth",
        "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": {
          "api_version": {
            "title": "Api Version",
            "type": "string"
          },
          "auth": {
            "$ref": "#/components/schemas/InfoAuth"
          },
          "events": {
            "$ref": "#/components/schemas/InfoEvents"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "query": {
            "$ref": "#/components/schemas/InfoModes"
          },
          "search": {
            "$ref": "#/components/schemas/InfoModes"
          },
          "storage": {
            "$ref": "#/components/schemas/InfoStorage"
          }
        },
        "required": [
          "name",
          "api_version",
          "auth",
          "storage",
          "search",
          "query",
          "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"
        ],
        "type": "string"
      },
      "JsonPathLocation": {
        "additionalProperties": false,
        "properties": {
          "json_path": {
            "title": "Json Path",
            "type": "string"
          }
        },
        "required": [
          "json_path"
        ],
        "title": "JsonPathLocation",
        "type": "object"
      },
      "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"
          }
        ]
      },
      "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"
      },
      "PageLocation": {
        "additionalProperties": false,
        "properties": {
          "bbox": {
            "anyOf": [
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bbox"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          }
        },
        "required": [
          "page"
        ],
        "title": "PageLocation",
        "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"
      },
      "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"
      },
      "QueryMode": {
        "enum": [
          "standard",
          "ultra"
        ],
        "type": "string"
      },
      "QueryRequest": {
        "additionalProperties": false,
        "description": "A Query. ``web_search``, ``conversation_id``, and ``allow_partial`` are\nunknown fields here, so each is 400.",
        "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"
          },
          "mode": {
            "$ref": "#/components/schemas/QueryMode",
            "default": "standard"
          },
          "principals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principals"
          },
          "query": {
            "maxLength": 32000,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "return_sources": {
            "default": true,
            "title": "Return Sources",
            "type": "boolean"
          }
        },
        "required": [
          "query"
        ],
        "title": "QueryRequest",
        "type": "object"
      },
      "QueryResponse": {
        "additionalProperties": false,
        "description": "An answer with ``[[SRC:nnnn]]`` markers. Each ``sources`` key is a\nmarker without its outer brackets. ``sources`` is left out when the\nrequest sets ``return_sources: false``.",
        "properties": {
          "answer": {
            "title": "Answer",
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/QueryMode"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "sources": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/QuerySourceResponse"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sources"
          }
        },
        "required": [
          "request_id",
          "answer",
          "mode"
        ],
        "title": "QueryResponse",
        "type": "object"
      },
      "QuerySourceResponse": {
        "additionalProperties": false,
        "properties": {
          "evidence": {
            "$ref": "#/components/schemas/EvidenceResponse"
          },
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "is_cited": {
            "title": "Is Cited",
            "type": "boolean"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "score": {
            "title": "Score",
            "type": "number"
          }
        },
        "required": [
          "file_id",
          "path",
          "score",
          "is_cited",
          "evidence"
        ],
        "title": "QuerySourceResponse",
        "type": "object"
      },
      "ResultUnit": {
        "enum": [
          "file",
          "passage"
        ],
        "type": "string"
      },
      "SearchExecution": {
        "additionalProperties": false,
        "properties": {
          "interpretation": {
            "$ref": "#/components/schemas/Interpretation"
          },
          "mode": {
            "$ref": "#/components/schemas/SearchMode"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/SearchMode"
            },
            "title": "Stages",
            "type": "array"
          }
        },
        "required": [
          "mode",
          "interpretation",
          "stages"
        ],
        "title": "SearchExecution",
        "type": "object"
      },
      "SearchMode": {
        "enum": [
          "keyword",
          "semantic"
        ],
        "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``.",
        "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": "semantic"
          },
          "principals": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principals"
          },
          "query": {
            "maxLength": 32000,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "result_unit": {
            "$ref": "#/components/schemas/ResultUnit",
            "default": "file"
          },
          "sort": {
            "items": {
              "$ref": "#/components/schemas/SortBody"
            },
            "title": "Sort",
            "type": "array"
          }
        },
        "required": [
          "query"
        ],
        "title": "SearchRequest",
        "type": "object"
      },
      "SearchResponse": {
        "additionalProperties": false,
        "description": "Ranked results with evidence. A Search never has an ``answer``.",
        "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,
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/EvidenceResponse"
            },
            "title": "Evidence",
            "type": "array"
          },
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "matched_by": {
            "items": {
              "$ref": "#/components/schemas/SearchMode"
            },
            "title": "Matched By",
            "type": "array"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "rank": {
            "title": "Rank",
            "type": "integer"
          },
          "score": {
            "title": "Score",
            "type": "number"
          }
        },
        "required": [
          "file_id",
          "path",
          "content_type",
          "rank",
          "score",
          "matched_by",
          "evidence"
        ],
        "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"
      },
      "SortBody": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "$ref": "#/components/schemas/SortField"
          },
          "order": {
            "enum": [
              "asc",
              "desc"
            ],
            "title": "Order",
            "type": "string"
          }
        },
        "required": [
          "field",
          "order"
        ],
        "title": "SortBody",
        "type": "object"
      },
      "SortField": {
        "enum": [
          "score",
          "path",
          "content_type",
          "bytes",
          "created_at",
          "updated_at"
        ],
        "type": "string"
      },
      "TimeSpan": {
        "additionalProperties": false,
        "properties": {
          "end_ms": {
            "title": "End Ms",
            "type": "integer"
          },
          "start_ms": {
            "title": "Start Ms",
            "type": "integer"
          }
        },
        "required": [
          "start_ms",
          "end_ms"
        ],
        "title": "TimeSpan",
        "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"
      },
      "UpdateNamespaceRequest": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "UpdateNamespaceRequest",
        "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"
      }
    },
    "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": {
        "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, or invalid_filter"
          },
          "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, or invalid_filter"
          },
          "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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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.",
        "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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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`` or ``processing``, or set access ``off``. 200\nwith the collection.\n\nTurning a processing flag on is 202 with a ``reindex_collection`` job.\nAccess control ``enforced`` is 400 in this release.",
        "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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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": "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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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}:query": {
      "post": {
        "description": "An answer from the collection's files, with citations. Needs the\n``query`` action.\n\n``standard`` allows 120 seconds. ``ultra`` allows 600 seconds and runs\nagent mode. An empty collection is 409 ``collection_empty``. A query past\nits limit is 503 ``temporarily_unavailable``, retryable.",
        "operationId": "query_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/QueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Malformed request: invalid_request, invalid_cursor, invalid_uri, or invalid_filter"
          },
          "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 1,048,576 bytes: 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": "Query Collection",
        "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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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 evidence. 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``.",
        "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, or invalid_filter"
          },
          "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 1,048,576 bytes: 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"
        ]
      }
    }
  }
}
