{
  "openapi": "3.0.0",
  "info": {
    "title": "securesphere_backend_central",
    "version": "0.0.1",
    "description": "Backend_Central",
    "contact": {
      "name": "SBonilla-dev",
      "email": "sbonilla@gladiium.com"
    }
  },
  "paths": {
    "/.well-known/agent-configuration": {
      "get": {
        "x-controller-name": "AgentConfigurationController",
        "x-operation-name": "getConfiguration",
        "tags": [
          "AgentConfigurationController"
        ],
        "responses": {
          "200": {
            "description": "SecureSphere agent discovery document (público, no sensible)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "version",
                    "environment",
                    "enrollment",
                    "checkin",
                    "identityEndpoint"
                  ],
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "environment": {
                      "type": "string"
                    },
                    "enrollment": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "endpoint",
                        "method",
                        "codeRequired"
                      ],
                      "properties": {
                        "endpoint": {
                          "type": "string"
                        },
                        "method": {
                          "type": "string"
                        },
                        "codeRequired": {
                          "type": "boolean"
                        }
                      }
                    },
                    "checkin": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "endpoint"
                      ],
                      "properties": {
                        "endpoint": {
                          "type": "string"
                        },
                        "intervalSeconds": {
                          "type": "integer"
                        }
                      }
                    },
                    "identityEndpoint": {
                      "type": "string"
                    },
                    "agent": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "minVersion": {
                          "type": "string"
                        },
                        "recommendedVersion": {
                          "type": "string"
                        }
                      }
                    },
                    "docsUrl": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "AgentConfigurationController.getConfiguration"
      }
    },
    "/admin/fleet/collectors/{tenantId}/{agentId}": {
      "get": {
        "x-controller-name": "FleetAdminController",
        "x-operation-name": "getCollector",
        "tags": [
          "FleetAdminController"
        ],
        "responses": {
          "200": {
            "description": "Detalle interno de un collector (último estado conocido)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "agentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FleetAdminController.getCollector"
      }
    },
    "/admin/fleet/collectors": {
      "get": {
        "x-controller-name": "FleetAdminController",
        "x-operation-name": "listCollectors",
        "tags": [
          "FleetAdminController"
        ],
        "responses": {
          "200": {
            "description": "Listado interno de collectors (último estado por agente, cross-tenant)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "operationId": "FleetAdminController.listCollectors"
      }
    },
    "/admin/fleet/summary": {
      "get": {
        "x-controller-name": "FleetAdminController",
        "x-operation-name": "summary",
        "tags": [
          "FleetAdminController"
        ],
        "responses": {
          "200": {
            "description": "Resumen interno por tenant: conteos por estado efectivo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "FleetAdminController.summary"
      }
    },
    "/agents/me": {
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "me",
        "tags": [
          "AgentsController"
        ],
        "responses": {
          "200": {
            "description": "WhoAmI del agente (mTLS): su propia identidad y estado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "AgentsController.me"
      }
    },
    "/agents/{id}/checkin": {
      "post": {
        "x-controller-name": "CheckInController",
        "x-operation-name": "checkinAgent",
        "tags": [
          "CheckInController"
        ],
        "responses": {
          "200": {
            "description": "Agent check-in (mTLS) durable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "policy"
                  ],
                  "properties": {
                    "policy": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "revision"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "checkin_interval_s": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "role": {
                    "type": "string"
                  },
                  "machine": {
                    "type": "object"
                  },
                  "agent": {
                    "type": "object"
                  },
                  "status": {
                    "type": "object"
                  },
                  "cert": {
                    "type": "object"
                  },
                  "sent_at": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "CheckInController.checkinAgent"
      }
    },
    "/agents/{id}/events": {
      "post": {
        "x-controller-name": "AgentEventsController",
        "x-operation-name": "ingestEvent",
        "tags": [
          "AgentEventsController"
        ],
        "responses": {
          "202": {
            "description": "NormalizedEvent v1 accepted and published to Event Hub.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "status",
                    "eventId"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted"
                      ]
                    },
                    "eventId": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "AgentEventsController.ingestEvent"
      }
    },
    "/agents/{id}/rotate-cert": {
      "post": {
        "x-controller-name": "AgentRotateCertController",
        "x-operation-name": "rotateCert",
        "tags": [
          "AgentRotateCertController"
        ],
        "responses": {
          "200": {
            "description": "Agent rotate certificate response (Key Vault re-issue, cert + chain, agent applies hot-reload/restart)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "agent_id",
                    "tenant_id",
                    "region",
                    "rotated_at",
                    "cert_expires_at",
                    "client_cert_pem",
                    "ca_chain_pem"
                  ],
                  "properties": {
                    "agent_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tenant_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "region": {
                      "type": "string",
                      "minLength": 1
                    },
                    "rotated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "cert_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "client_cert_pem": {
                      "type": "string",
                      "minLength": 1
                    },
                    "ca_chain_pem": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "csr_pem"
                ],
                "properties": {
                  "csr_pem": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "AgentRotateCertController.rotateCert"
      }
    },
    "/agents/{id}": {
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "findById",
        "tags": [
          "AgentsController"
        ],
        "responses": {
          "200": {
            "description": "Agent detail (durable from MongoDB)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AgentsController.findById"
      },
      "delete": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "deregister",
        "tags": [
          "AgentsController"
        ],
        "responses": {
          "200": {
            "description": "Agent self-deregister (mTLS): removes enroll + fleet-state records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AgentsController.deregister"
      }
    },
    "/agents": {
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "find",
        "tags": [
          "AgentsController"
        ],
        "responses": {
          "200": {
            "description": "Agents list (paged) with durable status and filters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AgentsController.find"
      }
    },
    "/ai/ask-rag": {
      "post": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "askRag",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "RAG-only response with answer and citations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "traceId",
                    "tenantId",
                    "answer",
                    "citations",
                    "confidence"
                  ],
                  "properties": {
                    "traceId": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "answer": {
                      "type": "string"
                    },
                    "citations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "snippet",
                          "source",
                          "score"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "score": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "confidence": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "modelUsage": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "promptTokens",
                        "completionTokens",
                        "totalTokens",
                        "latencyMs",
                        "statusCode"
                      ],
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "deployment": {
                          "type": "string"
                        },
                        "promptTokens": {
                          "type": "number"
                        },
                        "completionTokens": {
                          "type": "number"
                        },
                        "totalTokens": {
                          "type": "number"
                        },
                        "latencyMs": {
                          "type": "number"
                        },
                        "statusCode": {
                          "type": "number"
                        },
                        "estimatedCostUsd": {
                          "type": "number"
                        },
                        "pricingVersion": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "query"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "top": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiPlaneController.askRag"
      }
    },
    "/ai/chat": {
      "post": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "chat",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Unified AI orchestration response (RAG, Agent, or Mixed).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "traceId",
                    "tenantId",
                    "userId",
                    "route",
                    "routeReason",
                    "answer",
                    "citations",
                    "cards",
                    "actions",
                    "confidence",
                    "tool_results",
                    "proposed_actions",
                    "receivedAt"
                  ],
                  "properties": {
                    "traceId": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "route": {
                      "type": "string",
                      "enum": [
                        "rag",
                        "agent",
                        "mixed"
                      ]
                    },
                    "routeReason": {
                      "type": "string"
                    },
                    "answer": {
                      "type": "string"
                    },
                    "citations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "snippet",
                          "source",
                          "score"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "score": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "cards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "title",
                          "priority",
                          "impact",
                          "effort",
                          "evidence",
                          "cta"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ]
                          },
                          "impact": {
                            "type": "string",
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ]
                          },
                          "effort": {
                            "type": "string",
                            "enum": [
                              "low",
                              "medium",
                              "high"
                            ]
                          },
                          "evidence": {
                            "type": "string"
                          },
                          "cta": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "label",
                              "action"
                            ],
                            "properties": {
                              "label": {
                                "type": "string",
                                "enum": [
                                  "Ver lista",
                                  "Ver pasos",
                                  "Aplicar"
                                ]
                              },
                              "action": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "title",
                          "description",
                          "category",
                          "requiresApproval",
                          "source"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "create",
                              "block",
                              "enable",
                              "report",
                              "notify"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "rag",
                              "agent",
                              "mixed"
                            ]
                          },
                          "payload": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "confidence": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "tool_results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "tool",
                          "status",
                          "data",
                          "evidence"
                        ],
                        "properties": {
                          "tool": {
                            "type": "string",
                            "enum": [
                              "LicenseSummary",
                              "CheckMFACompliance",
                              "GetTenantStatus"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "warning",
                              "error"
                            ]
                          },
                          "data": {
                            "type": "object"
                          },
                          "evidence": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "proposed_actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "title",
                          "description",
                          "category",
                          "requiresApproval",
                          "source"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "create",
                              "block",
                              "enable",
                              "report",
                              "notify"
                            ]
                          },
                          "requiresApproval": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "rag",
                              "agent",
                              "mixed"
                            ]
                          },
                          "payload": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "receivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "modelUsage": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "model",
                        "promptTokens",
                        "completionTokens",
                        "totalTokens",
                        "latencyMs",
                        "statusCode"
                      ],
                      "properties": {
                        "model": {
                          "type": "string"
                        },
                        "deployment": {
                          "type": "string"
                        },
                        "promptTokens": {
                          "type": "number"
                        },
                        "completionTokens": {
                          "type": "number"
                        },
                        "totalTokens": {
                          "type": "number"
                        },
                        "latencyMs": {
                          "type": "number"
                        },
                        "statusCode": {
                          "type": "number"
                        },
                        "estimatedCostUsd": {
                          "type": "number"
                        },
                        "pricingVersion": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "query"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "maxDocuments": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "model": {
                    "type": "string"
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  },
                  "pageSegment": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "selectedEntityId": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "mlUseCase": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiPlaneController.chat"
      }
    },
    "/ai/context/search": {
      "post": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "contextSearch",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Searches context documents for AI grounding.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "query"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "top": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiPlaneController.contextSearch"
      }
    },
    "/ai/prompts/test": {
      "post": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "promptTest",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Builds a prompt for inspection and can optionally run the model.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "query"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "promptVersion": {
                    "type": "string"
                  },
                  "maxDocuments": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "model": {
                    "type": "string"
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "runModel": {
                    "type": "boolean"
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiPlaneController.promptTest"
      }
    },
    "/ai/prompts/versions": {
      "get": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "listPromptVersions",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Available prompt versions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "AiPlaneController.listPromptVersions"
      }
    },
    "/ai/voice/capability": {
      "get": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "voiceCapability",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Voice capability readiness for a Foundry assistant.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "traceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiPlaneController.voiceCapability"
      }
    },
    "/ai/voice/speech-token": {
      "get": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "voiceSpeechToken",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Issues a short-lived Azure Speech token for client-side streaming STT.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "traceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiPlaneController.voiceSpeechToken"
      }
    },
    "/ai/voice/synthesize": {
      "post": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "voiceSynthesize",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Synthesizes Azure voice audio for Henrietta responses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "text"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 12000
                  },
                  "voiceName": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiPlaneController.voiceSynthesize"
      }
    },
    "/ai/voice/transcribe": {
      "post": {
        "x-controller-name": "AiPlaneController",
        "x-operation-name": "voiceTranscribe",
        "tags": [
          "AiPlaneController"
        ],
        "responses": {
          "200": {
            "description": "Transcribes audio to text using server-side speech recognition (Whisper).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId",
                  "audioBase64"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "audioBase64": {
                    "type": "string",
                    "minLength": 1
                  },
                  "mimeType": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "traceId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiPlaneController.voiceTranscribe"
      }
    },
    "/checkin": {
      "post": {
        "x-controller-name": "CheckInController",
        "x-operation-name": "checkinLegacy",
        "tags": [
          "CheckInController"
        ],
        "responses": {
          "200": {
            "description": "Wrapper check-in (legacy) durable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "policy"
                  ],
                  "properties": {
                    "policy": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "revision"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "agent_id"
                ],
                "properties": {
                  "agent_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string"
                  },
                  "machine": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "CheckInController.checkinLegacy"
      }
    },
    "/detection-dictionaries/{id}": {
      "patch": {
        "x-controller-name": "DetectionDictionaryController",
        "x-operation-name": "updateById",
        "tags": [
          "DetectionDictionaryController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update detection dictionary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DetectionDictionaryPartial"
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "DetectionDictionaryController.updateById"
      },
      "get": {
        "x-controller-name": "DetectionDictionaryController",
        "x-operation-name": "findById",
        "tags": [
          "DetectionDictionaryController"
        ],
        "responses": {
          "200": {
            "description": "Get detection dictionary by id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectionDictionary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DetectionDictionaryController.findById"
      },
      "delete": {
        "x-controller-name": "DetectionDictionaryController",
        "x-operation-name": "deleteById",
        "tags": [
          "DetectionDictionaryController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Delete detection dictionary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DetectionDictionaryController.deleteById"
      }
    },
    "/detection-dictionaries": {
      "post": {
        "x-controller-name": "DetectionDictionaryController",
        "x-operation-name": "create",
        "tags": [
          "DetectionDictionaryController"
        ],
        "responses": {
          "200": {
            "description": "Create a detection dictionary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectionDictionary"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewDetectionDictionary"
              }
            }
          },
          "required": true
        },
        "operationId": "DetectionDictionaryController.create"
      },
      "get": {
        "x-controller-name": "DetectionDictionaryController",
        "x-operation-name": "find",
        "tags": [
          "DetectionDictionaryController"
        ],
        "responses": {
          "200": {
            "description": "List detection dictionaries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DetectionDictionary"
                  }
                }
              }
            }
          }
        },
        "operationId": "DetectionDictionaryController.find"
      }
    },
    "/encryption/decrypt": {
      "post": {
        "x-controller-name": "EncryptionController",
        "x-operation-name": "decrypt",
        "tags": [
          "EncryptionController"
        ],
        "responses": {
          "200": {
            "description": "Decrypt a field value for a tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tenantId": {
                      "type": "string"
                    },
                    "decrypted": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tenantId",
                  "encrypted"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string"
                  },
                  "encrypted": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "EncryptionController.decrypt"
      }
    },
    "/encryption/encrypt": {
      "post": {
        "x-controller-name": "EncryptionController",
        "x-operation-name": "encrypt",
        "tags": [
          "EncryptionController"
        ],
        "responses": {
          "200": {
            "description": "Encrypt a field value for a tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tenantId": {
                      "type": "string"
                    },
                    "encrypted": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tenantId",
                  "value"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "EncryptionController.encrypt"
      }
    },
    "/encryption/provision-key": {
      "post": {
        "x-controller-name": "EncryptionController",
        "x-operation-name": "provisionKey",
        "tags": [
          "EncryptionController"
        ],
        "responses": {
          "200": {
            "description": "Provision an encryption key for a tenant (or return existing)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tenantId": {
                      "type": "string"
                    },
                    "keyVersion": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "EncryptionController.provisionKey"
      }
    },
    "/encryption/rotate-key": {
      "post": {
        "x-controller-name": "EncryptionController",
        "x-operation-name": "rotateKey",
        "tags": [
          "EncryptionController"
        ],
        "responses": {
          "200": {
            "description": "Rotate encryption key for a tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tenantId": {
                      "type": "string"
                    },
                    "oldVersion": {
                      "type": "number"
                    },
                    "newVersion": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "EncryptionController.rotateKey"
      }
    },
    "/enroll": {
      "post": {
        "x-controller-name": "AgentEnrollController",
        "x-operation-name": "enroll",
        "tags": [
          "AgentEnrollController"
        ],
        "responses": {
          "200": {
            "description": "Agent enroll response",
            "content": {
              "application/json": {
                "schema": {
                  "$id": "EnrollResponse",
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "agent_id",
                    "tenant_id",
                    "role",
                    "enrolled_at",
                    "backend_url",
                    "region",
                    "policy",
                    "client_cert_pem",
                    "ca_chain_pem"
                  ],
                  "properties": {
                    "agent_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tenant_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "endpoint",
                        "collector"
                      ]
                    },
                    "enrolled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "backend_url": {
                      "type": "string",
                      "minLength": 1
                    },
                    "region": {
                      "type": "string",
                      "enum": [
                        "latam",
                        "na",
                        "us-east-1",
                        "us-east-2",
                        "us-west-2",
                        "sa-east-1",
                        "ca-central-1"
                      ]
                    },
                    "policy": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "revision",
                        "published_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "published_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "client_cert_pem": {
                      "type": "string",
                      "minLength": 1
                    },
                    "ca_chain_pem": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$id": "EnrollRequest",
                "type": "object",
                "required": [
                  "code",
                  "csr_pem"
                ],
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "csr_pem": {
                    "type": "string",
                    "minLength": 1
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "endpoint",
                      "collector"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AgentEnrollController.enroll"
      }
    },
    "/enroll-codes/count": {
      "get": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "count",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "200": {
            "description": "EnrollCode model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "EnrollCode.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<EnrollCode>"
                }
              }
            }
          }
        ],
        "operationId": "EnrollCodeController.count"
      }
    },
    "/enroll-codes/{id}": {
      "put": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "replaceById",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "EnrollCode PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollCode"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "EnrollCodeController.replaceById"
      },
      "patch": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "updateById",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "EnrollCode PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollCodePartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "EnrollCodeController.updateById"
      },
      "get": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "findById",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "200": {
            "description": "EnrollCode model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollCodeWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollCode.Filter"
                }
              }
            }
          }
        ],
        "operationId": "EnrollCodeController.findById"
      },
      "delete": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "deleteById",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "EnrollCode DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "EnrollCodeController.deleteById"
      }
    },
    "/enroll-codes": {
      "post": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "create",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "200": {
            "description": "EnrollCode model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollCode"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEnrollCode"
              }
            }
          }
        },
        "operationId": "EnrollCodeController.create"
      },
      "patch": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "updateAll",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "200": {
            "description": "EnrollCode PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "EnrollCode.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<EnrollCode>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollCodePartial"
              }
            }
          }
        },
        "operationId": "EnrollCodeController.updateAll"
      },
      "get": {
        "x-controller-name": "EnrollCodeController",
        "x-operation-name": "find",
        "tags": [
          "EnrollCodeController"
        ],
        "responses": {
          "200": {
            "description": "Array of EnrollCode model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnrollCodeWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollCode.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "EnrollCodeController.find"
      }
    },
    "/enrolled-agents/{id}": {
      "get": {
        "x-controller-name": "AgentEnrollController",
        "x-operation-name": "findById",
        "tags": [
          "AgentEnrollController"
        ],
        "responses": {
          "200": {
            "description": "Agent enrollment details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEnroll"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AgentEnrollController.findById"
      }
    },
    "/enrolled-agents": {
      "get": {
        "x-controller-name": "AgentEnrollController",
        "x-operation-name": "find",
        "tags": [
          "AgentEnrollController"
        ],
        "responses": {
          "200": {
            "description": "Array of Enrolled Agents from MongoDB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentEnroll"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEnroll.Filter"
                }
              }
            }
          }
        ],
        "operationId": "AgentEnrollController.find"
      }
    },
    "/fleet/agents/{id}": {
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "fleetById",
        "tags": [
          "AgentsController"
        ],
        "responses": {
          "200": {
            "description": "Fleet detail (alias de /agents/{id}) — tenant OBLIGATORIO (aislamiento)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AgentsController.fleetById"
      }
    },
    "/fleet/agents": {
      "get": {
        "x-controller-name": "AgentsController",
        "x-operation-name": "fleetList",
        "tags": [
          "AgentsController"
        ],
        "responses": {
          "200": {
            "description": "Fleet list (alias de /agents) — tenant OBLIGATORIO + filtro role",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AgentsController.fleetList"
      }
    },
    "/health": {
      "get": {
        "x-controller-name": "HealthController",
        "x-operation-name": "health",
        "tags": [
          "HealthController"
        ],
        "responses": {
          "200": {
            "description": "Health check",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "HealthController.health"
      }
    },
    "/i/assets/vector/{version}/{filename}": {
      "get": {
        "x-controller-name": "InstallScriptController",
        "x-operation-name": "vectorMirror",
        "tags": [
          "InstallScriptController"
        ],
        "responses": {
          "200": {
            "description": "Return value of InstallScriptController.vectorMirror"
          }
        },
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filename",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InstallScriptController.vectorMirror"
      }
    },
    "/i/{token}/sha256": {
      "get": {
        "x-controller-name": "InstallScriptController",
        "x-operation-name": "installerChecksums",
        "tags": [
          "InstallScriptController"
        ],
        "responses": {
          "200": {
            "description": "Return value of InstallScriptController.installerChecksums"
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InstallScriptController.installerChecksums"
      }
    },
    "/i/{token}": {
      "get": {
        "x-controller-name": "InstallScriptController",
        "x-operation-name": "renderInstaller",
        "tags": [
          "InstallScriptController"
        ],
        "responses": {
          "200": {
            "description": "Return value of InstallScriptController.renderInstaller"
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InstallScriptController.renderInstaller"
      }
    },
    "/internal/ai/ml-context": {
      "post": {
        "x-controller-name": "InternalMlContextController",
        "x-operation-name": "mlContext",
        "tags": [
          "InternalMlContextController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Tenant-scoped ML insight bundle for AI grounding."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tenantId"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "useCases": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "signature_trends",
                        "rule_suggestions",
                        "host_risks"
                      ]
                    }
                  },
                  "entityId": {
                    "type": "string",
                    "maxLength": 256
                  },
                  "limit": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 50
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "InternalMlContextController.mlContext"
      }
    },
    "/marketplace/integrations/{provider}": {
      "patch": {
        "x-controller-name": "MarketplaceController",
        "x-operation-name": "update",
        "tags": [
          "MarketplaceController"
        ],
        "responses": {
          "200": {
            "description": "Return value of MarketplaceController.update"
          }
        },
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 2
        },
        "operationId": "MarketplaceController.update"
      }
    },
    "/marketplace/integrations": {
      "get": {
        "x-controller-name": "MarketplaceController",
        "x-operation-name": "list",
        "tags": [
          "MarketplaceController"
        ],
        "responses": {
          "200": {
            "description": "Return value of MarketplaceController.list"
          }
        },
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "MarketplaceController.list"
      }
    },
    "/ml-host-risks/{host_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLHostRiskController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLHostRiskController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a host risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "host_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLHostRiskController.acknowledge"
      }
    },
    "/ml-host-risks/{host_id}/dismiss": {
      "post": {
        "x-controller-name": "MLHostRiskController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLHostRiskController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a host risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "host_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLHostRiskController.dismiss"
      }
    },
    "/ml-host-risks/{host_id}": {
      "get": {
        "x-controller-name": "MLHostRiskController",
        "x-operation-name": "findOne",
        "tags": [
          "MLHostRiskController"
        ],
        "responses": {
          "200": {
            "description": "Get one host risk, scoped to the tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLHostRisk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "host_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLHostRiskController.findOne"
      }
    },
    "/ml-host-risks": {
      "get": {
        "x-controller-name": "MLHostRiskController",
        "x-operation-name": "list",
        "tags": [
          "MLHostRiskController"
        ],
        "responses": {
          "200": {
            "description": "List host risks for the tenant, by band/risk_score desc.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MLHostRisk"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLHostRiskController.list"
      }
    },
    "/ml-login-decisions/{decision_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLLoginDecisionController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLLoginDecisionController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a login decision"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "decision_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLLoginDecisionController.acknowledge"
      }
    },
    "/ml-login-decisions/{decision_id}/dismiss": {
      "post": {
        "x-controller-name": "MLLoginDecisionController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLLoginDecisionController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a login decision"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "decision_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLLoginDecisionController.dismiss"
      }
    },
    "/ml-login-decisions/{decision_id}": {
      "get": {
        "x-controller-name": "MLLoginDecisionController",
        "x-operation-name": "findOne",
        "tags": [
          "MLLoginDecisionController"
        ],
        "responses": {
          "200": {
            "description": "Get one login decision, scoped to the tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLLoginDecision"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "decision_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLLoginDecisionController.findOne"
      }
    },
    "/ml-login-decisions": {
      "get": {
        "x-controller-name": "MLLoginDecisionController",
        "x-operation-name": "list",
        "tags": [
          "MLLoginDecisionController"
        ],
        "responses": {
          "200": {
            "description": "List anomalous-login decisions for the tenant (newest first).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MLLoginDecision"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLLoginDecisionController.list"
      }
    },
    "/ml-login-location-risks/{login_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLLoginLocationRiskController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLLoginLocationRiskController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a login-location risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLLoginLocationRiskController.acknowledge"
      }
    },
    "/ml-login-location-risks/{login_id}/dismiss": {
      "post": {
        "x-controller-name": "MLLoginLocationRiskController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLLoginLocationRiskController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a login-location risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLLoginLocationRiskController.dismiss"
      }
    },
    "/ml-login-location-risks/{login_id}": {
      "get": {
        "x-controller-name": "MLLoginLocationRiskController",
        "x-operation-name": "findOne",
        "tags": [
          "MLLoginLocationRiskController"
        ],
        "responses": {
          "200": {
            "description": "Get one login-location risk, scoped to the tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLLoginLocationRisk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLLoginLocationRiskController.findOne"
      }
    },
    "/ml-login-location-risks": {
      "get": {
        "x-controller-name": "MLLoginLocationRiskController",
        "x-operation-name": "list",
        "tags": [
          "MLLoginLocationRiskController"
        ],
        "responses": {
          "200": {
            "description": "List login-location risks for the tenant, by band/risk_score desc.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MLLoginLocationRisk"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLLoginLocationRiskController.list"
      }
    },
    "/ml-signature-trends/{signature_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLSignatureTrendController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLSignatureTrendController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a signature trend"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLSignatureTrendController.acknowledge"
      }
    },
    "/ml-signature-trends/{signature_id}/dismiss": {
      "post": {
        "x-controller-name": "MLSignatureTrendController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLSignatureTrendController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a signature trend"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLSignatureTrendController.dismiss"
      }
    },
    "/ml-signature-trends/{signature_id}": {
      "get": {
        "x-controller-name": "MLSignatureTrendController",
        "x-operation-name": "findOne",
        "tags": [
          "MLSignatureTrendController"
        ],
        "responses": {
          "200": {
            "description": "Get one signature trend, scoped to the tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLSignatureTrend"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLSignatureTrendController.findOne"
      }
    },
    "/ml-signature-trends": {
      "get": {
        "x-controller-name": "MLSignatureTrendController",
        "x-operation-name": "list",
        "tags": [
          "MLSignatureTrendController"
        ],
        "responses": {
          "200": {
            "description": "List IPS signature trends for the tenant; emerging > growing > hits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MLSignatureTrend"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLSignatureTrendController.list"
      }
    },
    "/ml-suggestions/{suggestion_id}/approve": {
      "post": {
        "x-controller-name": "MLRuleSuggestionController",
        "x-operation-name": "approve",
        "tags": [
          "MLRuleSuggestionController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Approve a suggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "approved_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLRuleSuggestionController.approve"
      }
    },
    "/ml-suggestions/{suggestion_id}/reject": {
      "post": {
        "x-controller-name": "MLRuleSuggestionController",
        "x-operation-name": "reject",
        "tags": [
          "MLRuleSuggestionController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Reject a suggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "approved_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLRuleSuggestionController.reject"
      }
    },
    "/ml-suggestions/{suggestion_id}/snooze": {
      "post": {
        "x-controller-name": "MLRuleSuggestionController",
        "x-operation-name": "snooze",
        "tags": [
          "MLRuleSuggestionController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Snooze a suggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "approved_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLRuleSuggestionController.snooze"
      }
    },
    "/ml-suggestions/{suggestion_id}": {
      "get": {
        "x-controller-name": "MLRuleSuggestionController",
        "x-operation-name": "findOne",
        "tags": [
          "MLRuleSuggestionController"
        ],
        "responses": {
          "200": {
            "description": "Get one ML rule suggestion by id, scoped to the tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLRuleSuggestion"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "suggestion_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLRuleSuggestionController.findOne"
      }
    },
    "/ml-suggestions": {
      "get": {
        "x-controller-name": "MLRuleSuggestionController",
        "x-operation-name": "list",
        "tags": [
          "MLRuleSuggestionController"
        ],
        "responses": {
          "200": {
            "description": "List ML rule suggestions for the tenant, by rank desc.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MLRuleSuggestion"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLRuleSuggestionController.list"
      }
    },
    "/ml-user-app-risks/{user_app_id}/acknowledge": {
      "post": {
        "x-controller-name": "MLUserAppRiskController",
        "x-operation-name": "acknowledge",
        "tags": [
          "MLUserAppRiskController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Acknowledge a user-app risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_app_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLUserAppRiskController.acknowledge"
      }
    },
    "/ml-user-app-risks/{user_app_id}/dismiss": {
      "post": {
        "x-controller-name": "MLUserAppRiskController",
        "x-operation-name": "dismiss",
        "tags": [
          "MLUserAppRiskController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Dismiss a user-app risk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_app_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "acknowledged_by": {
                    "type": "string",
                    "maxLength": 256
                  }
                }
              }
            }
          },
          "required": false,
          "x-parameter-index": 2
        },
        "operationId": "MLUserAppRiskController.dismiss"
      }
    },
    "/ml-user-app-risks/{user_app_id}": {
      "get": {
        "x-controller-name": "MLUserAppRiskController",
        "x-operation-name": "findOne",
        "tags": [
          "MLUserAppRiskController"
        ],
        "responses": {
          "200": {
            "description": "Get one user-app risk, scoped to the tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MLUserAppRisk"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_app_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MLUserAppRiskController.findOne"
      }
    },
    "/ml-user-app-risks": {
      "get": {
        "x-controller-name": "MLUserAppRiskController",
        "x-operation-name": "list",
        "tags": [
          "MLUserAppRiskController"
        ],
        "responses": {
          "200": {
            "description": "List user-app risks for the tenant, by band/risk_score desc.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MLUserAppRisk"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Tenant-Id",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "band",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "MLUserAppRiskController.list"
      }
    },
    "/module-factory/dispatch": {
      "post": {
        "x-controller-name": "ModuleDispatchController",
        "x-operation-name": "dispatch",
        "tags": [
          "ModuleDispatchController"
        ],
        "responses": {
          "202": {
            "description": "Dispatch module execution to Azure without local queueing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "runId",
                    "dispatchId",
                    "status",
                    "totalTenants",
                    "dispatched",
                    "failed",
                    "tenantRuns"
                  ],
                  "properties": {
                    "runId": {
                      "type": "string"
                    },
                    "dispatchId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "partial_failure"
                      ]
                    },
                    "totalTenants": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "dispatched": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "failed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "tenantRuns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "tenantId",
                          "tenantRunId"
                        ],
                        "properties": {
                          "tenantId": {
                            "type": "string"
                          },
                          "tenantRunId": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "failures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "tenantId",
                          "tenantRunId",
                          "error"
                        ],
                        "properties": {
                          "tenantId": {
                            "type": "string"
                          },
                          "tenantRunId": {
                            "type": "string"
                          },
                          "error": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "moduleName",
                  "moduleVersion",
                  "tenantIds",
                  "requestedBy"
                ],
                "properties": {
                  "moduleName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "moduleVersion": {
                    "type": "string",
                    "minLength": 1
                  },
                  "tenantIds": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "requestedBy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "traceId": {
                    "type": "string"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "tenantContextById": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "ModuleDispatchController.dispatch"
      }
    },
    "/module-factory/execution-results": {
      "post": {
        "x-controller-name": "ModuleExecutionResultController",
        "x-operation-name": "register",
        "tags": [
          "ModuleExecutionResultController"
        ],
        "responses": {
          "200": {
            "description": "Register one tenant execution result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "runId",
                    "tenantRunId",
                    "runStatus",
                    "completedTenants",
                    "expectedResults",
                    "successTenants",
                    "partialTenants",
                    "failedTenants",
                    "complete"
                  ],
                  "properties": {
                    "runId": {
                      "type": "string"
                    },
                    "tenantRunId": {
                      "type": "string"
                    },
                    "runStatus": {
                      "type": "string",
                      "enum": [
                        "ACCEPTED",
                        "PARTIAL_FAILURE",
                        "SKIPPED",
                        "ERROR",
                        "DRY_RUN",
                        "IN_PROGRESS",
                        "COMPLETED_SUCCESS",
                        "COMPLETED_PARTIAL",
                        "COMPLETED_FAILURE"
                      ]
                    },
                    "completedTenants": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "expectedResults": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "successTenants": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "partialTenants": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "failedTenants": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "runId",
                  "tenantRunId",
                  "tenantId",
                  "moduleName",
                  "moduleVersion",
                  "status",
                  "startedAt",
                  "finishedAt",
                  "durationMs",
                  "metrics",
                  "errors",
                  "warnings"
                ],
                "properties": {
                  "runId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "tenantRunId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "moduleName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "moduleVersion": {
                    "type": "string",
                    "minLength": 1
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "success",
                      "partial",
                      "failure"
                    ]
                  },
                  "startedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "finishedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "durationMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "metrics": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "totalFetchedEvents",
                      "totalParsedEvents",
                      "filteredEvents",
                      "publishedEvents",
                      "alertsFired",
                      "errorCount",
                      "warningCount"
                    ],
                    "properties": {
                      "totalFetchedEvents": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "totalParsedEvents": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "filteredEvents": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "publishedEvents": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "alertsFired": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "errorCount": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "warningCount": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  },
                  "errors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "ModuleExecutionResultController.register"
      }
    },
    "/module-factory/scheduler/tick": {
      "post": {
        "x-controller-name": "ModuleSchedulerController",
        "x-operation-name": "tick",
        "tags": [
          "ModuleSchedulerController"
        ],
        "responses": {
          "200": {
            "description": "Evaluate due schedules and dispatch tenant module executions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "tickAt",
                    "dryRun",
                    "evaluated",
                    "due",
                    "executed",
                    "outcomes"
                  ],
                  "properties": {
                    "tickAt": {
                      "type": "string"
                    },
                    "dryRun": {
                      "type": "boolean"
                    },
                    "evaluated": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "due": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "executed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "outcomes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "moduleName",
                          "scheduleType",
                          "due",
                          "reason",
                          "runs"
                        ],
                        "properties": {
                          "scheduleId": {
                            "type": "string"
                          },
                          "moduleName": {
                            "type": "string"
                          },
                          "scheduleType": {
                            "type": "string",
                            "enum": [
                              "CRON",
                              "INTERVAL"
                            ]
                          },
                          "due": {
                            "type": "boolean"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "runs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "runId",
                                "moduleVersion",
                                "status",
                                "totalTenants",
                                "dispatched",
                                "failed"
                              ],
                              "properties": {
                                "runId": {
                                  "type": "string"
                                },
                                "moduleVersion": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "ACCEPTED",
                                    "PARTIAL_FAILURE",
                                    "SKIPPED",
                                    "ERROR",
                                    "DRY_RUN"
                                  ]
                                },
                                "totalTenants": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "dispatched": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "failed": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "tenantRuns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                      "tenantId",
                                      "tenantRunId"
                                    ],
                                    "properties": {
                                      "tenantId": {
                                        "type": "string"
                                      },
                                      "tenantRunId": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "failures": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                      "tenantId",
                                      "tenantRunId",
                                      "error"
                                    ],
                                    "properties": {
                                      "tenantId": {
                                        "type": "string"
                                      },
                                      "tenantRunId": {
                                        "type": "string"
                                      },
                                      "error": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "error": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "tickAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "dryRun": {
                    "type": "boolean"
                  },
                  "requestedBy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "moduleName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "scheduleIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "maxSchedules": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  }
                }
              }
            }
          },
          "required": false
        },
        "operationId": "ModuleSchedulerController.tick"
      }
    },
    "/parsing-dictionaries/{id}": {
      "patch": {
        "x-controller-name": "ParsingDictionaryController",
        "x-operation-name": "updateById",
        "tags": [
          "ParsingDictionaryController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update parsing dictionary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParsingDictionaryPartial"
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "ParsingDictionaryController.updateById"
      },
      "get": {
        "x-controller-name": "ParsingDictionaryController",
        "x-operation-name": "findById",
        "tags": [
          "ParsingDictionaryController"
        ],
        "responses": {
          "200": {
            "description": "Get parsing dictionary by id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParsingDictionary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ParsingDictionaryController.findById"
      },
      "delete": {
        "x-controller-name": "ParsingDictionaryController",
        "x-operation-name": "deleteById",
        "tags": [
          "ParsingDictionaryController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Delete parsing dictionary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ParsingDictionaryController.deleteById"
      }
    },
    "/parsing-dictionaries": {
      "post": {
        "x-controller-name": "ParsingDictionaryController",
        "x-operation-name": "create",
        "tags": [
          "ParsingDictionaryController"
        ],
        "responses": {
          "200": {
            "description": "Create a parsing dictionary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParsingDictionary"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewParsingDictionary"
              }
            }
          },
          "required": true
        },
        "operationId": "ParsingDictionaryController.create"
      },
      "get": {
        "x-controller-name": "ParsingDictionaryController",
        "x-operation-name": "find",
        "tags": [
          "ParsingDictionaryController"
        ],
        "responses": {
          "200": {
            "description": "List parsing dictionaries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParsingDictionary"
                  }
                }
              }
            }
          }
        },
        "operationId": "ParsingDictionaryController.find"
      }
    },
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": [
          "PingController"
        ],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping"
      }
    },
    "/policies/{id}/render": {
      "get": {
        "x-controller-name": "PolicyController",
        "x-operation-name": "render",
        "tags": [
          "PolicyController"
        ],
        "responses": {
          "200": {
            "description": "Rendered policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "PolicyRenderResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "agent_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "PolicyController.render"
      }
    },
    "/s/{token}/sha256": {
      "get": {
        "x-controller-name": "InstallWizardController",
        "x-operation-name": "wizardChecksums",
        "tags": [
          "InstallWizardController"
        ],
        "responses": {
          "200": {
            "description": "Return value of InstallWizardController.wizardChecksums"
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InstallWizardController.wizardChecksums"
      }
    },
    "/s/{token}": {
      "get": {
        "x-controller-name": "InstallWizardController",
        "x-operation-name": "renderWizard",
        "tags": [
          "InstallWizardController"
        ],
        "responses": {
          "200": {
            "description": "Return value of InstallWizardController.renderWizard"
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InstallWizardController.renderWizard"
      }
    },
    "/tenant-credentials/{tenantId}/{provider}": {
      "get": {
        "x-controller-name": "TenantCredentialController",
        "x-operation-name": "read",
        "tags": [
          "TenantCredentialController"
        ],
        "responses": {
          "200": {
            "description": "Read decrypted credentials for a tenant + provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialController.read"
      },
      "delete": {
        "x-controller-name": "TenantCredentialController",
        "x-operation-name": "remove",
        "tags": [
          "TenantCredentialController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Credentials deleted"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialController.remove"
      }
    },
    "/tenant-credentials/{tenantId}": {
      "get": {
        "x-controller-name": "TenantCredentialController",
        "x-operation-name": "list",
        "tags": [
          "TenantCredentialController"
        ],
        "responses": {
          "200": {
            "description": "List which providers have credentials for a tenant (no values)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantCredentialController.list"
      }
    },
    "/tenant-credentials": {
      "post": {
        "x-controller-name": "TenantCredentialController",
        "x-operation-name": "save",
        "tags": [
          "TenantCredentialController"
        ],
        "responses": {
          "200": {
            "description": "Save encrypted credentials for a tenant + provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-Internal-Service-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tenantId",
                  "provider",
                  "fields",
                  "createdBy"
                ],
                "properties": {
                  "tenantId": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "SOPHOS",
                      "FORTINET",
                      "KASEYA",
                      "ESET",
                      "MSGRAPH"
                    ]
                  },
                  "fields": {
                    "type": "object"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "global",
                      "user"
                    ]
                  },
                  "createdBy": {
                    "type": "object",
                    "required": [
                      "id",
                      "name"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "TenantCredentialController.save"
      }
    },
    "/tenant-module-assignments/resolve": {
      "patch": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "updateByTarget",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update assignment by tenant + module + version"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "moduleName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "moduleVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantModuleAssignmentPartialExcluding_tenantId-moduleName-moduleVersion_"
              }
            }
          },
          "required": true,
          "x-parameter-index": 3
        },
        "operationId": "TenantModuleAssignmentController.updateByTarget"
      },
      "get": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "resolveByTarget",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "200": {
            "description": "Resolve assignment by tenant + module + version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantModuleAssignment"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "moduleName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "moduleVersion",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TenantModuleAssignmentController.resolveByTarget"
      }
    },
    "/tenant-module-assignments/{id}": {
      "patch": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "updateById",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update tenant-module assignment by id"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenantModuleAssignmentPartial"
              }
            }
          },
          "required": true,
          "x-parameter-index": 1
        },
        "operationId": "TenantModuleAssignmentController.updateById"
      },
      "get": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "findById",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "200": {
            "description": "Get tenant-module assignment by id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantModuleAssignment"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantModuleAssignmentController.findById"
      },
      "delete": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "deleteById",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Delete tenant-module assignment by id"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TenantModuleAssignmentController.deleteById"
      }
    },
    "/tenant-module-assignments": {
      "post": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "create",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "200": {
            "description": "Create tenant-module assignment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantModuleAssignment"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewTenantModuleAssignment"
              }
            }
          },
          "required": true
        },
        "operationId": "TenantModuleAssignmentController.create"
      },
      "get": {
        "x-controller-name": "TenantModuleAssignmentController",
        "x-operation-name": "find",
        "tags": [
          "TenantModuleAssignmentController"
        ],
        "responses": {
          "200": {
            "description": "List tenant-module assignments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantModuleAssignment"
                  }
                }
              }
            }
          }
        },
        "operationId": "TenantModuleAssignmentController.find"
      }
    },
    "/wrapper/enroll": {
      "post": {
        "x-controller-name": "WrapperController",
        "x-operation-name": "enroll",
        "tags": [
          "WrapperController"
        ],
        "responses": {
          "200": {
            "description": "Return value of WrapperController.enroll"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "operationId": "WrapperController.enroll"
      }
    },
    "/wrapper/init": {
      "post": {
        "x-controller-name": "WrapperController",
        "x-operation-name": "init",
        "tags": [
          "WrapperController"
        ],
        "responses": {
          "200": {
            "description": "Return value of WrapperController.init"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false
        },
        "operationId": "WrapperController.init"
      }
    },
    "/wrapper/status": {
      "post": {
        "x-controller-name": "WrapperController",
        "x-operation-name": "status",
        "tags": [
          "WrapperController"
        ],
        "responses": {
          "200": {
            "description": "Return value of WrapperController.status"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false
        },
        "operationId": "WrapperController.status"
      }
    }
  },
  "servers": [
    {
      "url": "https://backend-central.orbis.roundbox.dev"
    }
  ],
  "components": {
    "schemas": {
      "TenantModuleAssignment": {
        "title": "TenantModuleAssignment",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "assignmentMode": {
            "type": "string",
            "enum": [
              "EXPLICIT",
              "INHERITED"
            ]
          },
          "ingestionOwner": {
            "type": "string",
            "enum": [
              "module-factory",
              "collector"
            ]
          },
          "scheduleId": {
            "type": "string"
          },
          "secretRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dictionaryRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parsingDictionaryRef": {
            "type": "string"
          },
          "detectionDictionaryRef": {
            "type": "string"
          },
          "overrides": {
            "type": "object"
          },
          "providerScope": {
            "type": "string"
          },
          "assignedBy": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenantId",
          "moduleName",
          "moduleVersion",
          "enabled",
          "assignmentMode",
          "assignedBy",
          "assignedAt"
        ],
        "additionalProperties": false
      },
      "NewTenantModuleAssignment": {
        "title": "NewTenantModuleAssignment",
        "type": "object",
        "description": "(tsType: Omit<TenantModuleAssignment, 'id'>, schemaOptions: { title: 'NewTenantModuleAssignment', exclude: [ 'id' ] })",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "assignmentMode": {
            "type": "string",
            "enum": [
              "EXPLICIT",
              "INHERITED"
            ]
          },
          "ingestionOwner": {
            "type": "string",
            "enum": [
              "module-factory",
              "collector"
            ]
          },
          "scheduleId": {
            "type": "string"
          },
          "secretRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dictionaryRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parsingDictionaryRef": {
            "type": "string"
          },
          "detectionDictionaryRef": {
            "type": "string"
          },
          "overrides": {
            "type": "object"
          },
          "providerScope": {
            "type": "string"
          },
          "assignedBy": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenantId",
          "moduleName",
          "moduleVersion",
          "enabled",
          "assignmentMode",
          "assignedBy",
          "assignedAt"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<TenantModuleAssignment, 'id'>"
      },
      "TenantModuleAssignmentPartial": {
        "title": "TenantModuleAssignmentPartial",
        "type": "object",
        "description": "(tsType: Partial<TenantModuleAssignment>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "assignmentMode": {
            "type": "string",
            "enum": [
              "EXPLICIT",
              "INHERITED"
            ]
          },
          "ingestionOwner": {
            "type": "string",
            "enum": [
              "module-factory",
              "collector"
            ]
          },
          "scheduleId": {
            "type": "string"
          },
          "secretRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dictionaryRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parsingDictionaryRef": {
            "type": "string"
          },
          "detectionDictionaryRef": {
            "type": "string"
          },
          "overrides": {
            "type": "object"
          },
          "providerScope": {
            "type": "string"
          },
          "assignedBy": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<TenantModuleAssignment>"
      },
      "TenantModuleAssignmentPartialExcluding_tenantId-moduleName-moduleVersion_": {
        "title": "TenantModuleAssignmentPartialExcluding_tenantId-moduleName-moduleVersion_",
        "type": "object",
        "description": "(tsType: Omit<Partial<TenantModuleAssignment>, 'tenantId' | 'moduleName' | 'moduleVersion'>, schemaOptions: { partial: true, exclude: [ 'tenantId', 'moduleName', 'moduleVersion' ] })",
        "properties": {
          "id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "assignmentMode": {
            "type": "string",
            "enum": [
              "EXPLICIT",
              "INHERITED"
            ]
          },
          "ingestionOwner": {
            "type": "string",
            "enum": [
              "module-factory",
              "collector"
            ]
          },
          "scheduleId": {
            "type": "string"
          },
          "secretRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dictionaryRefIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parsingDictionaryRef": {
            "type": "string"
          },
          "detectionDictionaryRef": {
            "type": "string"
          },
          "overrides": {
            "type": "object"
          },
          "providerScope": {
            "type": "string"
          },
          "assignedBy": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Partial<TenantModuleAssignment>, 'tenantId' | 'moduleName' | 'moduleVersion'>"
      },
      "ParsingDictionary": {
        "title": "ParsingDictionary",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "dictionaryVersion": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "inactive"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "field",
                  "action"
                ],
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "keep",
                      "rename",
                      "transform",
                      "drop-field"
                    ]
                  },
                  "target": {
                    "type": "string"
                  },
                  "transform": {
                    "type": "string",
                    "enum": [
                      "to_lowercase",
                      "to_uppercase",
                      "epoch_to_iso",
                      "to_str"
                    ]
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "dictionaryVersion",
          "vendor",
          "moduleName",
          "moduleVersion",
          "status",
          "fields"
        ],
        "additionalProperties": false
      },
      "NewParsingDictionary": {
        "title": "NewParsingDictionary",
        "type": "object",
        "description": "(tsType: Omit<ParsingDictionary, 'id'>, schemaOptions: { title: 'NewParsingDictionary', exclude: [ 'id' ] })",
        "properties": {
          "name": {
            "type": "string"
          },
          "dictionaryVersion": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "inactive"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "field",
                  "action"
                ],
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "keep",
                      "rename",
                      "transform",
                      "drop-field"
                    ]
                  },
                  "target": {
                    "type": "string"
                  },
                  "transform": {
                    "type": "string",
                    "enum": [
                      "to_lowercase",
                      "to_uppercase",
                      "epoch_to_iso",
                      "to_str"
                    ]
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "dictionaryVersion",
          "vendor",
          "moduleName",
          "moduleVersion",
          "status",
          "fields"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<ParsingDictionary, 'id'>"
      },
      "ParsingDictionaryPartial": {
        "title": "ParsingDictionaryPartial",
        "type": "object",
        "description": "(tsType: Partial<ParsingDictionary>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "dictionaryVersion": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "inactive"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "field",
                  "action"
                ],
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "keep",
                      "rename",
                      "transform",
                      "drop-field"
                    ]
                  },
                  "target": {
                    "type": "string"
                  },
                  "transform": {
                    "type": "string",
                    "enum": [
                      "to_lowercase",
                      "to_uppercase",
                      "epoch_to_iso",
                      "to_str"
                    ]
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<ParsingDictionary>"
      },
      "MLUserAppRisk": {
        "title": "MLUserAppRisk",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "contributing_connectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "user_app_id": {
            "type": "string"
          },
          "user_value": {
            "type": "string"
          },
          "user_source": {
            "type": "string",
            "enum": [
              "faz_user",
              "faz_ip"
            ]
          },
          "user_label": {
            "type": "string"
          },
          "risk_score": {
            "type": "number"
          },
          "risk_band": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "baseline_score": {
            "type": "number"
          },
          "model_version": {
            "type": "string"
          },
          "model_score": {
            "type": "number"
          },
          "hits_total": {
            "type": "number"
          },
          "hits_24h": {
            "type": "number"
          },
          "hits_7d": {
            "type": "number"
          },
          "hits_trailing": {
            "type": "number"
          },
          "trailing_window_days": {
            "type": "number"
          },
          "daily_hits": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "distinct_apps": {
            "type": "number"
          },
          "top_apps": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "category_breakdown": {
            "type": "object"
          },
          "apprisk_breakdown": {
            "type": "object"
          },
          "has_critical_app": {
            "type": "boolean"
          },
          "first_seen": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "new",
              "acknowledged",
              "dismissed"
            ]
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_by": {
            "type": "string"
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "user_app_id",
          "user_value",
          "user_source",
          "risk_score",
          "risk_band",
          "baseline_score",
          "hits_total",
          "hits_24h",
          "hits_7d",
          "hits_trailing",
          "trailing_window_days",
          "distinct_apps",
          "has_critical_app",
          "state"
        ],
        "additionalProperties": false
      },
      "MLSignatureTrend": {
        "title": "MLSignatureTrend",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "contributing_connectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "signature_id": {
            "type": "string"
          },
          "signature_name": {
            "type": "string"
          },
          "signature_source": {
            "type": "string",
            "enum": [
              "faz"
            ]
          },
          "hits_today": {
            "type": "number"
          },
          "hits_trailing_total": {
            "type": "number"
          },
          "trailing_window_days": {
            "type": "number"
          },
          "daily_counts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "is_emerging": {
            "type": "boolean"
          },
          "is_growing": {
            "type": "boolean"
          },
          "is_dormant": {
            "type": "boolean"
          },
          "top_hosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "severity_distribution_today": {
            "type": "object"
          },
          "mitre_ttps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "first_seen": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "new",
              "acknowledged",
              "dismissed"
            ]
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_by": {
            "type": "string"
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "signature_id",
          "signature_name",
          "signature_source",
          "hits_today",
          "hits_trailing_total",
          "trailing_window_days",
          "is_emerging",
          "is_growing",
          "is_dormant",
          "state"
        ],
        "additionalProperties": false
      },
      "MLRuleSuggestion": {
        "title": "MLRuleSuggestion",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "contributing_connectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suggestion_id": {
            "type": "string"
          },
          "rule_id": {
            "type": "string"
          },
          "cluster_size": {
            "type": "number"
          },
          "rank": {
            "type": "number"
          },
          "predicates": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "coverage_estimate": {
            "type": "number"
          },
          "severity_distribution": {
            "type": "object"
          },
          "mitre_ttps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "top_hosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "top_msps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "example_event_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "impact_projection": {
            "type": "object"
          },
          "rationale": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "proposed",
              "approved",
              "rejected",
              "needs_review",
              "snoozed"
            ]
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "approved_by": {
            "type": "string"
          },
          "approved_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "suggestion_id",
          "cluster_size",
          "rank",
          "predicates",
          "coverage_estimate",
          "rationale",
          "state"
        ],
        "additionalProperties": false
      },
      "MLLoginLocationRisk": {
        "title": "MLLoginLocationRisk",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "contributing_connectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "login_id": {
            "type": "string"
          },
          "user_value": {
            "type": "string"
          },
          "user_source": {
            "type": "string",
            "enum": [
              "entra_upn",
              "entra_oid"
            ]
          },
          "user_label": {
            "type": "string"
          },
          "risk_score": {
            "type": "number"
          },
          "risk_band": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "baseline_score": {
            "type": "number"
          },
          "model_version": {
            "type": "string"
          },
          "model_score": {
            "type": "number"
          },
          "signals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "max_velocity_kmh": {
            "type": "number"
          },
          "risky_signin_count": {
            "type": "number"
          },
          "logins_total": {
            "type": "number"
          },
          "logins_24h": {
            "type": "number"
          },
          "logins_7d": {
            "type": "number"
          },
          "logins_trailing": {
            "type": "number"
          },
          "trailing_window_days": {
            "type": "number"
          },
          "daily_logins": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "distinct_countries": {
            "type": "number"
          },
          "distinct_ips": {
            "type": "number"
          },
          "top_locations": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "first_seen": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "new",
              "acknowledged",
              "dismissed"
            ]
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_by": {
            "type": "string"
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "login_id",
          "user_value",
          "user_source",
          "risk_score",
          "risk_band",
          "baseline_score",
          "max_velocity_kmh",
          "risky_signin_count",
          "logins_total",
          "logins_24h",
          "logins_7d",
          "logins_trailing",
          "trailing_window_days",
          "distinct_countries",
          "distinct_ips",
          "state"
        ],
        "additionalProperties": false
      },
      "MLLoginDecision": {
        "title": "MLLoginDecision",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "decision_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "user_value": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "src_ip": {
            "type": "string"
          },
          "src_country": {
            "type": "string"
          },
          "prev_country": {
            "type": "string"
          },
          "velocity_kmh": {
            "type": "number"
          },
          "distance_km": {
            "type": "number"
          },
          "country_change": {
            "type": "boolean"
          },
          "method_is_mfa": {
            "type": "boolean"
          },
          "rule_id": {
            "type": "string"
          },
          "rule_name": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "confidence": {
            "type": "number"
          },
          "risk_band": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "severity": {
            "type": "string"
          },
          "triggered_rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "signals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "explanation": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "detected_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "new",
              "acknowledged",
              "dismissed"
            ]
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_by": {
            "type": "string"
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "decision_id",
          "velocity_kmh",
          "distance_km",
          "score",
          "confidence",
          "risk_band",
          "state"
        ],
        "additionalProperties": false
      },
      "MLHostRisk": {
        "title": "MLHostRisk",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "contributing_connectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "host_id": {
            "type": "string"
          },
          "host_value": {
            "type": "string"
          },
          "host_source": {
            "type": "string",
            "enum": [
              "sophos",
              "faz_ip"
            ]
          },
          "host_label": {
            "type": "string"
          },
          "risk_score": {
            "type": "number"
          },
          "risk_band": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "baseline_score": {
            "type": "number"
          },
          "model_version": {
            "type": "string"
          },
          "model_score": {
            "type": "number"
          },
          "hits_total": {
            "type": "number"
          },
          "hits_24h": {
            "type": "number"
          },
          "hits_7d": {
            "type": "number"
          },
          "hits_trailing": {
            "type": "number"
          },
          "trailing_window_days": {
            "type": "number"
          },
          "daily_hits": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "severity_breakdown": {
            "type": "object"
          },
          "top_signatures": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "mitre_ttps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "has_sophos_detection": {
            "type": "boolean"
          },
          "first_seen": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen": {
            "type": "string",
            "format": "date-time"
          },
          "correlated_host_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "new",
              "acknowledged",
              "dismissed"
            ]
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_by": {
            "type": "string"
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "host_id",
          "host_value",
          "host_source",
          "risk_score",
          "risk_band",
          "baseline_score",
          "hits_total",
          "hits_24h",
          "hits_7d",
          "hits_trailing",
          "trailing_window_days",
          "has_sophos_detection",
          "state"
        ],
        "additionalProperties": false
      },
      "EnrollCode": {
        "title": "EnrollCode",
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "used": {
            "type": "boolean"
          },
          "used_at": {
            "type": "string",
            "format": "date-time"
          },
          "used_by": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "tenant_id",
          "region"
        ],
        "additionalProperties": false
      },
      "NewEnrollCode": {
        "title": "NewEnrollCode",
        "type": "object",
        "description": "(tsType: Omit<EnrollCode, 'code' | 'expires_at' | 'used' | 'used_at' | 'used_by' | 'revoked' | 'created_at'>, schemaOptions: { title: 'NewEnrollCode', exclude: [ 'code', 'expires_at', 'used', 'used_at', 'used_by', 'revoked', 'created_at' ] })",
        "properties": {
          "tenant_id": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "region"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<EnrollCode, 'code' | 'expires_at' | 'used' | 'used_at' | 'used_by' | 'revoked' | 'created_at'>"
      },
      "EnrollCodeWithRelations": {
        "title": "EnrollCodeWithRelations",
        "type": "object",
        "description": "(tsType: EnrollCodeWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "code": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "used": {
            "type": "boolean"
          },
          "used_at": {
            "type": "string",
            "format": "date-time"
          },
          "used_by": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "tenant_id",
          "region"
        ],
        "additionalProperties": false,
        "x-typescript-type": "EnrollCodeWithRelations"
      },
      "EnrollCodePartial": {
        "title": "EnrollCodePartial",
        "type": "object",
        "description": "(tsType: Partial<EnrollCode>, schemaOptions: { partial: true })",
        "properties": {
          "code": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "used": {
            "type": "boolean"
          },
          "used_at": {
            "type": "string",
            "format": "date-time"
          },
          "used_by": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "label": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<EnrollCode>"
      },
      "DetectionDictionary": {
        "title": "DetectionDictionary",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "dictionaryVersion": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "inactive"
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ruleId",
                  "description",
                  "field",
                  "operator",
                  "severity"
                ],
                "properties": {
                  "ruleId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "field": {
                    "type": "string"
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "eq",
                      "contains",
                      "gt",
                      "lt"
                    ]
                  },
                  "value": {},
                  "severity": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "dictionaryVersion",
          "vendor",
          "moduleName",
          "moduleVersion",
          "status",
          "rules"
        ],
        "additionalProperties": false
      },
      "NewDetectionDictionary": {
        "title": "NewDetectionDictionary",
        "type": "object",
        "description": "(tsType: Omit<DetectionDictionary, 'id'>, schemaOptions: { title: 'NewDetectionDictionary', exclude: [ 'id' ] })",
        "properties": {
          "name": {
            "type": "string"
          },
          "dictionaryVersion": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "inactive"
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ruleId",
                  "description",
                  "field",
                  "operator",
                  "severity"
                ],
                "properties": {
                  "ruleId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "field": {
                    "type": "string"
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "eq",
                      "contains",
                      "gt",
                      "lt"
                    ]
                  },
                  "value": {},
                  "severity": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "dictionaryVersion",
          "vendor",
          "moduleName",
          "moduleVersion",
          "status",
          "rules"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<DetectionDictionary, 'id'>"
      },
      "DetectionDictionaryPartial": {
        "title": "DetectionDictionaryPartial",
        "type": "object",
        "description": "(tsType: Partial<DetectionDictionary>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "dictionaryVersion": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "moduleName": {
            "type": "string"
          },
          "moduleVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "inactive"
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ruleId",
                  "description",
                  "field",
                  "operator",
                  "severity"
                ],
                "properties": {
                  "ruleId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "field": {
                    "type": "string"
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "eq",
                      "contains",
                      "gt",
                      "lt"
                    ]
                  },
                  "value": {},
                  "severity": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<DetectionDictionary>"
      },
      "AgentEnroll": {
        "title": "AgentEnroll",
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "endpoint",
              "collector"
            ]
          },
          "enrolled_at": {
            "type": "string",
            "format": "date-time"
          },
          "backend_url": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "enum": [
              "latam",
              "na",
              "us-east-1",
              "us-east-2",
              "us-west-2",
              "sa-east-1",
              "ca-central-1"
            ]
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "hostname": {
            "type": "string"
          },
          "public_ip": {
            "type": "string"
          },
          "machine_facts": {
            "type": "object"
          },
          "machine_facts_hash": {
            "type": "string"
          },
          "machine_facts_at": {
            "type": "string",
            "format": "date-time"
          },
          "cert_fingerprint": {
            "type": "string"
          },
          "cert_issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "cert_expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tenant_id",
          "role",
          "enrolled_at",
          "backend_url",
          "region"
        ],
        "additionalProperties": false
      },
      "loopback.Count": {
        "type": "object",
        "title": "loopback.Count",
        "x-typescript-type": "@loopback/repository#Count",
        "properties": {
          "count": {
            "type": "number"
          }
        }
      },
      "EnrollCode.Filter": {
        "type": "object",
        "title": "EnrollCode.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "boolean"
                  },
                  "tenant_id": {
                    "type": "boolean"
                  },
                  "region": {
                    "type": "boolean"
                  },
                  "expires_at": {
                    "type": "boolean"
                  },
                  "used": {
                    "type": "boolean"
                  },
                  "used_at": {
                    "type": "boolean"
                  },
                  "used_by": {
                    "type": "boolean"
                  },
                  "revoked": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "label": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "code",
                    "tenant_id",
                    "region",
                    "expires_at",
                    "used",
                    "used_at",
                    "used_by",
                    "revoked",
                    "created_at",
                    "label"
                  ],
                  "example": "code"
                },
                "uniqueItems": true
              }
            ],
            "title": "EnrollCode.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<EnrollCode>"
      },
      "EnrollCode.Filter1": {
        "type": "object",
        "title": "EnrollCode.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "EnrollCode.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "boolean"
                  },
                  "tenant_id": {
                    "type": "boolean"
                  },
                  "region": {
                    "type": "boolean"
                  },
                  "expires_at": {
                    "type": "boolean"
                  },
                  "used": {
                    "type": "boolean"
                  },
                  "used_at": {
                    "type": "boolean"
                  },
                  "used_by": {
                    "type": "boolean"
                  },
                  "revoked": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "boolean"
                  },
                  "label": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "code",
                    "tenant_id",
                    "region",
                    "expires_at",
                    "used",
                    "used_at",
                    "used_by",
                    "revoked",
                    "created_at",
                    "label"
                  ],
                  "example": "code"
                },
                "uniqueItems": true
              }
            ],
            "title": "EnrollCode.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<EnrollCode>"
      },
      "AgentEnroll.Filter": {
        "type": "object",
        "title": "AgentEnroll.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "AgentEnroll.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "agent_id": {
                    "type": "boolean"
                  },
                  "tenant_id": {
                    "type": "boolean"
                  },
                  "role": {
                    "type": "boolean"
                  },
                  "enrolled_at": {
                    "type": "boolean"
                  },
                  "backend_url": {
                    "type": "boolean"
                  },
                  "region": {
                    "type": "boolean"
                  },
                  "last_seen_at": {
                    "type": "boolean"
                  },
                  "hostname": {
                    "type": "boolean"
                  },
                  "public_ip": {
                    "type": "boolean"
                  },
                  "machine_facts": {
                    "type": "boolean"
                  },
                  "machine_facts_hash": {
                    "type": "boolean"
                  },
                  "machine_facts_at": {
                    "type": "boolean"
                  },
                  "cert_fingerprint": {
                    "type": "boolean"
                  },
                  "cert_issued_at": {
                    "type": "boolean"
                  },
                  "cert_expires_at": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "agent_id",
                    "tenant_id",
                    "role",
                    "enrolled_at",
                    "backend_url",
                    "region",
                    "last_seen_at",
                    "hostname",
                    "public_ip",
                    "machine_facts",
                    "machine_facts_hash",
                    "machine_facts_at",
                    "cert_fingerprint",
                    "cert_issued_at",
                    "cert_expires_at"
                  ],
                  "example": "agent_id"
                },
                "uniqueItems": true
              }
            ],
            "title": "AgentEnroll.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<AgentEnroll>"
      },
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "greeting": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "properties": {
              "Content-Type": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      }
    }
  }
}