{
  "openapi": "3.1.0",
  "info": {
    "title": "IMSL API (all apps)",
    "version": "1.0.0",
    "description": "Combined API reference for every IMSL app that publishes an OpenAPI document. Generated from each app's own /openapi.json by api-spec-imsl. Do not edit by hand. Paths are prefixed with the app id; the real request path is in x-imsl-request-path and the host in servers. One central osk_ API key works on every app (X-API-Key header)."
  },
  "tags": [
    {
      "name": "CompanyFinder",
      "description": "CompanyFinder (https://imsl.companyfinder.osint.place)"
    },
    {
      "name": "Scrapers",
      "description": "Scrapers (https://imsl.scrapers.osint.place)"
    },
    {
      "name": "GitHub Tools",
      "description": "GitHub Tools (https://imsl.github.osint.place)"
    },
    {
      "name": "Knowledge",
      "description": "Knowledge (https://imsl.knowledge.osint.place)"
    },
    {
      "name": "Digital Twin",
      "description": "Digital Twin (https://imsl.digitaltwin.osint.place)"
    },
    {
      "name": "ANPR",
      "description": "ANPR (https://imsl.anpr.osint.place)"
    },
    {
      "name": "Person Investigator",
      "description": "Person Investigator (https://imsl.personinvestigator.osint.place)"
    }
  ],
  "paths": {
    "/companyfinder/api/search": {
      "get": {
        "tags": [
          "CompanyFinder"
        ],
        "summary": "Find a company (start here)",
        "description": "Search a national registry by name or registry number.\n\nReturns HTTP 200 with a flat list. Each result gives the English name, the local\nname, the registry id and what kind of id it is, and **`reference_id`: the one id\nto send to `POST /api/investigate`**, the same shape in every jurisdiction.",
        "operationId": "companyfinder_findCompany",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 300,
              "description": "Company name (any language or script) or its national registry number.",
              "examples": [
                "China Resources"
              ],
              "title": "Query"
            },
            "description": "Company name (any language or script) or its national registry number."
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Jurisdiction",
              "description": "Where the company is registered. `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC).",
              "default": "CN"
            },
            "description": "Where the company is registered. `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC)."
          },
          {
            "name": "models",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "sonar",
                  "gpt5",
                  "grok",
                  "kimi",
                  "qwen",
                  "deepseek_or",
                  "mistral",
                  "mimo"
                ]
              },
              "description": "Optional. Extra models to cross-check Gemini (multi-select: Ctrl or Cmd click). Leave empty for Gemini alone, which is fastest. `sonar` Sonar; `gpt5` GPT-5.4 Mini; `grok` Grok 4.6; `kimi` Kimi K3; `qwen` Qwen 3.8 Flash; `deepseek_or` DeepSeek V4 Flash; `mistral` Mistral Small 3; `mimo` MiMo V2.5. Repeat the parameter (`models=gpt5&models=grok`), or send a comma list or a JSON array (`models=gpt5,grok`, `models=[\"gpt5\"]`); `models=[]` or an empty value means Gemini alone.",
              "default": [],
              "title": "Models"
            },
            "description": "Optional. Extra models to cross-check Gemini (multi-select: Ctrl or Cmd click). Leave empty for Gemini alone, which is fastest. `sonar` Sonar; `gpt5` GPT-5.4 Mini; `grok` Grok 4.6; `kimi` Kimi K3; `qwen` Qwen 3.8 Flash; `deepseek_or` DeepSeek V4 Flash; `mistral` Mistral Small 3; `mimo` MiMo V2.5. Repeat the parameter (`models=gpt5&models=grok`), or send a comma list or a JSON array (`models=gpt5,grok`, `models=[\"gpt5\"]`); `models=[]` or an empty value means Gemini alone."
          }
        ],
        "responses": {
          "200": {
            "description": "One flat record per match. Keep `reference_id` for the next call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request was wrong: empty search term, unknown jurisdiction or model, or a malformed registry number.",
            "content": {
              "application/json": {
                "example": {
                  "status": 400,
                  "error": "`query`: Field required"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or wrong X-API-Key header: an OSINT.place API key from admin.osint.place is required. Click **Authorize**.",
            "content": {
              "application/json": {
                "example": {
                  "status": 401,
                  "error": "A valid X-API-Key header is required."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "502": {
            "description": "The model provider could not be reached. Nothing was searched; try again.",
            "content": {
              "application/json": {
                "example": {
                  "status": 502,
                  "error": "Registry search could not reach its provider (HTTP 503 Service Unavailable). Nothing was searched — try again shortly."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server has no model credentials.",
            "content": {
              "application/json": {
                "example": {
                  "status": 503,
                  "error": "Registry search needs Vertex AI credentials on the server."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-imsl-app": "companyfinder",
        "x-imsl-request-path": "/api/search",
        "x-imsl-tag": [
          "search"
        ],
        "servers": [
          {
            "url": "https://imsl.companyfinder.osint.place",
            "description": "CompanyFinder base URL"
          }
        ]
      },
      "post": {
        "tags": [
          "CompanyFinder"
        ],
        "summary": "Phase 1 — find registered entities by name or registry identifier",
        "description": "The same search as the GET, with a JSON body and the full record: names,\n`sources`, `agreement`, `reference_id` and the run manifest.",
        "operationId": "companyfinder_searchCompanies",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "examples": {
                "name_china": {
                  "summary": "Company name, China",
                  "description": "The default: one grounded Gemini call, no panel.",
                  "value": {
                    "query": "华为技术",
                    "country": "CN"
                  }
                },
                "identifier_china": {
                  "summary": "National registry identifier, China",
                  "description": "China's identifier is the 18-character USCC. It is validated before anything is searched — a malformed one returns a notice, not a guess.",
                  "value": {
                    "query": "914403001922038216",
                    "country": "CN"
                  }
                },
                "identifier_hong_kong": {
                  "summary": "National registry identifier, Hong Kong",
                  "description": "Each jurisdiction has its own scheme: Hong Kong's is the 8-digit Business Registration Number, not a USCC.",
                  "value": {
                    "query": "12345678",
                    "country": "HK"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Candidate entities, an optional analyst-facing notice, and the run manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "401": {
            "description": "The X-API-Key header was missing, was not an OSINT.place API key (osk_...), or the key was revoked or not granted to this app."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "503": {
            "description": "The server has no Gemini credentials, so nothing can be searched."
          }
        },
        "x-imsl-app": "companyfinder",
        "x-imsl-request-path": "/api/search",
        "x-imsl-tag": [
          "search"
        ],
        "servers": [
          {
            "url": "https://imsl.companyfinder.osint.place",
            "description": "CompanyFinder base URL"
          }
        ]
      }
    },
    "/companyfinder/api/search/worldwide": {
      "get": {
        "tags": [
          "CompanyFinder"
        ],
        "summary": "Find a company in every registry at once",
        "description": "Runs the registry search once per jurisdiction (five at a time), Gemini only, and\nreports which jurisdictions returned candidates. Pass any `reference_id` to\n`POST /api/investigate`.",
        "operationId": "companyfinder_findCompanyWorldwide",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 300,
              "description": "Company name (any language or script) or a national registry number.",
              "examples": [
                "China Resources"
              ],
              "title": "Q"
            },
            "description": "Company name (any language or script) or a national registry number."
          },
          {
            "name": "jurisdictions",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "CN",
                  "HK",
                  "RU",
                  "KZ",
                  "UZ",
                  "TM",
                  "BY",
                  "UA",
                  "GE",
                  "MD",
                  "SC",
                  "VG",
                  "CY",
                  "AE",
                  "TW",
                  "IR",
                  "TR",
                  "IN",
                  "MH",
                  "PA"
                ]
              },
              "description": "Optional. Registries to search (multi-select). Leave empty for every registered jurisdiction. `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC). Repeat the parameter, or send a comma list or a JSON array; `jurisdictions=[]` or an empty value means all.",
              "default": [],
              "title": "Jurisdictions"
            },
            "description": "Optional. Registries to search (multi-select). Leave empty for every registered jurisdiction. `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC). Repeat the parameter, or send a comma list or a JSON array; `jurisdictions=[]` or an empty value means all."
          }
        ],
        "responses": {
          "200": {
            "description": "One flat record per match across jurisdictions, each with its `jurisdiction`, plus the codes that matched.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldwideSimpleResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request was wrong: empty search term, unknown jurisdiction or model, or a malformed registry number.",
            "content": {
              "application/json": {
                "example": {
                  "status": 400,
                  "error": "`query`: Field required"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or wrong X-API-Key header: an OSINT.place API key from admin.osint.place is required. Click **Authorize**.",
            "content": {
              "application/json": {
                "example": {
                  "status": 401,
                  "error": "A valid X-API-Key header is required."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unknown jurisdiction code, or `search_models` was sent (worldwide search runs Gemini only).",
            "content": {
              "application/json": {
                "example": {
                  "status": 422,
                  "error": "`jurisdictions`: unknown jurisdiction 'ZZ'. Use any of 'CN', 'HK', or leave it empty for all of them."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The model provider could not be reached. Nothing was searched; try again.",
            "content": {
              "application/json": {
                "example": {
                  "status": 502,
                  "error": "Registry search could not reach its provider (HTTP 503 Service Unavailable). Nothing was searched — try again shortly."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The server has no model credentials.",
            "content": {
              "application/json": {
                "example": {
                  "status": 503,
                  "error": "Registry search needs Vertex AI credentials on the server."
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-imsl-app": "companyfinder",
        "x-imsl-request-path": "/api/search/worldwide",
        "x-imsl-tag": [
          "search"
        ],
        "servers": [
          {
            "url": "https://imsl.companyfinder.osint.place",
            "description": "CompanyFinder base URL"
          }
        ]
      },
      "post": {
        "tags": [
          "CompanyFinder"
        ],
        "summary": "Phase 1, worldwide: search every registry and report where it matched",
        "description": "The same search as `POST /api/search`, run once per jurisdiction (Gemini only,\n`COMPANYFINDER_WORLDWIDE_CONCURRENCY` at a time, default 5). One jurisdiction failing\nleaves the others intact. Every candidate's `reference_id` works with `POST /api/investigate`.",
        "operationId": "companyfinder_searchWorldwide",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorldwideRequest"
              },
              "examples": {
                "all": {
                  "summary": "Every registered jurisdiction",
                  "value": {
                    "query": "China Resources"
                  }
                },
                "some": {
                  "summary": "Chosen jurisdictions",
                  "value": {
                    "query": "China Resources",
                    "jurisdictions": [
                      "HK",
                      "CN"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A block per jurisdiction (matched, empty or failed), the codes that matched, and the run manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorldwideResponse"
                }
              }
            }
          },
          "401": {
            "description": "The X-API-Key header was missing, was not an OSINT.place API key (osk_...), or the key was revoked or not granted to this app."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "503": {
            "description": "The server has no Gemini credentials, so nothing can be searched."
          }
        },
        "x-imsl-app": "companyfinder",
        "x-imsl-request-path": "/api/search/worldwide",
        "x-imsl-tag": [
          "search"
        ],
        "servers": [
          {
            "url": "https://imsl.companyfinder.osint.place",
            "description": "CompanyFinder base URL"
          }
        ]
      }
    },
    "/companyfinder/api/investigate": {
      "post": {
        "tags": [
          "CompanyFinder"
        ],
        "summary": "Investigate a company by reference_id (step 2)",
        "description": "Run a full investigation and stream it as Server-Sent Events.\n\nSend the raw JSON body `{\"reference_id\": \"...\"}` with an id from the search. Events\narrive as `session_start`, one `agent_start` and `agent_complete` per agent, then\n`session_complete` (or `error`). Swagger shows the stream once it ends; a run takes\na few minutes.",
        "operationId": "companyfinder_investigateStream",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestigateRequest"
              },
              "examples": {
                "by_reference": {
                  "summary": "By reference_id (recommended)",
                  "description": "Paste a `reference_id` from `GET /api/search`. Nothing else is needed.",
                  "value": {
                    "reference_id": "HK:00257007"
                  }
                },
                "by_reference_with_models": {
                  "summary": "By reference_id, choosing the panel models",
                  "description": "`search_models: []` is Gemini only; leaving it out runs every panel model.",
                  "value": {
                    "reference_id": "HK:00257007",
                    "search_models": [
                      "sonar",
                      "kimi"
                    ]
                  }
                },
                "by_names": {
                  "summary": "Without a search: names and registry id",
                  "value": {
                    "cn_name": "华为技术有限公司",
                    "en_name": "Huawei Technologies Co., Ltd.",
                    "uscc": "91440300192185379Q",
                    "country": "CN",
                    "search_models": []
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A Server-Sent Events stream. Each frame carries an `event:` name and a JSON `data:` payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "object",
                  "title": "InvestigationEvent",
                  "properties": {
                    "event": {
                      "type": "string",
                      "enum": [
                        "session_start",
                        "agent_start",
                        "agent_complete",
                        "session_complete",
                        "error"
                      ],
                      "description": "The SSE `event:` name."
                    },
                    "data": {
                      "type": "object",
                      "description": "The JSON `data:` payload. Shape depends on `event`; session_start and session_complete both carry `manifest`."
                    }
                  },
                  "required": [
                    "event",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Neither `reference_id` nor `cn_name` was sent, or a field was invalid."
          },
          "401": {
            "description": "A key is configured on the server and the X-API-Key header was missing or wrong."
          },
          "404": {
            "description": "`reference_id` is unknown or expired. Run the search again."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "x-imsl-app": "companyfinder",
        "x-imsl-request-path": "/api/investigate",
        "x-imsl-tag": [
          "investigation"
        ],
        "servers": [
          {
            "url": "https://imsl.companyfinder.osint.place",
            "description": "CompanyFinder base URL"
          }
        ]
      }
    },
    "/scrapers/api/v1/scrapers": {
      "get": {
        "tags": [
          "Scrapers"
        ],
        "summary": "List all scrapers",
        "description": "Every scraper you can run, tagged by `kind`: `scraper` (built in), `apify` (an Apify Actor) or `rapidapi`\n(a RapidAPI endpoint). Built-in scrapers carry their input parameters; for Apify and RapidAPI, ask\n`GET /api/v1/{provider}/scrapers/params`.",
        "operationId": "scrapers_v1_scrapers_api_v1_scrapers_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response V1 Scrapers Api V1 Scrapers Get"
                }
              }
            }
          }
        },
        "x-imsl-app": "scrapers",
        "x-imsl-request-path": "/api/v1/scrapers",
        "x-imsl-tag": [
          "Public API v1"
        ],
        "servers": [
          {
            "url": "https://imsl.scrapers.osint.place",
            "description": "Scrapers base URL"
          }
        ]
      }
    },
    "/scrapers/api/v1/{provider}/scrapers": {
      "get": {
        "tags": [
          "Scrapers"
        ],
        "summary": "List Apify or RapidAPI scrapers",
        "description": "Your Apify account's Actors, or the RapidAPI endpoints this account is subscribed to.",
        "operationId": "scrapers_v1_provider_scrapers_api_v1__provider__scrapers_get",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "apify",
                "rapidapi"
              ],
              "type": "string",
              "title": "Provider"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response V1 Provider Scrapers Api V1  Provider  Scrapers Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "scrapers",
        "x-imsl-request-path": "/api/v1/{provider}/scrapers",
        "x-imsl-tag": [
          "Public API v1"
        ],
        "servers": [
          {
            "url": "https://imsl.scrapers.osint.place",
            "description": "Scrapers base URL"
          }
        ]
      }
    },
    "/scrapers/api/v1/{provider}/scrapers/params": {
      "get": {
        "tags": [
          "Scrapers"
        ],
        "summary": "Input parameters of selected Apify or RapidAPI scrapers",
        "operationId": "scrapers_v1_provider_params_api_v1__provider__scrapers_params_get",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "apify",
                "rapidapi"
              ],
              "type": "string",
              "title": "Provider"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Ids from the list, repeat for several",
              "title": "Ids"
            },
            "description": "Ids from the list, repeat for several"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response V1 Provider Params Api V1  Provider  Scrapers Params Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "scrapers",
        "x-imsl-request-path": "/api/v1/{provider}/scrapers/params",
        "x-imsl-tag": [
          "Public API v1"
        ],
        "servers": [
          {
            "url": "https://imsl.scrapers.osint.place",
            "description": "Scrapers base URL"
          }
        ]
      }
    },
    "/scrapers/api/v1/runs": {
      "post": {
        "tags": [
          "Scrapers"
        ],
        "summary": "Run one or more scrapers",
        "description": "Starts each run and returns one result per item, in order: the run (`id`, `status`) or an `error`.\nPoll `GET /api/v1/runs/{id}` for progress and file links.",
        "operationId": "scrapers_v1_run_api_v1_runs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunMany"
              }
            }
          },
          "required": true
        },
        "responses": {
          "207": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response V1 Run Api V1 Runs Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "scrapers",
        "x-imsl-request-path": "/api/v1/runs",
        "x-imsl-tag": [
          "Public API v1"
        ],
        "servers": [
          {
            "url": "https://imsl.scrapers.osint.place",
            "description": "Scrapers base URL"
          }
        ]
      }
    },
    "/scrapers/api/v1/runs/cancel": {
      "post": {
        "tags": [
          "Scrapers"
        ],
        "summary": "Cancel one or more runs",
        "operationId": "scrapers_v1_cancel_api_v1_runs_cancel_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelMany"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response V1 Cancel Api V1 Runs Cancel Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "scrapers",
        "x-imsl-request-path": "/api/v1/runs/cancel",
        "x-imsl-tag": [
          "Public API v1"
        ],
        "servers": [
          {
            "url": "https://imsl.scrapers.osint.place",
            "description": "Scrapers base URL"
          }
        ]
      }
    },
    "/scrapers/api/v1/runs/{run_id}": {
      "get": {
        "tags": [
          "Scrapers"
        ],
        "summary": "Run status and files",
        "description": "Status, log-free summary and the run's files; download one at `/api/v1/runs/{id}/files/{name}`.\nWhere the source's licence requires a credit, the run carries it as `attribution` and each file download sends it in\nan `X-Data-Attribution` header: keep it with the data.",
        "operationId": "scrapers_v1_status_api_v1_runs__run_id__get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response V1 Status Api V1 Runs  Run Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "scrapers",
        "x-imsl-request-path": "/api/v1/runs/{run_id}",
        "x-imsl-tag": [
          "Public API v1"
        ],
        "servers": [
          {
            "url": "https://imsl.scrapers.osint.place",
            "description": "Scrapers base URL"
          }
        ]
      }
    },
    "/github/api/v1/tools": {
      "get": {
        "summary": "List the hosted tools",
        "operationId": "github_tools_api_v1_tools_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "tags": [
          "GitHub Tools"
        ],
        "x-imsl-app": "github",
        "x-imsl-request-path": "/api/v1/tools",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.github.osint.place",
            "description": "GitHub Tools base URL"
          }
        ]
      }
    },
    "/github/api/v1/searches": {
      "get": {
        "summary": "List your recent searches",
        "operationId": "github_mine_api_v1_searches_get",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_mine_api_v1_searches_get"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "GitHub Tools"
        ],
        "x-imsl-app": "github",
        "x-imsl-request-path": "/api/v1/searches",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.github.osint.place",
            "description": "GitHub Tools base URL"
          }
        ]
      },
      "post": {
        "summary": "Start a username search with one tool",
        "operationId": "github_start_api_v1_searches_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "GitHub Tools"
        ],
        "x-imsl-app": "github",
        "x-imsl-request-path": "/api/v1/searches",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.github.osint.place",
            "description": "GitHub Tools base URL"
          }
        ]
      }
    },
    "/github/api/v1/searches/{job_id}": {
      "get": {
        "summary": "Get a search and its results",
        "operationId": "github_get_api_v1_searches__job_id__get",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "GitHub Tools"
        ],
        "x-imsl-app": "github",
        "x-imsl-request-path": "/api/v1/searches/{job_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.github.osint.place",
            "description": "GitHub Tools base URL"
          }
        ]
      },
      "delete": {
        "summary": "Stop a running search",
        "operationId": "github_stop_api_v1_searches__job_id__delete",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "GitHub Tools"
        ],
        "x-imsl-app": "github",
        "x-imsl-request-path": "/api/v1/searches/{job_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.github.osint.place",
            "description": "GitHub Tools base URL"
          }
        ]
      }
    },
    "/knowledge/api/health": {
      "get": {
        "summary": "Health",
        "operationId": "knowledge_health_api_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Health Api Health Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/health",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents": {
      "get": {
        "summary": "Documents",
        "operationId": "knowledge_documents_api_v1_documents_get",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "knowledge set id",
              "title": "Set"
            },
            "description": "knowledge set id"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "words in the title",
              "title": "Q"
            },
            "description": "words in the title"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Documents Api V1 Documents Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "post": {
        "summary": "Upload",
        "operationId": "knowledge_upload_api_v1_documents_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_api_v1_documents_post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Upload Api V1 Documents Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}": {
      "get": {
        "summary": "Document",
        "operationId": "knowledge_document_api_v1_documents__doc_id__get",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Document Api V1 Documents  Doc Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "patch": {
        "summary": "Edit Document",
        "operationId": "knowledge_edit_document_api_v1_documents__doc_id__patch",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentEdit"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Edit Document Api V1 Documents  Doc Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "delete": {
        "summary": "Retire",
        "description": "Retire a document: it, its passages, vectors, comments and original leave the service; the removal is logged\n(who, when, why, never the content).",
        "operationId": "knowledge_retire_api_v1_documents__doc_id__delete",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": "retired",
              "title": "Reason"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Retire Api V1 Documents  Doc Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}/original": {
      "get": {
        "summary": "Original",
        "operationId": "knowledge_original_api_v1_documents__doc_id__original_get",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/original",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}/access": {
      "patch": {
        "summary": "Relabel",
        "operationId": "knowledge_relabel_api_v1_documents__doc_id__access_patch",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Relabel Api V1 Documents  Doc Id  Access Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/access",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/me": {
      "get": {
        "summary": "Me",
        "operationId": "knowledge_me_api_v1_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Me Api V1 Me Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/me",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/kinds": {
      "get": {
        "summary": "Kinds",
        "operationId": "knowledge_kinds_api_v1_kinds_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Kinds Api V1 Kinds Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/kinds",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/url": {
      "post": {
        "summary": "Add By Url",
        "description": "Fetch a web address on the server (SSRF-guarded, see webfetch.py) and hold it exactly as an upload: a web page\nbecomes markdown with its address as source; PDF, Word, PowerPoint, Excel and text are kept as they are.",
        "operationId": "knowledge_add_by_url_api_v1_documents_url_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UrlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Add By Url Api V1 Documents Url Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/url",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}/text": {
      "get": {
        "summary": "Document Text",
        "description": "The passages the service searches, in order, with the document's access label (the original is the same material).",
        "operationId": "knowledge_document_text_api_v1_documents__doc_id__text_get",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 2000,
              "minimum": 1,
              "default": 400,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Document Text Api V1 Documents  Doc Id  Text Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/text",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}/comments": {
      "get": {
        "summary": "Comments",
        "operationId": "knowledge_comments_api_v1_documents__doc_id__comments_get",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Comments Api V1 Documents  Doc Id  Comments Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/comments",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "post": {
        "summary": "Add Comment",
        "operationId": "knowledge_add_comment_api_v1_documents__doc_id__comments_post",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Add Comment Api V1 Documents  Doc Id  Comments Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/comments",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/update-requests": {
      "get": {
        "summary": "Update Requests",
        "operationId": "knowledge_update_requests_api_v1_update_requests_get",
        "parameters": [
          {
            "name": "document",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Document"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Target"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Requests Api V1 Update Requests Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/update-requests",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}/update-request": {
      "post": {
        "summary": "Update Request",
        "description": "Ask for a document to be brought up to date. Kept here, and put on Digital Twin's research queue when\nAPPS_MASTER_API_KEY is set; otherwise it stays `queued` and says why.",
        "operationId": "knowledge_update_request_api_v1_documents__doc_id__update_request_post",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequestIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Request Api V1 Documents  Doc Id  Update Request Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/update-request",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/update-requests/{req_id}/send": {
      "post": {
        "summary": "Resend Update Request",
        "description": "Try again to put a queued request on Digital Twin's queue.",
        "operationId": "knowledge_resend_update_request_api_v1_update_requests__req_id__send_post",
        "parameters": [
          {
            "name": "req_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Req Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Resend Update Request Api V1 Update Requests  Req Id  Send Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/update-requests/{req_id}/send",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/nodes/comments": {
      "get": {
        "summary": "Node Comments",
        "operationId": "knowledge_node_comments_api_v1_nodes_comments_get",
        "parameters": [
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 600,
              "title": "Target"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Node Comments Api V1 Nodes Comments Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/nodes/comments",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "post": {
        "summary": "Add Node Comment",
        "operationId": "knowledge_add_node_comment_api_v1_nodes_comments_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NodeCommentIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Add Node Comment Api V1 Nodes Comments Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/nodes/comments",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/comments/{comment_id}": {
      "patch": {
        "summary": "Edit Comment",
        "description": "Change your own comment; it is marked as edited, with when.",
        "operationId": "knowledge_edit_comment_api_v1_comments__comment_id__patch",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Comment Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentEditIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Edit Comment Api V1 Comments  Comment Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/comments/{comment_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "delete": {
        "summary": "Delete Comment",
        "description": "Delete your own comment (an IMSL analyst may delete anyone's).",
        "operationId": "knowledge_delete_comment_api_v1_comments__comment_id__delete",
        "parameters": [
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Comment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Delete Comment Api V1 Comments  Comment Id  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/comments/{comment_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/requests": {
      "post": {
        "summary": "Knowledge Request",
        "description": "Ask for a node to be brought up to date, or for knowledge that is not held yet. Kept here and put on Digital Twin's\nresearch queue as a document's request is (one queue).",
        "operationId": "knowledge_knowledge_request_api_v1_requests_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeRequestIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Knowledge Request Api V1 Requests Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/requests",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/graph/activity": {
      "get": {
        "summary": "Graph Activity",
        "description": "Comments and requests per node (document id or node IRI), so the graph can show where people are talking.",
        "operationId": "knowledge_graph_activity_api_v1_graph_activity_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Graph Activity Api V1 Graph Activity Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/graph/activity",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/search": {
      "get": {
        "summary": "Search",
        "description": "Keyword (BM25) and meaning (embedding) search over every searchable document, merged by rank. With provisions=true the\nActs' provisions are searched too, and `merged` holds both, ranked together (both arms score by RRF with k = 60).",
        "operationId": "knowledge_search_api_v1_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "description": "what to look for, in plain words",
              "title": "Q"
            },
            "description": "what to look for, in plain words"
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "only this knowledge set",
              "title": "Set"
            },
            "description": "only this knowledge set"
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 10,
              "title": "K"
            }
          },
          {
            "name": "provisions",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "also search the Acts (Codify) and return one merged list in `merged`",
              "default": false,
              "title": "Provisions"
            },
            "description": "also search the Acts (Codify) and return one merged list in `merged`"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Search Api V1 Search Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/search",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/graph": {
      "get": {
        "summary": "Knowledge Graph",
        "description": "The knowledge graph as one JSON-LD document in the OSINT.place universal schema: documents, sets, Acts and cited provisions.",
        "operationId": "knowledge_knowledge_graph_api_v1_graph_get",
        "parameters": [
          {
            "name": "set",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "only this knowledge set",
              "title": "Set"
            },
            "description": "only this knowledge set"
          },
          {
            "name": "document",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "only this document (and what it links to)",
              "title": "Document"
            },
            "description": "only this document (and what it links to)"
          },
          {
            "name": "provisions",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "resolve the provisions legal notes cite (one Codify query per note)",
              "default": true,
              "title": "Provisions"
            },
            "description": "resolve the provisions legal notes cite (one Codify query per note)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/graph",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/capabilities": {
      "get": {
        "summary": "Capabilities",
        "operationId": "knowledge_capabilities_api_v1_capabilities_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Capabilities Api V1 Capabilities Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/capabilities",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/questions/similar": {
      "get": {
        "summary": "Similar Questions",
        "operationId": "knowledge_similar_questions_api_v1_questions_similar_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Q"
            }
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 20,
              "minimum": 1,
              "default": 5,
              "title": "K"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Similar Questions Api V1 Questions Similar Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/questions/similar",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/questions": {
      "post": {
        "summary": "Create Question",
        "operationId": "knowledge_create_question_api_v1_questions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Body"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Create Question Api V1 Questions Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/questions",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/questions/{qid}": {
      "get": {
        "summary": "Get Question",
        "operationId": "knowledge_get_question_api_v1_questions__qid__get",
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Qid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Question Api V1 Questions  Qid  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/questions/{qid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "put": {
        "summary": "Put Question",
        "operationId": "knowledge_put_question_api_v1_questions__qid__put",
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Qid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Put Question Api V1 Questions  Qid  Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/questions/{qid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/questions/{qid}/trail": {
      "post": {
        "summary": "Add Trail",
        "operationId": "knowledge_add_trail_api_v1_questions__qid__trail_post",
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Qid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Add Trail Api V1 Questions  Qid  Trail Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/questions/{qid}/trail",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "get": {
        "summary": "Get Trail",
        "operationId": "knowledge_get_trail_api_v1_questions__qid__trail_get",
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Qid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Trail Api V1 Questions  Qid  Trail Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/questions/{qid}/trail",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/gaps": {
      "post": {
        "summary": "Create Gap",
        "operationId": "knowledge_create_gap_api_v1_gaps_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Gap Api V1 Gaps Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/gaps",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "get": {
        "summary": "List Gaps",
        "operationId": "knowledge_list_gaps_api_v1_gaps_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "tierStatus",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tierstatus"
            }
          },
          {
            "name": "questionId",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Questionid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Gaps Api V1 Gaps Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/gaps",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/gaps/{gid}": {
      "patch": {
        "summary": "Patch Gap",
        "operationId": "knowledge_patch_gap_api_v1_gaps__gid__patch",
        "parameters": [
          {
            "name": "gid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Gid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Gap Api V1 Gaps  Gid  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/gaps/{gid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/playbook/rules": {
      "get": {
        "summary": "Playbook Rules",
        "operationId": "knowledge_playbook_rules_api_v1_playbook_rules_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Scope"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Playbook Rules Api V1 Playbook Rules Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/playbook/rules",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "post": {
        "summary": "Add Playbook Rule",
        "operationId": "knowledge_add_playbook_rule_api_v1_playbook_rules_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Add Playbook Rule Api V1 Playbook Rules Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/playbook/rules",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/playbook/rules/{rid}": {
      "patch": {
        "summary": "Patch Playbook Rule",
        "operationId": "knowledge_patch_playbook_rule_api_v1_playbook_rules__rid__patch",
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Rid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Patch Playbook Rule Api V1 Playbook Rules  Rid  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/playbook/rules/{rid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/playbook/rules/{rid}/applied": {
      "post": {
        "summary": "Playbook Rule Applied",
        "operationId": "knowledge_playbook_rule_applied_api_v1_playbook_rules__rid__applied_post",
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Rid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Playbook Rule Applied Api V1 Playbook Rules  Rid  Applied Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/playbook/rules/{rid}/applied",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/feedback": {
      "post": {
        "summary": "Add Feedback",
        "operationId": "knowledge_add_feedback_api_v1_feedback_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Body"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Add Feedback Api V1 Feedback Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/feedback",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/feedback/summary": {
      "get": {
        "summary": "Feedback Summary",
        "operationId": "knowledge_feedback_summary_api_v1_feedback_summary_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Feedback Summary Api V1 Feedback Summary Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/feedback/summary",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/documents/{doc_id}/provisions": {
      "get": {
        "summary": "Document Provisions",
        "description": "The provisions of the Act a legal note is about that the note cites, each resolved in Codify (AKN eId, label, link).",
        "operationId": "knowledge_document_provisions_api_v1_documents__doc_id__provisions_get",
        "parameters": [
          {
            "name": "doc_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Doc Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Document Provisions Api V1 Documents  Doc Id  Provisions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/documents/{doc_id}/provisions",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/provisions": {
      "get": {
        "summary": "Provisions",
        "description": "Codify's hybrid search over the primary legal texts; each hit cites the Act, section and legislation.gov.uk link.\nIn a projected world, hits the projection changes carry its text (`projected: true`) and inserted provisions that match are added.",
        "operationId": "knowledge_provisions_api_v1_provisions_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "description": "what to look for, in plain words",
              "title": "Q"
            },
            "description": "what to look for, in plain words"
          },
          {
            "name": "act",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "only this Act (an id from legal/acts.json, e.g. ukpga-2000-23)",
              "title": "Act"
            },
            "description": "only this Act (an id from legal/acts.json, e.g. ukpga-2000-23)"
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 10,
              "title": "K"
            }
          },
          {
            "name": "world",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "current | projection:<id>[@rev] (Policy Lab); as-at:<date> is not loaded yet",
              "default": "current",
              "title": "World"
            },
            "description": "current | projection:<id>[@rev] (Policy Lab); as-at:<date> is not loaded yet"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Provisions Api V1 Provisions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/provisions",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/acts": {
      "get": {
        "summary": "Acts Held",
        "description": "The Acts and instruments Codify holds (ADR 0002): expression date, validation grade and coverage ratio for each.",
        "operationId": "knowledge_acts_held_api_v1_acts_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Acts Held Api V1 Acts Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/acts",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/acts/{act_id}/provisions/{eid}": {
      "get": {
        "summary": "Act Provision",
        "description": "One provision by AKN eId (a section returns everything beneath it), with a citation and link to legislation.gov.uk.\nIn a projected world the changed text is swapped in, marked `projected` and \"Not law\"; a provision the projection inserts is served too.",
        "operationId": "knowledge_act_provision_api_v1_acts__act_id__provisions__eid__get",
        "parameters": [
          {
            "name": "act_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Act Id"
            }
          },
          {
            "name": "eid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Eid"
            }
          },
          {
            "name": "world",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "current | projection:<id>[@rev] (Policy Lab); as-at:<date> is not loaded yet",
              "default": "current",
              "title": "World"
            },
            "description": "current | projection:<id>[@rev] (Policy Lab); as-at:<date> is not loaded yet"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Act Provision Api V1 Acts  Act Id  Provisions  Eid  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/acts/{act_id}/provisions/{eid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/sets": {
      "get": {
        "summary": "Knowledge Sets",
        "operationId": "knowledge_knowledge_sets_api_v1_sets_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Knowledge Sets Api V1 Sets Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/sets",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/sets/{set_id}": {
      "get": {
        "summary": "Knowledge Set",
        "operationId": "knowledge_knowledge_set_api_v1_sets__set_id__get",
        "parameters": [
          {
            "name": "set_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Set Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Knowledge Set Api V1 Sets  Set Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/sets/{set_id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/changes": {
      "get": {
        "summary": "List Changes",
        "description": "What changed in the knowledge, newest first, each with what it touches (consumers and personas) and its review status.",
        "operationId": "knowledge_list_changes_api_v1_changes_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ISO date or time; default: everything",
              "title": "Since"
            },
            "description": "ISO date or time; default: everything"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "pending",
                "reviewed",
                "dismissed",
                "all"
              ],
              "type": "string",
              "default": "all",
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Changes Api V1 Changes Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/changes",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/review/digest": {
      "get": {
        "summary": "Review Digest",
        "description": "The daily review: pending changes since `since`, grouped by the consumer they touch, flagged items first, with\nplain-language lines. A scheduled job can call this once a day.",
        "operationId": "knowledge_review_digest_api_v1_review_digest_get",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "description": "default: the last 24 hours",
              "title": "Since"
            },
            "description": "default: the last 24 hours"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Review Digest Api V1 Review Digest Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/review/digest",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/changes/review": {
      "post": {
        "summary": "Review Many",
        "description": "Mark several changes reviewed (or dismissed): a list of ids, or everything pending (optionally since a time).",
        "operationId": "knowledge_review_many_api_v1_changes_review_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkReviewIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Review Many Api V1 Changes Review Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/changes/review",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/changes/{change_id}/review": {
      "post": {
        "summary": "Review One",
        "operationId": "knowledge_review_one_api_v1_changes__change_id__review_post",
        "parameters": [
          {
            "name": "change_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Change Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Review One Api V1 Changes  Change Id  Review Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/changes/{change_id}/review",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/changes/{change_id}/request-refresh": {
      "post": {
        "summary": "Request Refresh",
        "description": "Ask Digital Twin to refresh one persona because of this change. Uses the update-request forwarder: the same\nresearch queue, no second one.",
        "operationId": "knowledge_request_refresh_api_v1_changes__change_id__request_refresh_post",
        "parameters": [
          {
            "name": "change_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Change Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Request Refresh Api V1 Changes  Change Id  Request Refresh Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/changes/{change_id}/request-refresh",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/changes/legal-loaded": {
      "post": {
        "summary": "Legal Loaded",
        "description": "Record that the Acts were (re)loaded into Codify. The legal job runs outside this service, so a person records it.",
        "operationId": "knowledge_legal_loaded_api_v1_changes_legal_loaded_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegalLoadedIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Legal Loaded Api V1 Changes Legal Loaded Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/changes/legal-loaded",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/projections": {
      "get": {
        "summary": "Lab Projections",
        "operationId": "knowledge_lab_projections_api_v1_lab_projections_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Lab Projections Api V1 Lab Projections Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/projections",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "post": {
        "summary": "Lab Create Projection",
        "operationId": "knowledge_lab_create_projection_api_v1_lab_projections_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectionIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Lab Create Projection Api V1 Lab Projections Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/projections",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/projections/{pid}": {
      "get": {
        "summary": "Lab Projection",
        "operationId": "knowledge_lab_projection_api_v1_lab_projections__pid__get",
        "parameters": [
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pid"
            }
          },
          {
            "name": "rev",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rev"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Projection Api V1 Lab Projections  Pid  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/projections/{pid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/projections/{pid}/revisions": {
      "post": {
        "summary": "Lab Add Revision",
        "operationId": "knowledge_lab_add_revision_api_v1_lab_projections__pid__revisions_post",
        "parameters": [
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevisionIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Add Revision Api V1 Lab Projections  Pid  Revisions Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/projections/{pid}/revisions",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/projections/{pid}/diff": {
      "get": {
        "summary": "Lab Diff",
        "operationId": "knowledge_lab_diff_api_v1_lab_projections__pid__diff_get",
        "parameters": [
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pid"
            }
          },
          {
            "name": "rev",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rev"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Diff Api V1 Lab Projections  Pid  Diff Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/projections/{pid}/diff",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/projections/{pid}/bundle": {
      "get": {
        "summary": "Lab Bundle",
        "operationId": "knowledge_lab_bundle_api_v1_lab_projections__pid__bundle_get",
        "parameters": [
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Pid"
            }
          },
          {
            "name": "world",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "current | projected",
              "default": "projected",
              "title": "World"
            },
            "description": "current | projected"
          },
          {
            "name": "rev",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rev"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500,
              "description": "also add up to k provision-search hits for this",
              "default": "",
              "title": "Q"
            },
            "description": "also add up to k provision-search hits for this"
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 20,
              "minimum": 0,
              "default": 0,
              "title": "K"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Bundle Api V1 Lab Projections  Pid  Bundle Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/projections/{pid}/bundle",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/question-sets": {
      "get": {
        "summary": "Lab Sets",
        "operationId": "knowledge_lab_sets_api_v1_lab_question_sets_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Lab Sets Api V1 Lab Question Sets Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/question-sets",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "post": {
        "summary": "Lab Create Set",
        "operationId": "knowledge_lab_create_set_api_v1_lab_question_sets_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Lab Create Set Api V1 Lab Question Sets Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/question-sets",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/question-sets/{sid}": {
      "get": {
        "summary": "Lab Set",
        "operationId": "knowledge_lab_set_api_v1_lab_question_sets__sid__get",
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Sid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Set Api V1 Lab Question Sets  Sid  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/question-sets/{sid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/question-sets/{sid}/questions": {
      "post": {
        "summary": "Lab Add Question",
        "operationId": "knowledge_lab_add_question_api_v1_lab_question_sets__sid__questions_post",
        "parameters": [
          {
            "name": "sid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Sid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Add Question Api V1 Lab Question Sets  Sid  Questions Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/question-sets/{sid}/questions",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/questions/{qid}": {
      "patch": {
        "summary": "Lab Update Question",
        "operationId": "knowledge_lab_update_question_api_v1_lab_questions__qid__patch",
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Qid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuestionPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Update Question Api V1 Lab Questions  Qid  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/questions/{qid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "delete": {
        "summary": "Lab Delete Question",
        "operationId": "knowledge_lab_delete_question_api_v1_lab_questions__qid__delete",
        "parameters": [
          {
            "name": "qid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Qid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Delete Question Api V1 Lab Questions  Qid  Delete"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/questions/{qid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/asks": {
      "post": {
        "summary": "Lab Ask",
        "description": "Ask one question about one subject in two worlds (as it is, as projected). A paid call to Digital Twin: a person only.",
        "operationId": "knowledge_lab_ask_api_v1_lab_asks_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Ask Api V1 Lab Asks Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/asks",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      },
      "get": {
        "summary": "Lab Asks",
        "operationId": "knowledge_lab_asks_api_v1_lab_asks_get",
        "parameters": [
          {
            "name": "projection",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Projection"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Asks Api V1 Lab Asks Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/asks",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/asks/{aid}": {
      "get": {
        "summary": "Lab Get Ask",
        "operationId": "knowledge_lab_get_ask_api_v1_lab_asks__aid__get",
        "parameters": [
          {
            "name": "aid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Aid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Get Ask Api V1 Lab Asks  Aid  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/asks/{aid}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/lab/asks/{aid}/save-question": {
      "post": {
        "summary": "Lab Save Question",
        "operationId": "knowledge_lab_save_question_api_v1_lab_asks__aid__save_question_post",
        "parameters": [
          {
            "name": "aid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Aid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveQuestionIn"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Lab Save Question Api V1 Lab Asks  Aid  Save Question Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/lab/asks/{aid}/save-question",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/schema": {
      "get": {
        "summary": "Get Schema",
        "operationId": "knowledge_get_schema_api_v1_schema_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Get Schema Api V1 Schema Get"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/schema",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/schema/prepare": {
      "post": {
        "summary": "Prepare Dataset",
        "description": "Tidy a pasted dataset into flat rows without testing it: the rows (first 20), what was repaired, and the prepared JSON.",
        "operationId": "knowledge_prepare_dataset_api_v1_schema_prepare_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaPrepare"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Prepare Dataset Api V1 Schema Prepare Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/schema/prepare",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/knowledge/api/v1/schema/test": {
      "post": {
        "summary": "Test Dataset",
        "operationId": "knowledge_test_dataset_api_v1_schema_test_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaTest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Test Dataset Api V1 Schema Test Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "tags": [
          "Knowledge"
        ],
        "x-imsl-app": "knowledge",
        "x-imsl-request-path": "/api/v1/schema/test",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.knowledge.osint.place",
            "description": "Knowledge base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/health": {
      "get": {
        "summary": "Server status and whether chat (Claude) and Jev are configured.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_health",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/health",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/structure": {
      "get": {
        "summary": "Stages, teams, flows between teams, functions, disciplines and prompting techniques.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_structure",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/structure",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/personas": {
      "get": {
        "summary": "List personas.",
        "parameters": [
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "function",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "discipline",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free text; results ranked by match."
          }
        ],
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_personas",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/personas",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/personas/{id}": {
      "get": {
        "summary": "One persona with its skills and knowledge expanded.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_personas_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/personas/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills": {
      "get": {
        "summary": "List skills, filtered by purpose rather than by app.",
        "parameters": [
          {
            "name": "function",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "discipline",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "persona",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "maximum": 500
            }
          }
        ],
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_skills",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills/coverage": {
      "get": {
        "summary": "Which app-derived skills can be run: wired to the app's API (a collector returning an OSINT.place canonical graph), runnable from their own instructions (prompt), or not wired with the precise reason (for example no callable API, or the detector is not in code). Registry: server/lib/skill-registry/<app>.json; adapters: server/lib/adapters/<app>.mjs. Each wired row lists its capabilities (job, sse, urlencoded, multipart, two-token-auth) and the top level counts them.",
        "responses": {
          "200": {
            "description": "{ total, wired, prompt, notWired, apps: { <app>: { wired, prompt, notWired } }, capabilities: { job, sse, urlencoded, multipart, two-token-auth }, skills: [{ id, app, status: wired|prompt|not-wired, adapter?, inputs?, capabilities?, reason? }] }"
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_skills_coverage",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/coverage",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills/{id}": {
      "get": {
        "summary": "One skill, including its instructions where it has them.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_skills_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills/{id}/run": {
      "post": {
        "summary": "Run a skill. A prompt skill (its own instructions, in the system message) goes to the model with the inputs as quoted data blocks; an app-derived skill is dispatched to its app from server/lib/skill-registry/<app>.json by the generic or per-app adapter in server/lib/adapters/ and returns an OSINT.place canonical graph. The run is saved for the signed-in person unless save is false. 400 bad, unknown or tag-closing inputs, 413 too large, 501 app skill not wired, 503 model or app not connected, 499 cancelled. Aborts upstream if the client disconnects. Collector failures: 502 the app was unreachable, refused the key or answered in a shape that could not be mapped; 504 the app did not answer in time. An asynchronous app skill (start + poll: Scrapers-IMSL runs, CompanyFinder and VesselHunter investigations, VesselIntel-IMSL area search) is followed to its end within the skill's maxWaitMs; past that the answer is 202 { status: \"running\", job: { id, pollUrl } } with a Location header, and GET /api/skills/jobs/{id} resumes it. A skill registered follow: on-request (Scrapers-IMSL) returns the app's start record at once with a job handle unless the body carries wait: true. 410 the app no longer holds the job. A skill that needs a person (person-investigator) answers 202 { status: \"awaiting-human\", handoff: { id, kind, options... }, job } and continues only after POST /api/handoffs/{id}/decision. Body may carry persona (a persona id) and advice (text shown beside the request; never acted on).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "1 streams the answer as server-sent events (same as Accept: text/event-stream). Events: start {skill}; token {text}; retry {errors} (structured output being retried once); result {the JSON body below}; error {status, error}. Failures before the first event are ordinary HTTP errors."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inputs": {
                    "type": "object",
                    "description": "Text for each input the skill declares (GET /api/skills/{id} lists them under inputs, or run.inputs). Each at most 20000 characters, 60000 together. An input may not contain an <input> tag.",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "save": {
                    "type": "boolean",
                    "description": "false to not keep this run in history. Default true."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ skill, kind: prompt|collector, output, model, validation, warnings, timing: {ms}, limits, runId, startedAt }. output is { text, json? } or { graph, count, validation }. validation is null when the skill declares no output structure, else { ok, errors, attempts } for a prompt skill that declares output: { format: json, schema } (one retry with the errors fed back). warnings lists flagged override attempts (code override:*, with input and excerpt; a hint, not a guarantee) and neutralised role or template markers. Limits come from the skill's declared limits { maxTokens, timeoutSeconds }, else 4096 tokens and 90 s, capped at 8192 and 180 s. runId is null if saving failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_skills_id_run",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/{id}/run",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/plays": {
      "get": {
        "summary": "Ways of working: common scenarios with their core team, skills and products.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_plays",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/plays",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/knowledge": {
      "get": {
        "summary": "The legal, policy and standards corpus held by the advisers.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_knowledge",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/knowledge",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/documents": {
      "get": {
        "summary": "The whole document a chat reference names, from the IMSL knowledge service (nothing is bundled in the Digital Twin): a provision by Act and AKN eId, or a note's passages in order. Restricted and client notes return full: false and no text; show the reference's excerpt instead. Statute text is structured, as at its date, and not authoritative: legislation.gov.uk is.",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A reference's ref: ukpga-2000-23#section-28 or doc:<id>."
          }
        ],
        "responses": {
          "200": {
            "description": "{ ref, kind: statute|note, title, url, as_at?, authoritative: false, access, full, truncated?, sections: [{ heading, text }] }"
          },
          "400": {
            "description": "ref is missing or not an Act provision or note."
          },
          "404": {
            "description": "The knowledge service does not hold it."
          },
          "502": {
            "description": "The knowledge service could not be reached."
          },
          "503": {
            "description": "APPS_MASTER_API_KEY is not set on this server."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_documents",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/documents",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/gaps": {
      "get": {
        "summary": "Skills nobody holds, personas with no skills, teams with no people, documented methods with no code.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_gaps",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/gaps",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/search": {
      "get": {
        "summary": "Smart search across personas, skills and ways of working.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_search",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/search",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/assemble": {
      "post": {
        "summary": "How would I build this scenario? Picks the way of working (committed mapping, then ledger, then Jev; keyword matching if Jev is off), assembles the team with reasons, checks coverage and proposes a battle rhythm.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "scenario"
                ],
                "properties": {
                  "scenario": {
                    "type": "string"
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "commander",
                      "policy",
                      "partner",
                      "technical",
                      "public"
                    ]
                  },
                  "tempo": {
                    "type": "string",
                    "enum": [
                      "routine",
                      "crisis"
                    ]
                  },
                  "start": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Persona ids already in the team."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_assemble",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/assemble",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/coverage": {
      "post": {
        "summary": "Coverage check for a list of persona ids.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "personas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_coverage",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/coverage",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/teams": {
      "get": {
        "summary": "Saved teams.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_teams",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/teams",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      },
      "post": {
        "summary": "Save a team so it can be reused.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "personas"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "scenario": {
                    "type": "string"
                  },
                  "play": {
                    "type": "string"
                  },
                  "audience": {
                    "type": "string"
                  },
                  "tempo": {
                    "type": "string"
                  },
                  "personas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "skills": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_teams",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/teams",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/teams/{id}": {
      "get": {
        "summary": "One saved team.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_teams_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/teams/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/chat": {
      "post": {
        "summary": "One persona replies (pass only) or every persona in the room in turn. Each may suggest bringing in a colleague (handoff). Pass last: true for the final speaker in \"mediate\" mode, who sums up.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "personas",
                  "transcript"
                ],
                "properties": {
                  "personas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 4
                  },
                  "transcript": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "speaker": {
                          "type": "string",
                          "description": "\"user\" or a persona id"
                        },
                        "text": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "answer",
                      "mediate"
                    ]
                  },
                  "only": {
                    "type": "string",
                    "description": "Ask just this persona to reply."
                  },
                  "last": {
                    "type": "boolean"
                  },
                  "tone": {
                    "type": "string",
                    "enum": [
                      "factual",
                      "mixed",
                      "casual"
                    ],
                    "default": "factual",
                    "description": "How the room answers: factual (formal, sources quoted), mixed (personable) or casual (like talking to a mate). Facts and citations are the same in every tone."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ replies: [{ persona, text, handoff?: { persona, reason }, references: [{ n, title, url, statute, ref?, as_at?, access?, excerpt?, quotes?, persona? }], unverifiedQuotes?, unverified? }] }. Each [n] in text is a reference with a url a person can open. For advisers with a knowledge set, a reference also carries `excerpt` (the passage text the adviser was shown, trimmed), `quotes` ([{ text, start, end }]: spans of the reply quoted word for word from the excerpt, start/end index into it), `persona` (who cited it) and `ref` (act#eId for statute, doc:<id> for a note; pass it to GET /api/documents). `unverified` lists quotations that matched nothing retrieved (`unverifiedQuotes` is their count)."
          },
          "503": {
            "description": "Chat is not configured on this server."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_chat",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/chat",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/requests": {
      "get": {
        "summary": "Research requests: new personas or skills, and refreshes of existing ones.",
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_requests",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/requests",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      },
      "post": {
        "summary": "Queue a research request. Claude Code's agent-research skill works the queue.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "name"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "persona",
                      "skill",
                      "refresh"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "brief": {
                    "type": "string"
                  },
                  "team": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string",
                    "description": "For refresh: the persona or skill id."
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_requests",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/requests",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/requests/refresh-due": {
      "post": {
        "summary": "Queue refresh requests for personas and skills past their review date (reviewed + reviewEvery). The weekly step of the scheduled job across the apps.",
        "description": "Takes the first `limit` due items, most urgent first (never reviewed, advisers with a knowledge set, the 90-day law, policy and API interval, longest overdue), skipping any with an open refresh or one finished within its interval. Only active personas and skills in skills/core and skills/researched are refreshed this way; generated skills follow their sources through npm run import. Safe to repeat.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20,
                    "default": 5,
                    "description": "At most this many requests are queued."
                  },
                  "dryRun": {
                    "type": "boolean",
                    "default": false,
                    "description": "Say what would be queued; write nothing."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`checked`, `due`, `alreadyRequested`, `queue` (the items chosen), `waiting` (due but over the limit), `generatedSkills`, `dryRun`, and `queued` (the requests written, with origin: schedule)."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_requests_refresh_due",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/requests/refresh-due",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/review/due": {
      "get": {
        "summary": "Personas and skills past their review date, most urgent first. Read-only.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The same shape as POST /api/requests/refresh-due, without `queued`."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_review_due",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/review/due",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/chat/route": {
      "post": {
        "summary": "Who answers the latest message, in speaking order: @mentions first, then @all, then everyone in \"mediate\" mode, otherwise the one to three people the message concerns (chosen by the model, keyword fallback). Returns { speakers, by }.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "personas",
                  "transcript"
                ],
                "properties": {
                  "personas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "transcript": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "answer",
                      "mediate"
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_chat_route",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/chat/route",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/chat/summary": {
      "post": {
        "summary": "The takeaway summary of a conversation: the original question, discussion points, policies that apply, risks, what was agreed and what still differs, and the sources cited with their links. One structured call to the model (OpenRouter). The question is the first user message and the sources are the references the replies carried, renumbered across the conversation; the model writes only the lists. 503 when OPENROUTER_API_KEY is not set, 400 when there is nothing to summarise.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "transcript"
                ],
                "properties": {
                  "personas": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Who was in the room (at most 10)."
                  },
                  "transcript": {
                    "type": "array",
                    "description": "Messages as { speaker, text, references? }; speaker is 'user' or a persona id; references are { n, title, url } as /api/chat returned them.",
                    "items": {
                      "type": "object"
                    }
                  },
                  "final": {
                    "type": "boolean",
                    "description": "true (default) when the conversation has ended; false to summarise mid-conversation, which leaves unresolved items under 'differs'."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "question": {
                      "type": "string"
                    },
                    "points": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "agreed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "differs": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "n": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "statute": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "final": {
                      "type": "boolean"
                    },
                    "model": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_chat_summary",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/chat/summary",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/lab/ask": {
      "post": {
        "summary": "Policy Lab: ask one question about an example report under two or three worlds (the law as it is, and as projected) and compare the answers. Stateless and paid: each world is answered `samples` times by the Lab's model (LAB_ASK_MODEL, default google/gemini-3.8-flash, at its normal reasoning; OpenRouter, temperature 0.6) using ONLY the provisions sent, written answer before the verdict fields (answer-first). Majority, counts and whether the answers were unanimous are worked out per field and world; the comparison between the first two worlds, and any expected pass/fail, is deterministic (no model judges). A projection is never law and nothing is stored here. A per-ask cost cap (LAB_ASK_MAX_COST, default 0.25 USD) stops further calls; answers left over become { error: \"cost cap reached\" }. 400 for a bad request, 413 when the provisions total more than 80,000 characters, 503 when OPENROUTER_API_KEY is not set.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question",
                  "subject",
                  "worlds"
                ],
                "properties": {
                  "question": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "object",
                    "required": [
                      "text"
                    ],
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string",
                        "description": "The example report's text (at most 40,000 characters)."
                      }
                    }
                  },
                  "worlds": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 3,
                    "description": "Two or three worlds. The comparison is between the first two. Provisions marked projected are shown to the model as amended or inserted.",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "provisions"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "^[a-z][a-z0-9_]{0,40}$, for example current or projected."
                        },
                        "label": {
                          "type": "string"
                        },
                        "provisions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "citation",
                              "text"
                            ],
                            "properties": {
                              "citation": {
                                "type": "string"
                              },
                              "heading": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "projected": {
                                "type": "boolean"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "fields": {
                    "type": "array",
                    "maxItems": 12,
                    "description": "The verdict fields. Default: in_scope (yes, no, unclear) and outcome (permitted, permitted_with_conditions, prohibited, not_addressed, unclear).",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "^[a-z][a-z0-9_]{0,40}$"
                        },
                        "enum": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "At most 10 values."
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "enum"
                      ]
                    }
                  },
                  "expect": {
                    "type": "object",
                    "description": "Optional: { <field>: { <world name>: [accepted values] } }. A world passes a field when its majority is in the list.",
                    "additionalProperties": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "samples": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "default": 3
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answers, tallies and comparison.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "string"
                    },
                    "temperature": {
                      "type": "number"
                    },
                    "samples": {
                      "type": "integer"
                    },
                    "order": {
                      "type": "string",
                      "enum": [
                        "answer-first"
                      ]
                    },
                    "cost_usd": {
                      "type": "number"
                    },
                    "cost_basis": {
                      "type": "string",
                      "enum": [
                        "reported",
                        "estimated"
                      ]
                    },
                    "cost_cap_usd": {
                      "type": "number"
                    },
                    "cost_cap_reached": {
                      "type": "boolean"
                    },
                    "calls": {
                      "type": "integer"
                    },
                    "worlds": {
                      "type": "object",
                      "description": "Keyed by world name.",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "answers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "description": "An answer, or { error } when that sample failed or the cost cap stopped it.",
                              "properties": {
                                "answer": {
                                  "type": "string"
                                },
                                "cited": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "gaps": {
                                  "type": "string"
                                },
                                "fields": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "error": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "fields": {
                            "type": "object",
                            "description": "Per field: the majority value, how many answers gave each value, and whether every answer agreed.",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counts": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "integer"
                                  }
                                },
                                "unanimous": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comparison": {
                      "type": "object",
                      "description": "Per field, first world against second: changed, from, to, split (either world not unanimous), and expected ({ <world>: pass | fail }) when expect was sent.",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "changed": {
                            "type": "boolean"
                          },
                          "from": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "to": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "split": {
                            "type": "boolean"
                          },
                          "expected": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail"
                              ]
                            }
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "changed": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "split": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "expected_pass": {
                          "type": "integer"
                        },
                        "expected_fail": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed request: worlds, samples, fields or expect."
          },
          "413": {
            "description": "More than 80,000 characters of provision text, or an over-long subject or question."
          },
          "503": {
            "description": "OPENROUTER_API_KEY is not set."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_lab_ask",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/lab/ask",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills/runs": {
      "get": {
        "summary": "The signed-in person's saved skill runs, newest first, as summaries (no inputs or output). At most 100 runs and 5 MB are kept per person; the oldest are pruned on save.",
        "parameters": [
          {
            "name": "skill",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ count, runs: [{ id, skillId, skillName, kind, model, startedAt, durationMs, truncated, validationOk, warnings }] }"
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_skills_runs",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/runs",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills/runs/{id}": {
      "get": {
        "summary": "One saved run with its inputs, output, model, timing, validation, warnings and user. 404 if it is not this person's.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stored run."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_skills_runs_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/runs/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      },
      "delete": {
        "summary": "Delete one saved run (this person's only).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ deleted }"
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_delete_api_skills_runs_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/runs/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/skills/jobs/{id}": {
      "get": {
        "summary": "Resume an asynchronous collector job a run left \"running\". Polls the app again for up to the skill's maxWaitMs (wait=0: one poll) and answers 200 with the run result when the job is done (saved to the person's runs once, with runId), or 202 with the job again when it is not. A finished job is answered from its stored result. Jobs are per person: 404 if it is not this person's. 502 the app reported the job failed (its reason is in the message), 410 the app no longer holds it, 499 cancelled, 504 the app did not answer.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0"
              ]
            }
          },
          {
            "name": "save",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "0"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run result, as POST /api/skills/{id}/run answers, plus job { id, status: \"done\", pollUrl } and runId when it was saved."
          },
          "202": {
            "description": "{ kind: \"collector\", status: \"running\", skill, job: { id, status, pollUrl, remoteStatus? } }"
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_skills_jobs_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/jobs/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      },
      "delete": {
        "summary": "Forget a stored job and, for an app with a cancel route (CompanyFinder and VesselHunter DELETE /api/investigate/{id}, Scrapers-IMSL POST /api/runs/{id}/cancel, VesselIntel-IMSL DELETE /api/area-search/{id}), ask it to stop. This person's only.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ deleted }"
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_delete_api_skills_jobs_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/skills/jobs/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/handoffs": {
      "get": {
        "summary": "The signed-in person's \"needs you\" requests, newest first, with `pending` the number waiting. A run that must stop for a human decision (choose between candidate identities, or record a statutory authorisation before deep collection) raises one. Only the person it was raised for sees it. A pending request past its time limit is listed as expired, which counts as declined.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "declined",
                "expired"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ count, pending, handoffs: [{ id, kind: choose-candidate|authorise, status, question, options: [{ id, label, evidence }], allowNone, selectors, fields, frameworks, agents, subject, advice, requestedBy: { user, persona, skill }, createdAt, expiresAt, decision, decidedBy, decidedAt, audit: [{ at, event, by, detail }] }] }. Nothing in `options` is selected or defaulted."
          },
          "401": {
            "description": "Not signed in."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_handoffs",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/handoffs",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/handoffs/{id}": {
      "get": {
        "summary": "One request with its options and evidence, its authorisation fields and its audit trail. 404 if it is not this person's.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request."
          },
          "404": {
            "description": "Not found, or not this person's."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_get_api_handoffs_id",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/handoffs/{id}",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/digitaltwin/api/handoffs/{id}/decision": {
      "post": {
        "summary": "Records the signed-in person's decision and continues the run. Body { decision: \"approve\"|\"decline\" (required, no default), choice?: { candidateId | none: true, selectors?: { emails|phones|usernames: [values offered] } } for choose-candidate, authorisation?: { purpose, legalGateway, necessityProportionality, authorisedBy, reference, timeLimit } (every field required, free text) and acknowledge: true (never assumed) for authorise, note? }. A persona or machine token is refused (403): personas advise and never approve. Decided once (409 after), 410 if it expired (expiry counts as declined). The answer is { handoff, next }: next is the run afterwards (another awaiting-human request, running with a job to poll at /api/skills/jobs/{id}, the finished result, or declined). This records a human decision; it does not make a collection lawful.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "decline"
                    ]
                  },
                  "choice": {
                    "type": "object"
                  },
                  "authorisation": {
                    "type": "object"
                  },
                  "acknowledge": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "decision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ handoff, next }"
          },
          "403": {
            "description": "Not a signed-in person."
          },
          "404": {
            "description": "Not found, or not this person's."
          },
          "409": {
            "description": "Already decided."
          },
          "410": {
            "description": "Expired (counts as declined)."
          },
          "422": {
            "description": "A choice is missing or invalid, a field is empty, or the acknowledgement is not true."
          }
        },
        "tags": [
          "Digital Twin"
        ],
        "operationId": "digitaltwin_post_api_handoffs_id_decision",
        "x-imsl-app": "digitaltwin",
        "x-imsl-request-path": "/api/handoffs/{id}/decision",
        "x-imsl-tag": [],
        "servers": [
          {
            "url": "https://imsl.digitaltwin.osint.place",
            "description": "Digital Twin base URL"
          }
        ]
      }
    },
    "/anpr/api/v1/overview": {
      "post": {
        "tags": [
          "ANPR"
        ],
        "operationId": "anpr_overview",
        "summary": "Overview: vehicle characteristics from a registration",
        "description": "Decodes the plate (DVLA INF104) and resolves make, model, colour, fuel, engine, first registration and the MOT history with mileage and defects. Same as the app's Overview.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "registration"
                ],
                "properties": {
                  "registration": {
                    "type": "string",
                    "example": "AB12 CDE",
                    "description": "UK registration mark; spaces optional"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Reason code for the audit trail, e.g. \"Crime investigation\""
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Operation or case reference for the audit trail"
                  },
                  "vin": {
                    "type": "string",
                    "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                    "description": "Optional VIN; checked against the characteristics"
                  },
                  "wait": {
                    "type": "boolean",
                    "default": true,
                    "description": "false = return 202 at once and poll GET /api/v1/investigations/{id}"
                  }
                }
              },
              "example": {
                "registration": "AB12 CDE"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The investigation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Investigation"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "description": "Invalid request (registration, sections or vin)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or refused API key (`code`: `sso_required` or `api_key_refused`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "An upstream service (Vertex AI, search) failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-imsl-app": "anpr",
        "x-imsl-request-path": "/api/v1/overview",
        "x-imsl-tag": [
          "Investigations"
        ],
        "servers": [
          {
            "url": "https://imsl.anpr.osint.place",
            "description": "ANPR base URL"
          }
        ],
        "security": [
          {
            "anpr_ApiKeyAuth": []
          }
        ]
      }
    },
    "/anpr/api/v1/search": {
      "post": {
        "tags": [
          "ANPR"
        ],
        "operationId": "anpr_search",
        "summary": "One call: initial search, then every follow-up search, final result",
        "description": "The one-call endpoint. Runs the overview, then all drill-down sections (default; `sections` narrows them), VIN resolution and the assessment automatically, and returns the finished investigation. Takes a few minutes; use `\"wait\": false` and poll GET /api/v1/investigations/{id} if your client times out. An empty or invalid body returns 400 and spends nothing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "registration"
                ],
                "properties": {
                  "registration": {
                    "type": "string",
                    "example": "AB12 CDE",
                    "description": "UK registration mark; spaces optional"
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "adverts",
                        "forums",
                        "social",
                        "records",
                        "damage",
                        "vin",
                        "photos"
                      ]
                    },
                    "description": "Default: all sections"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Reason code for the audit trail, e.g. \"Crime investigation\""
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Operation or case reference for the audit trail"
                  },
                  "vin": {
                    "type": "string",
                    "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                    "description": "Optional VIN; checked against the characteristics"
                  },
                  "wait": {
                    "type": "boolean",
                    "default": true,
                    "description": "false = return 202 at once and poll GET /api/v1/investigations/{id}"
                  }
                }
              },
              "example": {
                "registration": "AB12 CDE",
                "reason": "Crime investigation",
                "reference": "OP-123"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The finished investigation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Investigation"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "description": "Invalid request (registration, sections or vin)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or refused API key (`code`: `sso_required` or `api_key_refused`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "An upstream service (Vertex AI, search) failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-imsl-app": "anpr",
        "x-imsl-request-path": "/api/v1/search",
        "x-imsl-tag": [
          "Investigations"
        ],
        "servers": [
          {
            "url": "https://imsl.anpr.osint.place",
            "description": "ANPR base URL"
          }
        ],
        "security": [
          {
            "anpr_ApiKeyAuth": []
          }
        ]
      }
    },
    "/anpr/api/v1/deep-search": {
      "post": {
        "tags": [
          "ANPR"
        ],
        "operationId": "anpr_deepSearch",
        "summary": "Deep search: every drill-down section for a registration",
        "description": "Runs the overview (unless `investigationId` is given), then the chosen sections in parallel, VIN resolution and the analytical assessment. Sections (default all): `adverts` Adverts and sales; `forums` Forums and owner clubs; `social` Social and video; `records` Public records; `damage` Damage and salvage; `vin` VIN pivot; `photos` Photos of this vehicle. A finding is kept only where the page contains the plate.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "registration": {
                    "type": "string",
                    "example": "AB12 CDE",
                    "description": "Required unless investigationId is given"
                  },
                  "investigationId": {
                    "type": "string",
                    "description": "Drill down on an existing investigation instead of starting a new one"
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "adverts",
                        "forums",
                        "social",
                        "records",
                        "damage",
                        "vin",
                        "photos"
                      ]
                    },
                    "description": "Default: all sections"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Reason code for the audit trail, e.g. \"Crime investigation\""
                  },
                  "reference": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Operation or case reference for the audit trail"
                  },
                  "vin": {
                    "type": "string",
                    "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
                    "description": "Optional VIN; checked against the characteristics"
                  },
                  "wait": {
                    "type": "boolean",
                    "default": true,
                    "description": "false = return 202 at once and poll GET /api/v1/investigations/{id}"
                  }
                }
              },
              "example": {
                "registration": "AB12 CDE"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The investigation with findings and assessment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Investigation"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "description": "Invalid request (registration, sections or vin)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or refused API key (`code`: `sso_required` or `api_key_refused`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "investigationId not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A run is already in progress, or the investigation is a read-only demo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "An upstream service (Vertex AI, search) failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-imsl-app": "anpr",
        "x-imsl-request-path": "/api/v1/deep-search",
        "x-imsl-tag": [
          "Investigations"
        ],
        "servers": [
          {
            "url": "https://imsl.anpr.osint.place",
            "description": "ANPR base URL"
          }
        ],
        "security": [
          {
            "anpr_ApiKeyAuth": []
          }
        ]
      }
    },
    "/anpr/api/v1/investigations/{id}": {
      "get": {
        "tags": [
          "ANPR"
        ],
        "operationId": "anpr_getInvestigation",
        "summary": "Get an investigation, or poll a running one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The investigation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Investigation"
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "401": {
            "description": "Missing or refused API key (`code`: `sso_required` or `api_key_refused`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or not the key owner's (only the last 10 are kept)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-imsl-app": "anpr",
        "x-imsl-request-path": "/api/v1/investigations/{id}",
        "x-imsl-tag": [
          "Investigations"
        ],
        "servers": [
          {
            "url": "https://imsl.anpr.osint.place",
            "description": "ANPR base URL"
          }
        ],
        "security": [
          {
            "anpr_ApiKeyAuth": []
          }
        ]
      }
    },
    "/anpr/api/v1/investigations/{id}/canonical": {
      "get": {
        "tags": [
          "ANPR"
        ],
        "operationId": "anpr_getInvestigationCanonical",
        "summary": "Get an investigation in the OSINT.place universal schema (JSON-LD)",
        "description": "The same investigation as Schema.org entities and Activity Streams activities: the vehicle (keyed by VRM), each MOT test as an Inspection, each page naming the plate as a Mention, and VIN candidates and assessment statements as Findings. Header X-Canonical-Stats reports how each classification was decided.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON-LD document",
            "content": {
              "application/ld+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or refused API key (`code`: `sso_required` or `api_key_refused`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found, or the canonical view is switched off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-imsl-app": "anpr",
        "x-imsl-request-path": "/api/v1/investigations/{id}/canonical",
        "x-imsl-tag": [
          "Investigations"
        ],
        "servers": [
          {
            "url": "https://imsl.anpr.osint.place",
            "description": "ANPR base URL"
          }
        ],
        "security": [
          {
            "anpr_ApiKeyAuth": []
          }
        ]
      }
    },
    "/personinvestigator/health": {
      "get": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Health",
        "operationId": "personinvestigator_health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/health",
        "x-imsl-tag": [
          "Service"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/deep-search/profile": {
      "get": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Deep Search Profile",
        "description": "The collection agents and platforms a deep search runs, and the legal\nframeworks the caller acknowledges by starting one.",
        "operationId": "personinvestigator_deep_search_profile_deep_search_profile_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepSearchProfile"
                }
              }
            }
          }
        },
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/deep-search/profile",
        "x-imsl-tag": [
          "Deep search"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/searches": {
      "post": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Create Search",
        "description": "Create a search and run the OSINT Industries name search (one billed query).\n\nCandidates are clusters of accounts sharing the name; there is no match\nscore. Pass the chosen `candidate_id` to `/resolve`.",
        "operationId": "personinvestigator_create_search_searches_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/personinvestigator_SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/searches",
        "x-imsl-tag": [
          "Person search"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/searches/{search_id}/resolve": {
      "post": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Resolve Subject",
        "description": "Run OSINT Industries lookups on the given selectors, merge them with the\nchosen candidate, and persist the subject. Each selector value is billed.",
        "operationId": "personinvestigator_resolve_subject_searches__search_id__resolve_post",
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Search Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/searches/{search_id}/resolve",
        "x-imsl-tag": [
          "Person search"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/searches/{search_id}/deep-search": {
      "post": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Start Deep Search",
        "description": "Start deep collection on the resolved subject with the Law Enforcement ×\nPerson of Interest agents (see `/deep-search/profile`). Runs in the\nbackground; poll `GET /searches/{id}`.",
        "operationId": "personinvestigator_start_deep_search_searches__search_id__deep_search_post",
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Search Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeepSearchRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepSearchStarted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/searches/{search_id}/deep-search",
        "x-imsl-tag": [
          "Deep search"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/searches/{search_id}": {
      "get": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Get Search",
        "description": "Subject, the latest deep-search task, and entity counts by type.",
        "operationId": "personinvestigator_get_search_searches__search_id__get",
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Search Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchStatus"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/searches/{search_id}",
        "x-imsl-tag": [
          "Results"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/searches/{search_id}/entities": {
      "get": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "List Entities",
        "description": "Collected entities, highest confidence first.",
        "operationId": "personinvestigator_list_entities_searches__search_id__entities_get",
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Search Id"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Entity type, e.g. person, email, phone, address, url",
              "title": "Type"
            },
            "description": "Entity type, e.g. person, email, phone, address, url"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EntityOut"
                  },
                  "title": "Response List Entities Searches  Search Id  Entities Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/searches/{search_id}/entities",
        "x-imsl-tag": [
          "Results"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/search": {
      "post": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Search",
        "description": "Call 1. Send everything known about the person as one piece of text. The server assigns the values to fields\n(name, date of birth, email, phone, username, location, employer, ...), runs the OSINT Industries name search\n(one billed query, only when a name was found) and returns the candidate identities with a `reference_id`.\n\nThe assignment is rule-based and free; check `parsed_fields` and send `fields` to correct anything it read wrongly.",
        "operationId": "personinvestigator_search_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuerySearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuerySearchResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/search",
        "x-imsl-tag": [
          "Two-call flow"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    },
    "/personinvestigator/report": {
      "post": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Report",
        "description": "Call 2. Runs what the app runs once a profile is chosen: looks up the chosen profile and the other values from\n`/search`, runs the deep collection (Law Enforcement x Person of Interest, under the `authorisation` you record), then\ngenerates the report. A run takes several minutes. With `wait` true (default) the request is held until it finishes\nor `wait_timeout_seconds` passes (then 202, and the run carries on); with `wait` false it returns 202 at once. Poll\n`GET /report?reference_id=`. Posting again for the same reference joins the run or returns the finished report:\nit is never billed twice.",
        "operationId": "personinvestigator_report_report_post",
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            }
          },
          "202": {
            "description": "Still running: poll GET /report?reference_id=...",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "502": {
            "description": "The run failed; `error` says at which step.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/report",
        "x-imsl-tag": [
          "Two-call flow"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      },
      "get": {
        "tags": [
          "Person Investigator"
        ],
        "summary": "Report Status",
        "description": "Poll a run started by POST /report. 200 with the report when done, 202 while running, 502 when it failed.",
        "operationId": "personinvestigator_report_status_report_get",
        "security": [
          {
            "personinvestigator_ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "reference_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Reference Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            }
          },
          "202": {
            "description": "Still running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "502": {
            "description": "The run failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            }
          }
        },
        "x-imsl-app": "personinvestigator",
        "x-imsl-request-path": "/report",
        "x-imsl-tag": [
          "Two-call flow"
        ],
        "servers": [
          {
            "url": "https://imsl.personinvestigator.osint.place",
            "description": "Person Investigator base URL"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CompanyResult": {
        "properties": {
          "enName": {
            "type": "string",
            "title": "Enname",
            "default": ""
          },
          "cnName": {
            "type": "string",
            "title": "Cnname",
            "default": ""
          },
          "translitName": {
            "type": "string",
            "title": "Translitname",
            "default": ""
          },
          "uscc": {
            "type": "string",
            "title": "Uscc",
            "default": ""
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": ""
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sources",
            "description": "Catalogue keys of the models that returned this candidate."
          },
          "agreement": {
            "type": "integer",
            "title": "Agreement",
            "description": "How many models returned this candidate.",
            "default": 0
          },
          "reference_id": {
            "type": "string",
            "title": "Reference Id",
            "description": "The one id to use for the next call (`POST /api/investigate`), whatever the jurisdiction.",
            "default": ""
          },
          "jurisdiction": {
            "type": "string",
            "title": "Jurisdiction",
            "description": "The registry (jurisdiction code) this candidate was found under, e.g. `HK`.",
            "default": ""
          }
        },
        "type": "object",
        "title": "CompanyResult"
      },
      "ErrorResponse": {
        "properties": {
          "status": {
            "type": "integer",
            "title": "Status",
            "examples": [
              400
            ]
          },
          "error": {
            "type": "string",
            "title": "Error",
            "examples": [
              "`query` must not be empty."
            ]
          }
        },
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "ErrorResponse",
        "description": "Every 4xx/5xx from the search endpoints."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InvestigateParamsEcho": {
        "properties": {
          "phase": {
            "type": "string",
            "const": "investigate",
            "title": "Phase",
            "default": "investigate"
          },
          "cn_name": {
            "type": "string",
            "title": "Cn Name"
          },
          "en_name": {
            "type": "string",
            "title": "En Name"
          },
          "uscc": {
            "type": "string",
            "title": "Uscc",
            "default": ""
          },
          "objectives": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Objectives"
          },
          "risk_fields": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Risk Fields"
          },
          "deep_intel_buckets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Deep Intel Buckets"
          },
          "search_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Models",
            "description": "Raw, as sent. null → every panel model; [] → Gemini only."
          },
          "country": {
            "type": "string",
            "title": "Country",
            "description": "Raw, as sent — compare with jurisdiction.code.",
            "default": "CN"
          },
          "origin_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Run Id"
          }
        },
        "type": "object",
        "required": [
          "cn_name",
          "en_name"
        ],
        "title": "InvestigateParamsEcho",
        "description": "The phase-2 request, echoed verbatim."
      },
      "InvestigateRequest": {
        "properties": {
          "reference_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Id",
            "description": "**The easy way in.** The `reference_id` of a result from `GET /api/search` or `POST /api/search`, for example `HK:00257007`. Send it alone and the names, registry id, jurisdiction and `origin_run_id` are filled in from that search."
          },
          "cn_name": {
            "type": "string",
            "title": "Cn Name",
            "description": "The entity's name in the jurisdiction's own language. Required unless `reference_id` is sent.",
            "default": ""
          },
          "en_name": {
            "type": "string",
            "title": "En Name",
            "description": "The entity's English name.",
            "default": ""
          },
          "uscc": {
            "type": "string",
            "title": "Uscc",
            "description": "The national registry identifier (USCC, BRN, INN/OGRN, BIN, STIR…).",
            "default": ""
          },
          "website": {
            "type": "string",
            "title": "Website",
            "description": "The entity's own website or domain (e.g. tsmc.com). Optional: when left out it is looked up and verified once per run. Used for certificate-transparency and Wayback pivots.",
            "default": ""
          },
          "objectives": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Objectives"
          },
          "risk_fields": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Risk Fields"
          },
          "deep_intel_buckets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Deep Intel Buckets",
            "description": "Stable wire keys; their labels localise per jurisdiction."
          },
          "search_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "sonar",
                    "gpt5",
                    "grok",
                    "kimi",
                    "qwen",
                    "deepseek_or",
                    "mistral",
                    "mimo"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Models",
            "description": "OpenRouter model keys. null → every panel model; [] → Gemini only. Keys: `sonar` Sonar; `gpt5` GPT-5.4 Mini; `grok` Grok 4.6; `kimi` Kimi K3; `qwen` Qwen 3.8 Flash; `deepseek_or` DeepSeek V4 Flash; `mistral` Mistral Small 3; `mimo` MiMo V2.5."
          },
          "country": {
            "type": "string",
            "title": "Country",
            "description": "Jurisdiction code, one of: `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC).",
            "default": "CN",
            "enum": [
              "CN",
              "HK",
              "RU",
              "KZ",
              "UZ",
              "TM",
              "BY",
              "UA",
              "GE",
              "MD",
              "SC",
              "VG",
              "CY",
              "AE",
              "TW",
              "IR",
              "TR",
              "IN",
              "MH",
              "PA"
            ]
          },
          "origin_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Run Id",
            "description": "`manifest.run_id` from the phase-1 search this entity came from."
          },
          "strict_country": {
            "type": "boolean",
            "title": "Strict Country",
            "description": "Reject an unrecognised `country` with HTTP 422 instead of falling back to China.",
            "default": false
          }
        },
        "type": "object",
        "title": "InvestigateRequest",
        "description": "Phase 2 — fan six collection agents out over one entity.",
        "examples": [
          {
            "cn_name": "華潤創業有限公司",
            "country": "HK",
            "deep_intel_buckets": [
              "biddings",
              "recruitment",
              "ccp_ties",
              "military_ties"
            ],
            "en_name": "China Resources Enterprise, Limited",
            "objectives": [
              "ownership",
              "procurement"
            ],
            "origin_run_id": "cfs_41bb02e7a913",
            "risk_fields": [
              "sanctions"
            ],
            "search_models": [
              "sonar",
              "kimi"
            ],
            "uscc": "00000123"
          }
        ]
      },
      "Jurisdiction": {
        "type": "string",
        "enum": [
          "CN",
          "HK",
          "RU",
          "KZ",
          "UZ",
          "TM",
          "BY",
          "UA",
          "GE",
          "MD",
          "SC",
          "VG",
          "CY",
          "AE",
          "TW",
          "IR",
          "TR",
          "IN",
          "MH",
          "PA"
        ],
        "title": "Jurisdiction"
      },
      "JurisdictionManifest": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Jurisdiction code, e.g. \"HK\"."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "English name, e.g. \"Hong Kong\"."
          },
          "nameLocal": {
            "type": "string",
            "title": "Namelocal",
            "description": "Name in the jurisdiction's own script."
          },
          "flag": {
            "type": "string",
            "title": "Flag",
            "default": ""
          },
          "idLabel": {
            "type": "string",
            "title": "Idlabel",
            "description": "National registry identifier label, e.g. \"BRN\".",
            "default": ""
          },
          "idExample": {
            "type": "string",
            "title": "Idexample",
            "default": ""
          },
          "idCheck": {
            "type": "string",
            "title": "Idcheck",
            "description": "How strong the identifier check is: \"checksum\", \"format-only\" or \"none\".",
            "default": "none"
          },
          "politicalLabel": {
            "type": "string",
            "title": "Politicallabel",
            "description": "Local framing of the ccp_ties bucket.",
            "default": ""
          },
          "militaryLabel": {
            "type": "string",
            "title": "Militarylabel",
            "description": "Local framing of the military_ties bucket.",
            "default": ""
          },
          "collectionLanguage": {
            "type": "string",
            "title": "Collectionlanguage",
            "description": "The language collection actually queries in.",
            "default": ""
          },
          "officialDomains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Officialdomains"
          },
          "requestedCode": {
            "type": "string",
            "title": "Requestedcode",
            "description": "Verbatim what the caller sent."
          },
          "resolved": {
            "type": "boolean",
            "title": "Resolved",
            "description": "False when the requested code matched no profile and China was used."
          },
          "fallbackReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallbackreason"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "code",
          "name",
          "nameLocal",
          "requestedCode",
          "resolved"
        ],
        "title": "JurisdictionManifest",
        "description": "The resolved jurisdiction, plus how it was resolved.\n\n`resolved: false` is the important field: an unrecognised country code falls back\nto China, and without this the caller would be told \"China\" with no way to tell\nthat it was a fallback rather than their choice."
      },
      "ModelManifest": {
        "properties": {
          "transport": {
            "type": "string",
            "enum": [
              "vertex",
              "api_key",
              "none"
            ],
            "title": "Transport",
            "description": "How Gemini is authenticated. Mode only — never the GCP project id."
          },
          "requested": {
            "items": {
              "$ref": "#/components/schemas/ModelRef"
            },
            "type": "array",
            "title": "Requested"
          },
          "unknown_requested": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Unknown Requested",
            "description": "Model keys the caller sent that are not in the catalogue. Dropped, and named here."
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The step-B analysis model. Phase 2 only."
          },
          "ran": {
            "items": {
              "$ref": "#/components/schemas/ModelRun"
            },
            "type": "array",
            "title": "Ran"
          }
        },
        "type": "object",
        "required": [
          "transport"
        ],
        "title": "ModelManifest"
      },
      "ModelRef": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Catalogue key, e.g. \"sonar\"."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human label, e.g. \"Sonar\"."
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Provider slug, e.g. \"perplexity/sonar\"."
          },
          "provider": {
            "type": "string",
            "enum": [
              "openrouter",
              "google",
              "direct"
            ],
            "title": "Provider"
          },
          "grounded": {
            "type": "boolean",
            "title": "Grounded",
            "description": "True when this model searches the live web rather than answering from training data."
          },
          "role": {
            "type": "string",
            "enum": [
              "registry_search",
              "grounded_search",
              "panel_search",
              "analysis",
              "translate"
            ],
            "title": "Role"
          }
        },
        "type": "object",
        "required": [
          "id",
          "label",
          "model",
          "provider",
          "grounded",
          "role"
        ],
        "title": "ModelRef",
        "description": "One model in the catalogue. `id`/`label`/`model` match GET /api/search-models."
      },
      "ModelRun": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Catalogue key, e.g. \"sonar\"."
          },
          "label": {
            "type": "string",
            "title": "Label",
            "description": "Human label, e.g. \"Sonar\"."
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Provider slug, e.g. \"perplexity/sonar\"."
          },
          "provider": {
            "type": "string",
            "enum": [
              "openrouter",
              "google",
              "direct"
            ],
            "title": "Provider"
          },
          "grounded": {
            "type": "boolean",
            "title": "Grounded",
            "description": "True when this model searches the live web rather than answering from training data."
          },
          "role": {
            "type": "string",
            "enum": [
              "registry_search",
              "grounded_search",
              "panel_search",
              "analysis",
              "translate"
            ],
            "title": "Role"
          },
          "status": {
            "type": "string",
            "enum": [
              "ran",
              "failed",
              "timed_out",
              "unavailable"
            ],
            "title": "Status"
          },
          "calls": {
            "type": "integer",
            "title": "Calls",
            "default": 0
          },
          "calls_ok": {
            "type": "integer",
            "title": "Calls Ok",
            "default": 0
          },
          "calls_failed": {
            "type": "integer",
            "title": "Calls Failed",
            "default": 0
          },
          "tokens_in": {
            "type": "integer",
            "title": "Tokens In",
            "default": 0
          },
          "tokens_out": {
            "type": "integer",
            "title": "Tokens Out",
            "default": 0
          },
          "duration_ms": {
            "type": "number",
            "title": "Duration Ms",
            "default": 0
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "First error, with any API key redacted."
          }
        },
        "type": "object",
        "required": [
          "id",
          "label",
          "model",
          "provider",
          "grounded",
          "role",
          "status"
        ],
        "title": "ModelRun",
        "description": "A model the run actually attempted, counted from the collection trace.\n\nThis is derived from what happened, never from what was asked for — a model that\nwas requested but never reached (no key, HTTP error, panel deadline) appears here\nwith a non-\"ran\" status and an error, rather than silently vanishing."
      },
      "OriginManifest": {
        "properties": {
          "run_id": {
            "type": "string",
            "title": "Run Id"
          },
          "started_at": {
            "type": "string",
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "request": {
            "$ref": "#/components/schemas/SearchParams"
          },
          "jurisdiction": {
            "$ref": "#/components/schemas/JurisdictionManifest"
          },
          "models": {
            "$ref": "#/components/schemas/ModelManifest"
          },
          "result_count": {
            "type": "integer",
            "title": "Result Count",
            "default": 0
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice"
          }
        },
        "type": "object",
        "required": [
          "run_id",
          "started_at",
          "request",
          "jurisdiction",
          "models"
        ],
        "title": "OriginManifest",
        "description": "Phase 1's manifest, carried on phase 2 — \"everything from the search in the first\".\n\nFlattened rather than a recursive RunManifest: a self-referential schema renders as\nan opaque circular node in OpenAPI viewers and client generators, and a phase-2\nmanifest never needs an `origin.origin`."
      },
      "RunManifest": {
        "properties": {
          "manifest_version": {
            "type": "string",
            "const": "1",
            "title": "Manifest Version",
            "description": "Manifest schema version, independent of api_version.",
            "default": "1"
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "phase": {
            "type": "string",
            "enum": [
              "search",
              "investigate"
            ],
            "title": "Phase"
          },
          "run_id": {
            "type": "string",
            "title": "Run Id",
            "description": "Stable id for this run. \"cfs_\" = phase 1, \"cfi_\" = phase 2."
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id",
            "description": "Phase 2 only; equals run_id. The key for /api/trace and /api/screenshots."
          },
          "parent_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Run Id",
            "description": "Phase 1's run_id, when this run came from a search."
          },
          "started_at": {
            "type": "string",
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "Null until the run finishes."
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path",
            "description": "How the result was reached: \"grounded_llm\", \"grounded_llm+panel\", \"direct_registry\", \"validation_short_circuit\", \"agentic_fanout\"."
          },
          "scope": {
            "type": "string",
            "enum": [
              "jurisdiction",
              "worldwide"
            ],
            "title": "Scope",
            "description": "\"jurisdiction\" for a search of one registry; \"worldwide\" when this search was one leg of `/api/search/worldwide`.",
            "default": "jurisdiction"
          },
          "jurisdiction": {
            "$ref": "#/components/schemas/JurisdictionManifest"
          },
          "models": {
            "$ref": "#/components/schemas/ModelManifest"
          },
          "request": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SearchParams"
              },
              {
                "$ref": "#/components/schemas/InvestigateParamsEcho"
              }
            ],
            "title": "Request",
            "discriminator": {
              "propertyName": "phase",
              "mapping": {
                "investigate": "#/components/schemas/InvestigateParamsEcho",
                "search": "#/components/schemas/SearchParams"
              }
            }
          },
          "origin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OriginManifest"
              },
              {
                "type": "null"
              }
            ]
          },
          "tradecraft_source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "service",
                  "pinned"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tradecraft Source",
            "description": "Where the collection tradecraft (analyst personas, state-ties vocabulary, source packs, instruction prose) came from. `service` = the IMSL knowledge service; `pinned` = the snapshot committed with the app, used whenever the service could not be reached or answered with a refusal. Collection never stops for an outage."
          },
          "tradecraft": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tradecraft",
            "description": "The tradecraft provenance: knowledge set, the document ids and content hashes read, any drift from the pinned snapshot, and why the pinned one was used."
          },
          "notes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Notes",
            "description": "Human-readable notes about anything that did not go as asked."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "api_version",
          "phase",
          "run_id",
          "started_at",
          "jurisdiction",
          "models",
          "request"
        ],
        "title": "RunManifest",
        "description": "The provenance record echoed by both search phases.",
        "examples": [
          {
            "api_version": "2.1.0",
            "completed_at": "2026-09-17T09:12:04Z",
            "jurisdiction": {
              "code": "HK",
              "flag": "🇭🇰",
              "idLabel": "BRN",
              "name": "Hong Kong",
              "nameLocal": "香港",
              "requestedCode": "HK",
              "resolved": true
            },
            "manifest_version": "1",
            "models": {
              "ran": [
                {
                  "calls": 1,
                  "calls_ok": 1,
                  "grounded": true,
                  "id": "gemini",
                  "label": "Gemini 3.5 Flash Lite",
                  "model": "google/gemini-3.5-flash-lite",
                  "provider": "google",
                  "role": "registry_search",
                  "status": "ran"
                }
              ],
              "requested": [
                {
                  "grounded": true,
                  "id": "gemini",
                  "label": "Gemini 3.5 Flash Lite",
                  "model": "google/gemini-3.5-flash-lite",
                  "provider": "google",
                  "role": "registry_search"
                }
              ],
              "transport": "vertex"
            },
            "notes": [],
            "path": "grounded_llm",
            "phase": "search",
            "request": {
              "country": "HK",
              "phase": "search",
              "query": "China Resources"
            },
            "run_id": "cfs_41bb02e7a913",
            "started_at": "2026-09-17T09:11:55Z"
          }
        ]
      },
      "SearchParams": {
        "properties": {
          "phase": {
            "type": "string",
            "const": "search",
            "title": "Phase",
            "default": "search"
          },
          "query": {
            "type": "string",
            "title": "Query"
          },
          "country": {
            "type": "string",
            "title": "Country",
            "description": "Raw, as sent — compare with jurisdiction.code."
          },
          "search_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Models"
          }
        },
        "type": "object",
        "required": [
          "query",
          "country"
        ],
        "title": "SearchParams",
        "description": "The phase-1 request, echoed verbatim."
      },
      "SearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query",
            "description": "A company name, or the jurisdiction's national registry identifier."
          },
          "country": {
            "type": "string",
            "title": "Country",
            "description": "Jurisdiction code, one of: `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC).",
            "default": "CN",
            "enum": [
              "CN",
              "HK",
              "RU",
              "KZ",
              "UZ",
              "TM",
              "BY",
              "UA",
              "GE",
              "MD",
              "SC",
              "VG",
              "CY",
              "AE",
              "TW",
              "IR",
              "TR",
              "IN",
              "MH",
              "PA"
            ]
          },
          "search_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "sonar",
                    "gpt5",
                    "grok",
                    "kimi",
                    "qwen",
                    "deepseek_or",
                    "mistral",
                    "mimo"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Models",
            "description": "Extra models to run alongside Gemini. Omit or null for Gemini only. Candidates are merged and de-duplicated by registry identifier. Keys: `sonar` Sonar; `gpt5` GPT-5.4 Mini; `grok` Grok 4.6; `kimi` Kimi K3; `qwen` Qwen 3.8 Flash; `deepseek_or` DeepSeek V4 Flash; `mistral` Mistral Small 3; `mimo` MiMo V2.5."
          },
          "strict_country": {
            "type": "boolean",
            "title": "Strict Country",
            "description": "Reject an unrecognised `country` with HTTP 422 instead of falling back to China.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "SearchRequest",
        "description": "Phase 1 — resolve a name or a national registry id to candidate entities.",
        "examples": [
          {
            "country": "HK",
            "query": "China Resources",
            "search_models": [
              "sonar",
              "kimi"
            ]
          }
        ]
      },
      "SearchResponse": {
        "properties": {
          "companies": {
            "items": {
              "$ref": "#/components/schemas/CompanyResult"
            },
            "type": "array",
            "title": "Companies"
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice"
          },
          "manifest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunManifest"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "companies"
        ],
        "title": "SearchResponse"
      },
      "SimpleCompany": {
        "properties": {
          "reference_id": {
            "type": "string",
            "title": "Reference Id",
            "description": "**Use this one.** The single id for this entity in every later call, whatever the jurisdiction: `<jurisdiction>:<registry id>` (e.g. `CN:914403001922038216`, `HK:00257007`). When the registry id is unknown it is `<jurisdiction>:name:<hash>`.",
            "examples": [
              "HK:00257007"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "English name.",
            "examples": [
              "China Resources (Holdings) Company Limited"
            ]
          },
          "local_name": {
            "type": "string",
            "title": "Local Name",
            "description": "Name in the jurisdiction's own language and script.",
            "examples": [
              "華潤(集團)有限公司"
            ]
          },
          "transliterated_name": {
            "type": "string",
            "title": "Transliterated Name",
            "description": "Romanised form of `local_name`, when the model gave one.",
            "default": ""
          },
          "registry_id": {
            "type": "string",
            "title": "Registry Id",
            "description": "The national registry identifier, as issued. Empty when not found.",
            "examples": [
              "00257007"
            ]
          },
          "registry_id_type": {
            "type": "string",
            "title": "Registry Id Type",
            "description": "What `registry_id` is in this jurisdiction (USCC, BRN, INN/OGRN, BIN…).",
            "examples": [
              "BRN"
            ]
          },
          "jurisdiction": {
            "type": "string",
            "title": "Jurisdiction",
            "description": "Jurisdiction code.",
            "examples": [
              "HK"
            ]
          },
          "entity_type": {
            "type": "string",
            "title": "Entity Type",
            "description": "Legal form, as reported.",
            "default": ""
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "One line on what the entity is.",
            "default": ""
          },
          "agreement": {
            "type": "integer",
            "title": "Agreement",
            "description": "How many models returned this result (1 = Gemini alone).",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "reference_id",
          "name",
          "local_name",
          "registry_id",
          "registry_id_type",
          "jurisdiction"
        ],
        "title": "SimpleCompany",
        "description": "One search result, flattened. `reference_id` is the only id a caller needs to keep."
      },
      "SimpleSearchResponse": {
        "properties": {
          "status": {
            "type": "integer",
            "title": "Status",
            "description": "200 when the search ran (even with no results).",
            "examples": [
              200
            ]
          },
          "query": {
            "type": "string",
            "title": "Query",
            "description": "The search term, echoed."
          },
          "jurisdiction": {
            "type": "string",
            "title": "Jurisdiction",
            "description": "The jurisdiction that was searched."
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of results."
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SimpleCompany"
            },
            "type": "array",
            "title": "Results"
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice",
            "description": "An analyst-facing note about the search, if any."
          },
          "run_id": {
            "type": "string",
            "title": "Run Id",
            "description": "This search's run id. Not needed for the next call: `reference_id` carries it."
          }
        },
        "type": "object",
        "required": [
          "status",
          "query",
          "jurisdiction",
          "count",
          "results",
          "run_id"
        ],
        "title": "SimpleSearchResponse",
        "description": "What `GET /api/search` returns."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WorldwideJurisdictionResult": {
        "properties": {
          "country": {
            "type": "string",
            "title": "Country",
            "description": "Jurisdiction code.",
            "examples": [
              "HK"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "English name of the jurisdiction.",
            "examples": [
              "Hong Kong"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "empty",
              "failed"
            ],
            "title": "Status",
            "description": "`matched`: at least one candidate. `empty`: searched, nothing found. `failed`: this jurisdiction could not be searched; the others are unaffected."
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of candidates."
          },
          "companies": {
            "items": {
              "$ref": "#/components/schemas/CompanyResult"
            },
            "type": "array",
            "title": "Companies"
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice",
            "description": "That jurisdiction's analyst-facing note, if any."
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Short reason, when `status` is `failed`."
          },
          "manifest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunManifest"
              },
              {
                "type": "null"
              }
            ],
            "description": "That jurisdiction's own search manifest (`scope` is `worldwide`)."
          }
        },
        "type": "object",
        "required": [
          "country",
          "name",
          "status",
          "count"
        ],
        "title": "WorldwideJurisdictionResult",
        "description": "What one jurisdiction's search returned inside a worldwide run."
      },
      "WorldwideManifest": {
        "properties": {
          "manifest_version": {
            "type": "string",
            "const": "1",
            "title": "Manifest Version",
            "default": "1"
          },
          "api_version": {
            "type": "string",
            "title": "Api Version"
          },
          "phase": {
            "type": "string",
            "const": "search",
            "title": "Phase",
            "default": "search"
          },
          "scope": {
            "type": "string",
            "const": "worldwide",
            "title": "Scope",
            "default": "worldwide"
          },
          "run_id": {
            "type": "string",
            "title": "Run Id",
            "description": "Stable id for the worldwide run (\"cfw_\"). Each jurisdiction also has its own `cfs_` run id."
          },
          "started_at": {
            "type": "string",
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "jurisdictions_requested": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Jurisdictions Requested",
            "description": "Codes asked for (every registered code when none were chosen)."
          },
          "jurisdictions_ran": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Jurisdictions Ran",
            "description": "Codes whose search completed (matched or empty)."
          },
          "jurisdictions_failed": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Jurisdictions Failed",
            "description": "Codes whose search failed."
          },
          "models_ran": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models Ran",
            "description": "Catalogue keys of the models that ran in at least one jurisdiction (always Gemini only: `[\"gemini\"]`)."
          },
          "concurrency": {
            "type": "integer",
            "title": "Concurrency",
            "description": "How many jurisdictions ran at a time."
          },
          "run_ids": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Run Ids",
            "description": "Jurisdiction code to that jurisdiction's search run id."
          },
          "request": {
            "additionalProperties": true,
            "type": "object",
            "title": "Request",
            "description": "The request, echoed."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "api_version",
          "run_id",
          "started_at",
          "jurisdictions_requested",
          "jurisdictions_ran",
          "concurrency"
        ],
        "title": "WorldwideManifest",
        "description": "The run record for the whole fan-out."
      },
      "WorldwideRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 300,
            "minLength": 1,
            "title": "Query",
            "description": "A company name (any language or script) or a national registry number."
          },
          "jurisdictions": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "CN",
                    "HK",
                    "RU",
                    "KZ",
                    "UZ",
                    "TM",
                    "BY",
                    "UA",
                    "GE",
                    "MD",
                    "SC",
                    "VG",
                    "CY",
                    "AE",
                    "TW",
                    "IR",
                    "TR",
                    "IN",
                    "MH",
                    "PA"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdictions",
            "description": "Which registries to search. Omit, send null or send `[]` for every registered jurisdiction. Unknown codes are a 422 that lists the valid ones. Codes: `CN` China (USCC); `HK` Hong Kong (BRN); `RU` Russia (INN/OGRN); `KZ` Kazakhstan (BIN); `UZ` Uzbekistan (STIR); `TM` Turkmenistan (Tax ID); `BY` Belarus (UNP); `UA` Ukraine (EDRPOU); `GE` Georgia (ID code); `MD` Moldova (IDNO); `SC` Seychelles (Company No.); `VG` British Virgin Islands (Company No.); `CY` Cyprus (HE No.); `AE` United Arab Emirates (Licence No.); `TW` Taiwan (UBN); `IR` Iran (National ID); `TR` Turkey (VKN); `IN` India (CIN); `MH` Marshall Islands (Registration No.); `PA` Panama (RUC)."
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "WorldwideRequest",
        "description": "Worldwide search: phase 1 run once per registered jurisdiction, Gemini only.",
        "examples": [
          {
            "jurisdictions": [
              "HK",
              "CN"
            ],
            "query": "China Resources"
          }
        ]
      },
      "WorldwideResponse": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "scope": {
            "type": "string",
            "const": "worldwide",
            "title": "Scope",
            "default": "worldwide"
          },
          "jurisdictions": {
            "items": {
              "$ref": "#/components/schemas/WorldwideJurisdictionResult"
            },
            "type": "array",
            "title": "Jurisdictions"
          },
          "matched": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Matched",
            "description": "Codes of the jurisdictions that returned at least one candidate."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Candidates across all jurisdictions."
          },
          "manifest": {
            "$ref": "#/components/schemas/WorldwideManifest"
          }
        },
        "type": "object",
        "required": [
          "query",
          "jurisdictions",
          "matched",
          "total",
          "manifest"
        ],
        "title": "WorldwideResponse",
        "description": "What `POST /api/search/worldwide` returns."
      },
      "WorldwideSimpleResponse": {
        "properties": {
          "status": {
            "type": "integer",
            "title": "Status",
            "examples": [
              200
            ]
          },
          "query": {
            "type": "string",
            "title": "Query"
          },
          "scope": {
            "type": "string",
            "const": "worldwide",
            "title": "Scope",
            "default": "worldwide"
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of results across all jurisdictions."
          },
          "matched": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Matched",
            "description": "Codes of the jurisdictions that returned at least one candidate."
          },
          "failed": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Failed",
            "description": "Codes that could not be searched (their rows are missing, not empty)."
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SimpleCompany"
            },
            "type": "array",
            "title": "Results",
            "description": "Every candidate; each row carries its `jurisdiction`."
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice"
          },
          "run_id": {
            "type": "string",
            "title": "Run Id",
            "description": "The worldwide run id."
          }
        },
        "type": "object",
        "required": [
          "status",
          "query",
          "count",
          "matched",
          "results",
          "run_id"
        ],
        "title": "WorldwideSimpleResponse",
        "description": "What `GET /api/search/worldwide` returns: the flat shape of `GET /api/search`."
      },
      "CancelMany": {
        "properties": {
          "run_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "minItems": 1,
            "title": "Run Ids"
          }
        },
        "type": "object",
        "required": [
          "run_ids"
        ],
        "title": "CancelMany"
      },
      "PlanRequest": {
        "properties": {
          "request": {
            "type": "string",
            "maxLength": 1200,
            "minLength": 1,
            "title": "Request"
          },
          "history": {
            "items": {
              "$ref": "#/components/schemas/PlanTurn"
            },
            "type": "array",
            "maxItems": 6,
            "title": "History"
          }
        },
        "type": "object",
        "required": [
          "request"
        ],
        "title": "PlanRequest"
      },
      "PlanTurn": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant"
            ],
            "title": "Role"
          },
          "text": {
            "type": "string",
            "maxLength": 1200,
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "role",
          "text"
        ],
        "title": "PlanTurn"
      },
      "PruneRequest": {
        "properties": {
          "confirm": {
            "type": "boolean",
            "title": "Confirm",
            "default": false
          },
          "older_than_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Older Than Days"
          }
        },
        "type": "object",
        "title": "PruneRequest"
      },
      "RunItem": {
        "properties": {
          "scraper_id": {
            "type": "string",
            "title": "Scraper Id",
            "description": "A scraper id from the list, e.g. \"gdacs\", \"apify:owner/name\" or \"rapidapi:api/endpoint\""
          },
          "params": {
            "additionalProperties": true,
            "type": "object",
            "title": "Params",
            "description": "The scraper's input parameters"
          }
        },
        "type": "object",
        "required": [
          "scraper_id"
        ],
        "title": "RunItem"
      },
      "RunMany": {
        "properties": {
          "runs": {
            "items": {
              "$ref": "#/components/schemas/RunItem"
            },
            "type": "array",
            "maxItems": 20,
            "minItems": 1,
            "title": "Runs"
          }
        },
        "type": "object",
        "required": [
          "runs"
        ],
        "title": "RunMany"
      },
      "StartRun": {
        "properties": {
          "scraper_id": {
            "type": "string",
            "title": "Scraper Id"
          },
          "params": {
            "additionalProperties": true,
            "type": "object",
            "title": "Params"
          }
        },
        "type": "object",
        "required": [
          "scraper_id"
        ],
        "title": "StartRun"
      },
      "Body_mine_api_v1_searches_get": {
        "properties": {
          "tool": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool"
          },
          "status": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "title": "Body_mine_api_v1_searches_get"
      },
      "SearchIn": {
        "properties": {
          "tool": {
            "type": "string",
            "title": "Tool",
            "description": "Which tool to run: maigret or sherlock.",
            "examples": [
              "sherlock"
            ]
          },
          "username": {
            "type": "string",
            "title": "Username",
            "description": "The username to look for: letters, digits, dot, underscore or hyphen, up to 64.",
            "examples": [
              "johndoe"
            ]
          },
          "timeout": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout",
            "description": "Seconds to wait for each site, 3 to 60 (default 10)."
          },
          "top_sites": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Sites",
            "description": "Maigret only: how many popular sites to check, 1 to 3000 (default 500)."
          },
          "sites": {
            "title": "Sites",
            "description": "Sherlock only: site names to limit the search to, as a JSON array or a comma list."
          }
        },
        "type": "object",
        "required": [
          "tool",
          "username"
        ],
        "title": "SearchIn"
      },
      "github_ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "AccessChange": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "public",
                  "internal",
                  "restricted",
                  "client"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "owner": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "imsl",
                  "osint-place"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner"
          },
          "clients": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clients"
          },
          "reviewed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed"
          }
        },
        "type": "object",
        "title": "AccessChange"
      },
      "AskIn": {
        "properties": {
          "projection": {
            "type": "string",
            "title": "Projection"
          },
          "rev": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Rev"
          },
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 3,
            "title": "Question"
          },
          "subject": {
            "additionalProperties": true,
            "type": "object",
            "title": "Subject"
          },
          "set_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Set Id"
          },
          "question_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Question Id"
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields"
          },
          "expect": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expect"
          },
          "samples": {
            "type": "integer",
            "maximum": 5,
            "minimum": 1,
            "title": "Samples",
            "default": 3
          },
          "k": {
            "type": "integer",
            "maximum": 20,
            "minimum": 0,
            "title": "K",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "projection",
          "question",
          "subject"
        ],
        "title": "AskIn"
      },
      "Body_upload_api_v1_documents_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          },
          "kind": {
            "type": "string",
            "title": "Kind",
            "default": "reference"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "label": {
            "type": "string",
            "title": "Label",
            "default": "internal"
          },
          "owner": {
            "type": "string",
            "title": "Owner",
            "default": "imsl"
          },
          "clients": {
            "type": "string",
            "title": "Clients",
            "description": "comma separated client ids",
            "default": ""
          },
          "tags": {
            "type": "string",
            "title": "Tags",
            "description": "comma separated tags",
            "default": ""
          },
          "replaces": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replaces",
            "description": "id of the document this upload is a newer version of"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_api_v1_documents_post"
      },
      "BulkReviewIn": {
        "properties": {
          "ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array",
                "maxItems": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Ids"
          },
          "all_pending": {
            "type": "boolean",
            "title": "All Pending",
            "default": false
          },
          "since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Since"
          },
          "status": {
            "type": "string",
            "enum": [
              "reviewed",
              "dismissed"
            ],
            "title": "Status",
            "default": "reviewed"
          },
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "title": "BulkReviewIn"
      },
      "CommentEditIn": {
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Body"
          }
        },
        "type": "object",
        "required": [
          "body"
        ],
        "title": "CommentEditIn"
      },
      "CommentIn": {
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Body"
          },
          "chunk_ord": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Ord"
          }
        },
        "type": "object",
        "required": [
          "body"
        ],
        "title": "CommentIn"
      },
      "DocumentEdit": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction"
          }
        },
        "type": "object",
        "title": "DocumentEdit"
      },
      "KnowledgeRequestIn": {
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "update",
              "new"
            ],
            "title": "Kind",
            "default": "update"
          },
          "target": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 600,
                "minLength": 8,
                "pattern": "^https?://\\S+$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          },
          "name": {
            "type": "string",
            "maxLength": 300,
            "title": "Name",
            "default": ""
          },
          "type": {
            "type": "string",
            "maxLength": 60,
            "title": "Type",
            "default": "Thing"
          },
          "title": {
            "type": "string",
            "maxLength": 300,
            "title": "Title",
            "default": ""
          },
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "title": "KnowledgeRequestIn",
        "description": "`update` brings a node up to date (target required); `new` asks for knowledge not held yet (title required; target, when\ngiven, is what it would sit beside, such as a knowledge set)."
      },
      "LegalLoadedIn": {
        "properties": {
          "acts": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Acts"
          },
          "note": {
            "type": "string",
            "maxLength": 500,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "title": "LegalLoadedIn"
      },
      "NodeCommentIn": {
        "properties": {
          "target": {
            "type": "string",
            "maxLength": 600,
            "minLength": 8,
            "pattern": "^https?://\\S+$",
            "title": "Target"
          },
          "name": {
            "type": "string",
            "maxLength": 300,
            "title": "Name",
            "default": ""
          },
          "type": {
            "type": "string",
            "maxLength": 60,
            "title": "Type",
            "default": "Thing"
          },
          "body": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Body"
          }
        },
        "type": "object",
        "required": [
          "target",
          "body"
        ],
        "title": "NodeCommentIn"
      },
      "ProjectionIn": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title"
          },
          "summary": {
            "type": "string",
            "maxLength": 2000,
            "title": "Summary",
            "default": ""
          },
          "frameworks": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Frameworks"
          },
          "bundle": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Bundle"
          },
          "changes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Changes"
          },
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "ProjectionIn"
      },
      "QuestionIn": {
        "properties": {
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "subject": {
            "additionalProperties": true,
            "type": "object",
            "title": "Subject"
          },
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 3,
            "title": "Question"
          },
          "expect": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expect"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": "manual"
          }
        },
        "type": "object",
        "required": [
          "kind",
          "subject",
          "question"
        ],
        "title": "QuestionIn"
      },
      "QuestionPatch": {
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "subject": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "question": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Question"
          },
          "expect": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expect"
          }
        },
        "type": "object",
        "title": "QuestionPatch"
      },
      "RefreshIn": {
        "properties": {
          "persona": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Persona"
          },
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "persona"
        ],
        "title": "RefreshIn"
      },
      "ReviewIn": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "reviewed",
              "dismissed"
            ],
            "title": "Status",
            "default": "reviewed"
          },
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "title": "ReviewIn"
      },
      "RevisionIn": {
        "properties": {
          "changes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Changes"
          },
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          },
          "bundle": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bundle"
          }
        },
        "type": "object",
        "required": [
          "changes"
        ],
        "title": "RevisionIn"
      },
      "SaveQuestionIn": {
        "properties": {
          "set_id": {
            "type": "string",
            "title": "Set Id"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "expect": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expect"
          }
        },
        "type": "object",
        "required": [
          "set_id",
          "kind"
        ],
        "title": "SaveQuestionIn"
      },
      "SchemaPrepare": {
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "csv",
              "json"
            ],
            "title": "Format"
          },
          "data": {
            "type": "string",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "format",
          "data"
        ],
        "title": "SchemaPrepare"
      },
      "SchemaTest": {
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "csv",
              "json"
            ],
            "title": "Format"
          },
          "data": {
            "type": "string",
            "title": "Data"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "classify": {
            "type": "boolean",
            "title": "Classify",
            "default": false
          },
          "mode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "entities",
                  "activities"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          }
        },
        "type": "object",
        "required": [
          "format",
          "data"
        ],
        "title": "SchemaTest"
      },
      "SetIn": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title"
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "title": "Description",
            "default": ""
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields"
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "SetIn"
      },
      "UpdateRequestIn": {
        "properties": {
          "note": {
            "type": "string",
            "maxLength": 1000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "title": "UpdateRequestIn"
      },
      "UrlRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 8,
            "title": "Url"
          },
          "kind": {
            "type": "string",
            "title": "Kind",
            "default": "reference"
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "label": {
            "type": "string",
            "enum": [
              "public",
              "internal",
              "restricted",
              "client"
            ],
            "title": "Label",
            "default": "internal"
          },
          "owner": {
            "type": "string",
            "enum": [
              "imsl",
              "osint-place"
            ],
            "title": "Owner",
            "default": "imsl"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags",
            "default": []
          },
          "replaces": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replaces"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "UrlRequest"
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "Investigation": {
        "type": "object",
        "description": "The stored investigation. Every finding carries its source URL, retrieval time, SHA-256 of the page and how the plate matched.",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "complete",
              "error"
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Non-fatal section errors"
          },
          "plate": {
            "type": "string",
            "example": "AB12 CDE"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "context": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string"
              },
              "reference": {
                "type": "string"
              },
              "vin": {
                "type": "string"
              }
            }
          },
          "vehicle": {
            "type": "object",
            "description": "Characteristics and plate decode",
            "properties": {
              "make": {
                "type": "string"
              },
              "model": {
                "type": "string"
              },
              "colour": {
                "type": "string"
              },
              "fuelType": {
                "type": "string"
              },
              "engineSizeCc": {
                "type": "integer"
              },
              "firstUsedDate": {
                "type": "string"
              },
              "motStatus": {
                "type": "string",
                "enum": [
                  "valid",
                  "expired",
                  "none",
                  "unknown"
                ]
              },
              "motExpiry": {
                "type": "string"
              },
              "source": {
                "type": "string",
                "description": "Where the characteristics came from (mot_api, checker_site, decode_only …)"
              },
              "decode": {
                "type": "object",
                "description": "DVLA INF104 decode: format, region, office, registration period"
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string"
                    }
                  }
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "mot": {
            "type": "object",
            "description": "tests (date, result, mileage, defects), anomalies, plateHistory, latestMiles"
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "section": {
                  "type": "string",
                  "enum": [
                    "adverts",
                    "forums",
                    "social",
                    "records",
                    "damage",
                    "vin",
                    "photos"
                  ]
                },
                "kind": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "domain": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "date": {
                  "type": "string"
                },
                "location": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "mileage": {
                  "type": "string"
                },
                "plateMatch": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "variant",
                    "vin",
                    "not_confirmed"
                  ]
                },
                "relevance": {
                  "type": "integer"
                },
                "excerpt": {
                  "type": "string"
                },
                "capture": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "retrievedAt": {
                      "type": "string"
                    },
                    "sha256": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "vins": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "VIN candidates with status and checks"
            }
          },
          "assessment": {
            "type": "object",
            "description": "summary, keyPoints, timeline, locations, ownership, risks, gaps"
          },
          "sections": {
            "type": "object",
            "description": "Per-section state: status (done, nil, error), count, durationMs"
          },
          "searches": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Every search run: the databases researched and negative results"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              }
            }
          }
        }
      },
      "Authorisation": {
        "properties": {
          "legal_basis": {
            "type": "string",
            "minLength": 1,
            "title": "Legal Basis",
            "examples": [
              "RIPA 2000 s.28 directed surveillance"
            ]
          },
          "authorised_by": {
            "type": "string",
            "minLength": 1,
            "title": "Authorised By",
            "examples": [
              "DI A. Officer"
            ]
          },
          "authorisation_reference": {
            "type": "string",
            "minLength": 1,
            "title": "Authorisation Reference",
            "examples": [
              "OP-2026-0142"
            ]
          },
          "objective": {
            "type": "string",
            "title": "Objective",
            "default": ""
          },
          "scope_exclusions": {
            "type": "string",
            "title": "Scope Exclusions",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "legal_basis",
          "authorised_by",
          "authorisation_reference"
        ],
        "title": "Authorisation",
        "description": "Law-enforcement collection needs a recorded authorisation (RIPA / IPA /\nCPIA). It is stored on the investigation and shown in its report header."
      },
      "CandidateSummary": {
        "properties": {
          "candidate_id": {
            "type": "string",
            "title": "Candidate Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "name_variants": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Name Variants",
            "default": []
          },
          "usernames": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Usernames",
            "default": []
          },
          "emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Emails",
            "default": []
          },
          "phones": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Phones",
            "default": []
          },
          "locations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Locations",
            "default": []
          },
          "platforms": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Platforms",
            "default": []
          },
          "accounts_count": {
            "type": "integer",
            "title": "Accounts Count",
            "default": 0
          },
          "input_overlap": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Input Overlap",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "candidate_id",
          "display_name"
        ],
        "title": "CandidateSummary"
      },
      "DeepSearchProfile": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role"
          },
          "mission": {
            "type": "string",
            "title": "Mission"
          },
          "agents": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Agents"
          },
          "platforms": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "object",
            "title": "Platforms"
          },
          "legal_frameworks": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Legal Frameworks"
          }
        },
        "type": "object",
        "required": [
          "role",
          "mission",
          "agents",
          "platforms",
          "legal_frameworks"
        ],
        "title": "DeepSearchProfile"
      },
      "DeepSearchRequest": {
        "properties": {
          "authorisation": {
            "$ref": "#/components/schemas/Authorisation"
          },
          "acknowledge_legal_framework": {
            "type": "boolean",
            "title": "Acknowledge Legal Framework",
            "description": "Must be true: confirms the caller has read the frameworks listed at GET /deep-search/profile."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "authorisation",
          "acknowledge_legal_framework"
        ],
        "title": "DeepSearchRequest"
      },
      "DeepSearchStarted": {
        "properties": {
          "search_id": {
            "type": "string",
            "format": "uuid",
            "title": "Search Id"
          },
          "task_id": {
            "type": "string",
            "format": "uuid",
            "title": "Task Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "mission": {
            "type": "string",
            "title": "Mission"
          },
          "agents": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Agents"
          }
        },
        "type": "object",
        "required": [
          "search_id",
          "task_id",
          "status",
          "role",
          "mission",
          "agents"
        ],
        "title": "DeepSearchStarted"
      },
      "EntityOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "candidate"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          },
          "collected_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collected At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "type",
          "label",
          "confidence",
          "source",
          "source_url",
          "collected_at"
        ],
        "title": "EntityOut"
      },
      "FieldOverrides": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "dob": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dob",
            "description": "YYYY, YYYY-MM or YYYY-MM-DD"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username"
          },
          "emails": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Emails"
          },
          "phones": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phones"
          },
          "usernames": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usernames"
          },
          "domains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Domains"
          },
          "ips": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ips"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "ISO 3166-1 alpha-2, e.g. GB"
          },
          "current_town": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Town"
          },
          "age": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age"
          },
          "age_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age Range",
            "examples": [
              "30-40"
            ]
          },
          "employer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Employer"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "FieldOverrides",
        "description": "Structured values that replace what the server read from `query`. Lists replace the parsed list."
      },
      "ProfileCandidate": {
        "properties": {
          "candidate_id": {
            "type": "string",
            "title": "Candidate Id"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "name_variants": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Name Variants",
            "default": []
          },
          "usernames": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Usernames",
            "default": []
          },
          "emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Emails",
            "default": []
          },
          "phones": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Phones",
            "default": []
          },
          "locations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Locations",
            "default": []
          },
          "platforms": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Platforms",
            "default": []
          },
          "accounts_count": {
            "type": "integer",
            "title": "Accounts Count",
            "default": 0
          },
          "input_overlap": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Input Overlap",
            "default": []
          },
          "profile_id": {
            "type": "string",
            "title": "Profile Id"
          }
        },
        "type": "object",
        "required": [
          "candidate_id",
          "display_name",
          "profile_id"
        ],
        "title": "ProfileCandidate",
        "description": "One candidate identity. `profile_id` is what POST /report takes."
      },
      "QuerySearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Query",
            "description": "Everything known about the person, as free text. The server assigns each value to a field.",
            "examples": [
              "Jane Example, born 12/03/1985, jane@example.com, +44 7700 900123, @janex, lives in Leeds UK, works at Acme Ltd"
            ]
          },
          "fields": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FieldOverrides"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional structured overrides of the parsed values."
          },
          "search_mode": {
            "type": "string",
            "enum": [
              "exact",
              "loose"
            ],
            "title": "Search Mode",
            "default": "exact"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query"
        ],
        "title": "QuerySearchRequest"
      },
      "QuerySearchResult": {
        "properties": {
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "title": "Reference Id"
          },
          "parsed_fields": {
            "additionalProperties": true,
            "type": "object",
            "title": "Parsed Fields"
          },
          "searched": {
            "type": "boolean",
            "title": "Searched",
            "description": "False when no name was found: nothing was searched and there are no candidates."
          },
          "candidates_count": {
            "type": "integer",
            "title": "Candidates Count"
          },
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/ProfileCandidate"
            },
            "type": "array",
            "title": "Candidates"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "reference_id",
          "parsed_fields",
          "searched",
          "candidates_count",
          "candidates"
        ],
        "title": "QuerySearchResult"
      },
      "ReportDocument": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "template": {
            "type": "string",
            "title": "Template"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          },
          "content": {
            "additionalProperties": true,
            "type": "object",
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "id",
          "template",
          "title",
          "generated_at",
          "content"
        ],
        "title": "ReportDocument"
      },
      "ReportRequest": {
        "properties": {
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "title": "Reference Id"
          },
          "profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Id",
            "description": "A `profile_id` from POST /search."
          },
          "profile": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile",
            "description": "Alternative to profile_id: a candidate object ({candidate_id, display_name, records})."
          },
          "authorisation": {
            "$ref": "#/components/schemas/Authorisation"
          },
          "acknowledge_legal_framework": {
            "type": "boolean",
            "title": "Acknowledge Legal Framework",
            "description": "Must be true: confirms the caller has read the frameworks listed at GET /deep-search/profile."
          },
          "template": {
            "type": "string",
            "title": "Template",
            "description": "Report template id.",
            "default": "uk_law_enforcement"
          },
          "depth": {
            "type": "string",
            "enum": [
              "full",
              "high_level"
            ],
            "title": "Depth",
            "default": "full"
          },
          "wait": {
            "type": "boolean",
            "title": "Wait",
            "description": "True: hold the request until the report is done (or wait_timeout_seconds). False: return 202 at once and poll GET /report.",
            "default": true
          },
          "wait_timeout_seconds": {
            "type": "integer",
            "maximum": 1800,
            "minimum": 1,
            "title": "Wait Timeout Seconds",
            "default": 600
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reference_id",
          "authorisation",
          "acknowledge_legal_framework"
        ],
        "title": "ReportRequest"
      },
      "ReportResult": {
        "properties": {
          "reference_id": {
            "type": "string",
            "format": "uuid",
            "title": "Reference Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "resolving",
              "collecting",
              "reporting",
              "completed",
              "failed"
            ],
            "title": "Status"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "subject_entity_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Entity Id"
          },
          "entity_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entity Count"
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportDocument"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "reference_id",
          "status"
        ],
        "title": "ReportResult"
      },
      "ResolveRequest": {
        "properties": {
          "candidate_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Candidate Id"
          },
          "emails": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Emails",
            "default": []
          },
          "phones": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Phones",
            "default": []
          },
          "usernames": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Usernames",
            "default": []
          },
          "wallet_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Wallet Ids",
            "default": []
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Domains",
            "default": []
          },
          "ips": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ips",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ResolveRequest",
        "description": "OSI selector lookups. Each value is one billed OSINT Industries query\n(max 5 per type, 10 overall). `candidate_id` folds in a candidate from\nstep 1 at no extra cost."
      },
      "ResolveResult": {
        "properties": {
          "search_id": {
            "type": "string",
            "format": "uuid",
            "title": "Search Id"
          },
          "subject_entity_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Entity Id"
          },
          "subject_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Name"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "source_stats": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Source Stats",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "search_id",
          "subject_entity_id",
          "message"
        ],
        "title": "ResolveResult"
      },
      "SearchCreated": {
        "properties": {
          "search_id": {
            "type": "string",
            "format": "uuid",
            "title": "Search Id"
          },
          "searched": {
            "type": "boolean",
            "title": "Searched",
            "description": "False when no name was given: go straight to /resolve with selectors."
          },
          "candidates_count": {
            "type": "integer",
            "title": "Candidates Count"
          },
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/CandidateSummary"
            },
            "type": "array",
            "title": "Candidates"
          }
        },
        "type": "object",
        "required": [
          "search_id",
          "searched",
          "candidates_count",
          "candidates"
        ],
        "title": "SearchCreated"
      },
      "personinvestigator_SearchRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "examples": [
              "Jane Example"
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Username"
          },
          "dob": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dob",
            "description": "YYYY, YYYY-MM or YYYY-MM-DD"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "ISO 3166-1 alpha-2, e.g. GB"
          },
          "current_town": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Town"
          },
          "age_range": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Age Range",
            "examples": [
              "30-40"
            ]
          },
          "search_mode": {
            "type": "string",
            "enum": [
              "exact",
              "loose"
            ],
            "title": "Search Mode",
            "default": "exact"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title",
            "description": "Investigation title; defaults to the name."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SearchRequest",
        "description": "Start a person search. `name` drives the OSINT Industries name search;\nthe other fields never narrow it, they only mark which candidates share them."
      },
      "SearchStatus": {
        "properties": {
          "search_id": {
            "type": "string",
            "format": "uuid",
            "title": "Search Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "subject_entity_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject Entity Id"
          },
          "deep_search": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "entity_count": {
            "type": "integer",
            "title": "Entity Count"
          },
          "entities_by_type": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Entities By Type"
          }
        },
        "type": "object",
        "required": [
          "search_id",
          "title",
          "created_at",
          "subject_entity_id",
          "deep_search",
          "entity_count",
          "entities_by_type"
        ],
        "title": "SearchStatus"
      },
      "TaskOut": {
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "title": "Task Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "task_id",
          "status",
          "started_at",
          "completed_at"
        ],
        "title": "TaskOut"
      }
    },
    "responses": {
      "Accepted": {
        "description": "Still running; poll links.self",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "running"
                  ]
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "self": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OSINT.place access token or osk_ key"
      },
      "anpr_ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Your OSINT.place API key (osk_…), issued at admin.osint.place"
      },
      "personinvestigator_ApiKeyAuth": {
        "type": "apiKey",
        "description": "OSINT.place API key (osk_...), issued at admin.osint.place and granted for this app.",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "x-imsl-apps": [
    {
      "id": "companyfinder",
      "title": "CompanyFinder",
      "base": "https://imsl.companyfinder.osint.place",
      "spec": "https://imsl.companyfinder.osint.place/openapi.json",
      "docs": "https://imsl.companyfinder.osint.place/docs",
      "source": "live",
      "appSpecVersion": "2.1.0",
      "pathCount": 3
    },
    {
      "id": "scrapers",
      "title": "Scrapers",
      "base": "https://imsl.scrapers.osint.place",
      "spec": "https://imsl.scrapers.osint.place/openapi.json",
      "docs": "https://imsl.scrapers.osint.place/docs",
      "source": "live",
      "appSpecVersion": "1.0",
      "pathCount": 6
    },
    {
      "id": "github",
      "title": "GitHub Tools",
      "base": "https://imsl.github.osint.place",
      "spec": "https://imsl.github.osint.place/openapi.json",
      "docs": "https://imsl.github.osint.place/docs",
      "source": "live",
      "appSpecVersion": "1.0.0",
      "pathCount": 3
    },
    {
      "id": "knowledge",
      "title": "Knowledge",
      "base": "https://imsl.knowledge.osint.place",
      "spec": "https://imsl.knowledge.osint.place/api/openapi.json",
      "docs": null,
      "source": "live",
      "appSpecVersion": "0.3.0",
      "pathCount": 58
    },
    {
      "id": "digitaltwin",
      "title": "Digital Twin",
      "base": "https://imsl.digitaltwin.osint.place",
      "spec": "https://imsl.digitaltwin.osint.place/api/openapi.json",
      "docs": null,
      "source": "live",
      "appSpecVersion": "0.1.0",
      "pathCount": 30
    },
    {
      "id": "anpr",
      "title": "ANPR",
      "base": "https://imsl.anpr.osint.place",
      "spec": "https://imsl.anpr.osint.place/api/v1/openapi.json",
      "docs": "https://imsl.anpr.osint.place/api/v1/docs",
      "source": "live",
      "appSpecVersion": "1.0.0",
      "pathCount": 5
    },
    {
      "id": "personinvestigator",
      "title": "Person Investigator",
      "base": "https://imsl.personinvestigator.osint.place",
      "spec": "https://imsl.personinvestigator.osint.place/api/v1/openapi.json",
      "docs": "https://imsl.personinvestigator.osint.place/api/v1/docs",
      "source": "live",
      "appSpecVersion": "1.0.0",
      "pathCount": 9
    }
  ]
}
