> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/api-and-integrations/rest-api-reference/simulations.md).

# Simulations

## List simulations

> Returns the workspace's simulation runs, newest first, whether they were started via this API, the UI, or an application. Cursor-paginated; \`pagination.total\` is the count matching the current filters. Result payloads are omitted — use /simulations/{id}/results or /simulations/{id}/export/{format}. Each run carries \`exportFormats\`, decided here by model and scenario shape alone so that listing a page costs no extra reads: the formats /simulations/{id}/export/{format} accepts for it — \`\["json", "csv"]\` for a completed forecast-shaped run on a multi-environment (panel) model, \`\["json"]\` for any other completed run, \`\[]\` while a run is unfinished. Single-environment models produce no panel forecast, so they never offer csv. A \`csv\` entry here means the run is eligible by model and scenario shape. GET /simulations/{id} confirms it against the run's stored artifacts, and the export itself returns 400 if they are gone, so read the single run before offering a csv download.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"ScenarioTypeEnum":{"type":"string","enum":["optimisation","intervention","temporal_intervention","prediction","counterfactual","explanation","parent_impact","forecast","temporal_explanation","temporal_counterfactual","temporal_optimisation","panel_forecast","panel_intervention","panel_explanation","panel_counterfactual","panel_optimisation","panel_parent_impact","root_cause_analysis","temporal_root_cause_analysis","panel_root_cause_analysis","static_panel_root_cause_analysis","anomaly_detection","temporal_anomaly_detection","panel_anomaly_detection","static_panel_anomaly_detection","causal_health_monitor","panel_causal_health_monitor"]},"PaginatedEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{},"description":"Payload not declared in this repo"},"pagination":{"type":"object","properties":{"cursor":{"type":"string","description":"Pass back as ?cursor= to fetch the next page"},"hasMore":{"type":"boolean","description":"Whether a further page exists"},"total":{"type":"number","description":"Total matching rows, when the query can count them"}},"required":["hasMore"]}},"required":["data","pagination"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-simulations","summary":"List simulations","description":"Returns the workspace's simulation runs, newest first, whether they were started via this API, the UI, or an application. Cursor-paginated; `pagination.total` is the count matching the current filters. Result payloads are omitted — use /simulations/{id}/results or /simulations/{id}/export/{format}. Each run carries `exportFormats`, decided here by model and scenario shape alone so that listing a page costs no extra reads: the formats /simulations/{id}/export/{format} accepts for it — `[\"json\", \"csv\"]` for a completed forecast-shaped run on a multi-environment (panel) model, `[\"json\"]` for any other completed run, `[]` while a run is unfinished. Single-environment models produce no panel forecast, so they never offer csv. A `csv` entry here means the run is eligible by model and scenario shape. GET /simulations/{id} confirms it against the run's stored artifacts, and the export itself returns 400 if they are gone, so read the single run before offering a csv download.","tags":["Simulations"],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"description":"Page size (1-1000, default 50).","type":"number","minimum":1,"maximum":1000},"description":"Page size (1-1000, default 50)."},{"in":"query","name":"cursor","required":false,"schema":{"type":"string","description":"Opaque cursor from a previous response's `pagination.cursor`."},"description":"Opaque cursor from a previous response's `pagination.cursor`."},{"in":"query","name":"status","required":false,"schema":{"type":"string","description":"Filter by run status."},"description":"Filter by run status."},{"in":"query","name":"digitalTwinId","required":false,"schema":{"type":"string","description":"Only return runs of this digital twin."},"description":"Only return runs of this digital twin."},{"in":"query","name":"scenarioType","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ScenarioTypeEnum"}],"description":"Filter by scenario type."},"description":"Filter by scenario type."},{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Run simulation

> Runs a digital-twin simulation with a scenario. Body: digitalTwinId, digitalTwinVersionId, scenario (key-value inputs), optional environmentGroupIds, optional webhookUrl. Proxies to data-service POST /api/digital-twin/execute-run. Returns 202 with runId and links (self, results). Simulation runs asynchronously; poll GET /simulations/{runId} for status and GET /simulations/{runId}/results for outputs when ready. Inside the scenario the field naming the family is \`type\`; \`scenarioType\` is the filter on GET /simulations and is refused here by name, as is an unknown family, so a misspelling is a 422 that says which field is wrong.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"ExecuteSimulationInput":{"type":"object","properties":{"digitalTwinId":{"type":"string","description":"Id of the digital twin to simulate"},"digitalTwinVersionId":{"type":"string","description":"Id of the trained version to run against"},"scenario":{"type":"object","additionalProperties":{},"description":"Scenario configuration: the same object the platform's New Simulation wizard produces. `type` is the discriminator naming the family, and the rest of the fields are that family's inputs. The spelling depends on the twin's kind: prediction (`prediction`: sample, targetVars), forecast (`forecast` / `panel_forecast`: forecastH, targetVars), intervention (`intervention` / `temporal_intervention` / `panel_intervention`: interventions, metrics), optimisation (`optimisation` / `temporal_optimisation` / `panel_optimisation`: objectives, decisionVars), best action (`counterfactual` and variants: samples, targets), explanation (`explanation` and variants: explanationMode, causeVariable, effectVariable), root cause analysis and anomaly detection (targetVariable, samples). Note `scenarioType` is the filter on GET /simulations, not a field of this object. Worked bodies for every family: https://docs.rootcause.ai/api/rest-running-simulations. POST to the version's scenario-from-query endpoint to have the platform build one from a plain-English question."},"environmentGroupIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Multi-environment (panel) twins: saved environment groups to scope the run to. The server resolves each group's membership against the version at submit time and narrows the run to it: when the scenario also names environments the two are intersected, never unioned, so a group can only ever shrink a scenario. An empty intersection is a 400. What it resolved is frozen onto the run as environmentGroupSnapshots. Ignored by single-environment twins."},"webhookUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Optional URL called when the run completes"}},"required":["digitalTwinId","digitalTwinVersionId","scenario"]},"AsyncRunAccepted":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string","description":"pending until the run reaches a terminal status"},"createdAt":{"type":"string"},"links":{"type":"object","properties":{"self":{"type":"string","description":"Poll this until the status is terminal"},"results":{"type":"string","description":"Fetch when the run completes"}},"required":["self"]}},"required":["runId","status","links"],"description":"Envelope for asynchronous simulation runs. Poll links.self; fetch links.results when complete."}},"required":["data"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations":{"post":{"operationId":"post-api-v1-workspaces-{wsId}-simulations","summary":"Run simulation","description":"Runs a digital-twin simulation with a scenario. Body: digitalTwinId, digitalTwinVersionId, scenario (key-value inputs), optional environmentGroupIds, optional webhookUrl. Proxies to data-service POST /api/digital-twin/execute-run. Returns 202 with runId and links (self, results). Simulation runs asynchronously; poll GET /simulations/{runId} for status and GET /simulations/{runId}/results for outputs when ready. Inside the scenario the field naming the family is `type`; `scenarioType` is the filter on GET /simulations and is refused here by name, as is an unknown family, so a misspelling is a 422 that says which field is wrong.","tags":["Simulations"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteSimulationInput"}}}},"responses":{"202":{"description":"Accepted; poll the linked resource for completion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncRunAccepted"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get simulation

> Returns the simulation run by id. Read from platform MongoDB (digitalTwinRun collection). Must belong to the workspace. Includes status, inputs, metadata, and \`exportFormats\` (see the list endpoint); use /simulations/{id}/results for output data. A run submitted with \`environmentGroupIds\` also carries \`environmentGroupSnapshots\`: one entry per group ({id, name, envKeys, droppedEnvKeys, notice?}) recording the membership the server resolved at submit time. It is a frozen record, not a live read — editing or deleting the group afterwards leaves it untouched, and \`droppedEnvKeys\` names members the version could not honour.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"SimulationEnvelope":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"organisationId":{"type":"string","description":"The organisation id"},"workspaceId":{"type":"string","description":"The workspace id"},"digitalTwinId":{"type":"string","description":"The digital twin id"},"digitalTwinVersionIds":{"type":"array","items":{"type":"string"},"description":"The digital twin version ids that were used to run the simulation"},"userQuery":{"type":["string","null"],"description":"The user query that triggered the run"},"timeStarted":{"type":"string","description":"The time the run started"},"timeCompleted":{"type":["string","null"],"description":"The time the run completed"},"status":{"type":"string","enum":["pending","configuring","configured","running","completed","failed","cancelled"],"description":"The status of the run"},"error":{"type":["string","null"],"description":"The failure reason when the run failed"},"progress":{"anyOf":[{"$ref":"#/components/schemas/SimulationProgressSchema"},{"type":"null"}],"description":"The progress of the run"},"scenario":{"anyOf":[{"$ref":"#/components/schemas/DigitalTwinScenarioSchema"},{"type":"null"}],"description":"The scenario to run"},"outputs":{"anyOf":[{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/DigitalTwinPredictionResultSchema"},{"$ref":"#/components/schemas/OptimizationResultSchema"},{"$ref":"#/components/schemas/InterventionResultSchema"},{"$ref":"#/components/schemas/TimeSeriesInterventionResultSchema"},{"$ref":"#/components/schemas/MultiCounterfactualExplanationSchema"},{"$ref":"#/components/schemas/ExplanationResultSchema"},{"$ref":"#/components/schemas/ParentImpactResultSchema"},{"$ref":"#/components/schemas/TemporalExplanationResultSchema"},{"$ref":"#/components/schemas/TemporalCounterfactualExplanationSchema"},{"$ref":"#/components/schemas/TemporalOptimizationResultSchema"},{"$ref":"#/components/schemas/PanelForecastResultSchema"},{"$ref":"#/components/schemas/PanelInterventionResultSchema"},{"$ref":"#/components/schemas/PanelExplanationResultSchema"},{"$ref":"#/components/schemas/PanelCounterfactualResultSchema"},{"$ref":"#/components/schemas/PanelOptimizationResultSchema"},{"$ref":"#/components/schemas/PanelParentImpactResultSchema"},{"$ref":"#/components/schemas/RootCauseAnalysisResultSchema"},{"$ref":"#/components/schemas/PanelRootCauseAnalysisResultSchema"},{"$ref":"#/components/schemas/StaticPanelRootCauseAnalysisResultSchema"},{"$ref":"#/components/schemas/AnomalyDetectionResultSchema"},{"$ref":"#/components/schemas/TemporalAnomalyDetectionResultSchema"},{"$ref":"#/components/schemas/PanelAnomalyDetectionResultSchema"},{"$ref":"#/components/schemas/StaticPanelAnomalyDetectionResultSchema"},{"$ref":"#/components/schemas/CausalHealthMonitorResultSchema"},{"$ref":"#/components/schemas/PanelCausalHealthMonitorResultSchema"}]}},{"type":"null"}],"description":"The output of the run"},"outputsStorageType":{"anyOf":[{"type":"string","enum":["inline","data_lake"]},{"type":"null"}],"description":"Where outputs are stored"},"resultsSummary":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"keyPoints":{"type":"array","items":{"type":"string"}}},"required":["summary","keyPoints"]},{"type":"null"}],"description":"AI generated summary of the run results"},"environmentGroupSnapshots":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentGroupSnapshotSchema"}},{"type":"null"}],"description":"Resolved membership of each scoped environment group, frozen at submit"},"executedByUserId":{"type":["string","null"],"description":"The user who triggered the run"},"applicationExecutionId":{"type":["string","null"],"description":"Set when an application execution triggered the run"},"exportFormats":{"type":"array","items":{"type":"string","enum":["json","csv"]},"description":"Formats /results accepts; empty until the run completes"}},"required":["id","organisationId","workspaceId","digitalTwinId","digitalTwinVersionIds","timeStarted","status","exportFormats"]}},"required":["data"]},"SimulationProgressSchema":{"type":"object","properties":{"percentage":{"type":"number"},"state":{"type":"string"},"eta":{"type":["number","null"]}},"required":["percentage","state"]},"DigitalTwinScenarioSchema":{"anyOf":[{"$ref":"#/components/schemas/OptimisationScenarioSchema"},{"$ref":"#/components/schemas/StaticInterventionSpecSchema"},{"$ref":"#/components/schemas/TimeSeriesInterventionSpecSchema"},{"$ref":"#/components/schemas/MultiCounterfactualRequestSchema"},{"$ref":"#/components/schemas/PredictionWithUncertaintyRequestSchema"},{"$ref":"#/components/schemas/ExplanationRequestSchema"},{"$ref":"#/components/schemas/ParentImpactRequestSchema"},{"$ref":"#/components/schemas/ForecastWithUncertaintyRequestSchema"},{"$ref":"#/components/schemas/TemporalExplanationRequestSchema"},{"$ref":"#/components/schemas/TemporalCounterfactualRequestSchema"},{"$ref":"#/components/schemas/TemporalOptimisationScenarioSchema"},{"$ref":"#/components/schemas/PanelForecastRequestSchema"},{"$ref":"#/components/schemas/PanelInterventionSpecSchema"},{"$ref":"#/components/schemas/PanelExplanationRequestSchema"},{"$ref":"#/components/schemas/PanelCounterfactualRequestSchema"},{"$ref":"#/components/schemas/PanelOptimisationScenarioSchema"},{"$ref":"#/components/schemas/PanelParentImpactRequestSchema"},{"$ref":"#/components/schemas/RootCauseAnalysisRequestSchema"},{"$ref":"#/components/schemas/TemporalRootCauseAnalysisRequestSchema"},{"$ref":"#/components/schemas/PanelRootCauseAnalysisRequestSchema"},{"$ref":"#/components/schemas/StaticPanelRootCauseAnalysisRequestSchema"},{"$ref":"#/components/schemas/AnomalyDetectionRequestSchema"},{"$ref":"#/components/schemas/TemporalAnomalyDetectionRequestSchema"},{"$ref":"#/components/schemas/PanelAnomalyDetectionRequestSchema"},{"$ref":"#/components/schemas/StaticPanelAnomalyDetectionRequestSchema"},{"$ref":"#/components/schemas/CausalHealthMonitorRequestSchema"},{"$ref":"#/components/schemas/PanelCausalHealthMonitorRequestSchema"}]},"OptimisationScenarioSchema":{"type":"object","properties":{"type":{"type":"string","const":"optimisation"},"objectives":{"type":"array","items":{"$ref":"#/components/schemas/OptimisationObjectiveSchema"},"description":"The objectives to optimize"},"conditions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ConditionSchema"}},{"type":"null"}],"description":"Dead field, ignored by the optimizer: subpopulation scoping goes through segmentDefinitions + enableSegmentInterventions. Kept so stored scenarios still parse."},"decisionVars":{"type":"array","items":{"type":"string"},"description":"Variables that can be manipulated during optimization"},"variableConstraints":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/VariableConstraintSchema"}},{"type":"null"}],"description":"Constraints on variable values and changes"},"metricConstraints":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/MetricConstraintSchema"}},{"type":"null"}],"description":"Constraints on metric values"},"segmentDefinitions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}],"description":"Segment definitions for segment-aware interventions and per-segment results"},"enableSegmentInterventions":{"type":"boolean","default":false,"description":"Whether to explore segment-specific interventions"},"interventionTypes":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Map of variable name to intervention type: 'set_value', 'relative_percentage', 'relative_absolute', 'set_probability'"},"interventionCountConfig":{"anyOf":[{"$ref":"#/components/schemas/InterventionCountConfigSchema"},{"type":"null"}],"description":"Configuration for intervention count optimization"}},"required":["type","objectives","decisionVars"]},"OptimisationObjectiveSchema":{"type":"object","properties":{"direction":{"type":"string","enum":["maximise","minimise"],"description":"The direction of the optimization"},"variable":{"type":"string","description":"A descriptive name for this objective/metric (e.g., 'Total Revenue', 'Customer Churn Rate'). Used as a label, not necessarily a variable in the causal graph."},"metricSqlQuery":{"type":"string","description":"SQL query to calculate the metric"},"unit":{"$ref":"#/components/schemas/objectiveUnitReadSchema","description":"Canonical unit id (legacy keys coerced on read). Omit for objectives without a meaningful unit."},"weight":{"type":"number","default":1,"description":"Weight of this objective in multi-objective optimization"},"variablesRelevantToMetric":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Variables causally relevant to the metric"},"target":{"anyOf":[{"$ref":"#/components/schemas/OptimisationTargetSchema"},{"type":"null"}],"description":"Optional target specification (absolute value or percentage improvement)"},"conceptId":{"type":["string","null"],"description":"Ontology metric concept this SQL was materialised from, when picked from the ontology"},"conceptEditVersion":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"editVersion of the source concept at materialisation time; drift is detected against the live concept"}},"required":["direction","variable","metricSqlQuery"]},"objectiveUnitReadSchema":{"allOf":[{"anyOf":[{"not":{}},{"type":["string","null"]}]},{"type":["string","null"]}]},"OptimisationTargetSchema":{"type":"object","properties":{"type":{"type":"string","enum":["absolute","percentage"],"default":"percentage","description":"Whether target is an absolute value or percentage change from baseline"},"value":{"type":["number","null"],"description":"Target value. None means just optimize in the specified direction without a specific target."}}},"ConditionSchema":{"type":"object","properties":{"variable":{"type":"string"},"operator":{"type":"string","enum":["eq","ne","gt","lt","ge","le","in","not_in"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":["number","string","boolean"]}}]}},"required":["variable","operator","value"]},"VariableConstraintSchema":{"type":"object","properties":{"variable":{"type":"string","description":"The variable this constraint applies to"},"type":{"type":"string","enum":["range","set","conditional"],"description":"Type of constraint"},"minValue":{"type":["number","null"],"description":"Minimum allowed value (for range type)"},"maxValue":{"type":["number","null"],"description":"Maximum allowed value (for range type)"},"allowedValues":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean"]}},{"type":"null"}],"description":"List of allowed values (for set type)"},"maxChangePercent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum percentage change from baseline allowed"},"conditionalAllowedValues":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ConditionalAllowedValuesSchema"}},{"type":"null"}],"description":"Conditional allowed values based on other variable values (for conditional type)"}},"required":["variable","type"]},"ConditionalAllowedValuesSchema":{"type":"object","properties":{"condition":{"type":"object","properties":{"variable":{"type":"string"},"operator":{"type":"string","enum":["eq","ne","gt","lt","ge","le","in","not_in"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":["number","string","boolean"]}}]}},"required":["variable","operator","value"],"description":"The condition that must be met for this constraint to apply"},"allowedValues":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean"]}},{"type":"null"}],"description":"Values allowed when condition is met (used for categorical/boolean variables)"},"minValue":{"type":["number","null"],"description":"Minimum allowed value when condition is met (used for numeric variables)"},"maxValue":{"type":["number","null"],"description":"Maximum allowed value when condition is met (used for numeric variables)"}},"required":["condition"]},"MetricConstraintSchema":{"type":"object","properties":{"metricName":{"type":"string","description":"Name of the metric being constrained"},"sqlQuery":{"type":"string","description":"SQL query to calculate the metric"},"constraintType":{"type":"string","enum":["min_value","max_value","max_decrease_percent","max_increase_percent","fixed_boolean"],"description":"Type of constraint"},"value":{"type":["number","null"],"description":"Constraint value (absolute for min/max, percentage for percent types)"},"booleanValue":{"type":["boolean","null"],"description":"Boolean value for fixed_boolean constraint type"},"temporal":{"anyOf":[{"$ref":"#/components/schemas/TemporalMetricSpecSchema"},{"type":"null"}],"description":"Window the constraint is evaluated over on a temporal twin. Null means the whole forecast horizon from the first forecast step."}},"required":["metricName","sqlQuery","constraintType"]},"TemporalMetricSpecSchema":{"type":"object","properties":{"startDate":{"type":["string","null"],"description":"Evaluation start as an ISO date (UTC); the backend resolves it into startTimestampMs"},"endDate":{"type":["string","null"],"description":"Evaluation end as an ISO date (UTC), inclusive"},"startTimestampMs":{"type":["number","null"],"description":"Start timestamp (ms). Without an end the window runs intervalSteps grid steps from here; a start alone is one grid step."},"endTimestampMs":{"type":["number","null"],"description":"End timestamp (ms) inclusive. Windows narrower than one model step widen to one full step."},"intervalSteps":{"type":["number","null"],"description":"Window length in model steps when no end is given, counted from the start (or the first forecast step). Ignored when an end is set."}}},"SegmentDefinitionSchema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the segment (e.g., 'high_spenders')"},"description":{"type":["string","null"],"description":"User-friendly description of the segment"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ConditionSchema"},"description":"List of conditions (ANDed together) defining the segment membership."}},"required":["id","conditions"]},"InterventionCountConfigSchema":{"type":"object","properties":{"maxInterventions":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}],"description":"Maximum number of changes per plan. None means no limit."},"optimizeCount":{"type":"boolean","default":true,"description":"Whether to treat intervention count as an implicit minimization objective"}}},"StaticInterventionSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"intervention"},"interventions":{"type":"array","items":{"$ref":"#/components/schemas/InterventionSchema"},"description":"A list of interventions with their respective conditions"},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricSchema"},"description":"SQL queries to calculate the metrics of interest."},"variablesRelevantToMetric":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Variables causally relevant to the metric."},"segmentDefinitions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}],"description":"Optional list of segment definitions for targeted analysis of results."}},"required":["type","interventions","metrics"]},"InterventionSchema":{"type":"object","properties":{"variable":{"type":"string","description":"The variable to intervene on"},"valueSpec":{"anyOf":[{"$ref":"#/components/schemas/SetValueSpecSchema"},{"$ref":"#/components/schemas/RelativeChangeSpecSchema"},{"$ref":"#/components/schemas/SetProbabilitySpecSchema"},{"$ref":"#/components/schemas/AdjustProbabilitySpecSchema"},{"$ref":"#/components/schemas/SetMembersSpecSchema"},{"$ref":"#/components/schemas/RangeValueSpecSchema"}],"description":"Specification of how to modify the variable."},"conditions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ConditionSchema"}},{"type":"null"}],"description":"Optional conditions defining the subpopulation for intervention."},"detachFormula":{"type":["boolean","null"],"description":"Allow this intervention on a computed value. Its formula is switched off for the run: the variable takes the intervened value instead of being recomputed from its inputs, and its inputs do not move to match."}},"required":["variable","valueSpec"]},"SetValueSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"set_value"},"value":{"type":["number","string","boolean"],"description":"The specific value to set the variable to (in its original domain)."}},"required":["type","value"]},"RelativeChangeSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"relative_change"},"mode":{"type":"string","enum":["percentage","absolute"],"description":"Whether the change is a percentage or an absolute amount."},"value":{"type":"number","description":"The amount of change (e.g., 10 for +10%, -5 for -5 units)."}},"required":["type","mode","value"]},"SetProbabilitySpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"set_probability"},"category":{"type":["string","number","boolean"],"description":"The target category value (in its original domain) whose probability will be set."},"probability":{"type":"number","minimum":0,"maximum":1,"description":"The desired probability for the specified category (0.0 to 1.0). Other probabilities will be renormalized."}},"required":["type","category","probability"]},"AdjustProbabilitySpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"adjust_probability"},"category":{"type":["string","number","boolean"],"description":"The target category value whose probability will be adjusted."},"delta":{"type":"number","description":"Percentage-point shift (e.g. 10 means +10pp, -5 means -5pp)."}},"required":["type","category","delta"]},"SetMembersSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"set_members"},"include":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Members to include in the set"},"exclude":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Members to exclude from the set"},"size":{"type":["number","null"],"description":"Fix the set size"},"replace":{"type":"boolean","description":"If true, zero out all members not in include"}},"required":["type"]},"RangeValueSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"range"},"from":{"type":["number","null"],"description":"First value of the grid, in the variable's original domain. Omit to start at the low end of the observed range."},"to":{"type":["number","null"],"description":"Last value of the grid, in the variable's original domain. Omit to end at the high end of the observed range."},"steps":{"anyOf":[{"type":"integer","minimum":2,"maximum":50},{"type":"null"}],"description":"Number of evenly spaced grid points, inclusive of both bounds (2-50). Omit to let the twin family pick — 20 for a static sweep, fewer for temporal families where one point is a whole forecast."}},"required":["type"]},"MetricSchema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the metric"},"sqlQuery":{"type":"string","description":"The SQL query to calculate the metric"},"unit":{"allOf":[{"anyOf":[{"not":{}},{"type":["string","null"]}]},{"type":["string","null"]}],"description":"Canonical unit id (legacy keys coerced on read)"},"higherIsBetter":{"type":"boolean","default":true,"description":"Whether a higher value is better for this metric"},"temporal":{"anyOf":[{"$ref":"#/components/schemas/TemporalMetricSpecSchema"},{"type":"null"}],"description":"Temporal evaluation window for time-aware metrics. Null means the whole forecast horizon from the first forecast step. Ignored by non-temporal twins."},"conceptId":{"type":["string","null"],"description":"Ontology metric concept this SQL was materialised from, when picked from the ontology"},"conceptEditVersion":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"editVersion of the source concept at materialisation time; drift is detected against the live concept"}},"required":["name","sqlQuery"]},"TimeSeriesInterventionSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"temporal_intervention"},"interventions":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"},{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}}]},"description":"A list of time series interventions or sequences (nested lists) for time series models"},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricSchema"},"description":"SQL queries to calculate the metrics of interest."},"variablesRelevantToMetric":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Variables causally relevant to the metric."},"segmentDefinitions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}],"description":"Optional list of segment definitions for targeted analysis of results."}},"required":["type","interventions","metrics"]},"TimeSeriesInterventionSchema":{"type":"object","properties":{"variable":{"type":"string","description":"The variable to intervene on"},"valueSpec":{"anyOf":[{"$ref":"#/components/schemas/SetValueSpecSchema"},{"$ref":"#/components/schemas/RelativeChangeSpecSchema"},{"$ref":"#/components/schemas/SetProbabilitySpecSchema"},{"$ref":"#/components/schemas/AdjustProbabilitySpecSchema"},{"$ref":"#/components/schemas/SetMembersSpecSchema"},{"$ref":"#/components/schemas/RangeValueSpecSchema"}],"description":"Specification of how to modify the variable."},"conditions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ConditionSchema"}},{"type":"null"}],"description":"Optional conditions defining the subpopulation for intervention."},"detachFormula":{"type":["boolean","null"],"description":"Allow this intervention on a computed value. Its formula is switched off for the run: the variable takes the intervened value instead of being recomputed from its inputs, and its inputs do not move to match."},"timestamp":{"type":["number","null"],"description":"The timestamp to intervene at (for temporal models)"},"persistent":{"type":["boolean","null"],"description":"If True, intervention persists from timestamp onwards. If False, applies only at that timestamp. Only used for temporal models."},"durationSteps":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Hold the value for this many steps starting at the timestamp, then release. Overrides persistent when set (>1). Only used for temporal models."},"rampSteps":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of steps to gradually reach this intervention's value. Within a sequence, ramps from the previous state; on a single intervention, ramps from baseline (relative changes only)."}},"required":["variable","valueSpec"]},"MultiCounterfactualRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"counterfactual"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"List of initial samples"},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}],"description":"Datalake reference replacing inline samples"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/CounterfactualTargetSchema"},"description":"Target variables to change for all samples"},"constraints":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CounterfactualVariableConstraintSchema"}},{"type":"null"}],"description":"Constraints defining the search space (applied individually per sample). Variables not mentioned or without a FixedConstraint are implicitly changeable."},"maxChanges":{"type":"number","default":3,"description":"Maximum number of variables to change per sample"}},"required":["type","targets"]},"ScenarioSamplesRefSchema":{"type":"object","properties":{"key":{"type":"string","description":"Datalake object key holding the JSON-encoded samples array"},"format":{"type":"string","enum":["json"],"default":"json"},"rowCount":{"type":"integer","minimum":0,"description":"Number of rows in the referenced blob"}},"required":["key","rowCount"]},"CounterfactualTargetSchema":{"type":"object","properties":{"variable":{"type":"string","description":"The target variable name"},"value":{"description":"The desired value for this target variable"},"matchMode":{"$ref":"#/components/schemas/CounterfactualMatchModeSchema","default":"tolerance","description":"How to decide whether a prediction meets this target: tolerance band, >= target, or <= target."},"toleranceType":{"anyOf":[{"$ref":"#/components/schemas/CounterfactualToleranceTypeSchema"},{"type":"null"}],"description":"When matchMode='tolerance': percentage of |target| or absolute units."},"toleranceValue":{"type":["number","null"],"description":"When matchMode='tolerance': width of the tolerance band (>=0). None/0 means exact match."}},"required":["variable"]},"CounterfactualMatchModeSchema":{"type":"string","enum":["tolerance","orMore","orLess"]},"CounterfactualToleranceTypeSchema":{"type":"string","enum":["percentage","absolute"]},"CounterfactualVariableConstraintSchema":{"anyOf":[{"$ref":"#/components/schemas/RangeConstraintSchema"},{"$ref":"#/components/schemas/SetConstraintSchema"},{"$ref":"#/components/schemas/FixedConstraintSchema"}]},"RangeConstraintSchema":{"type":"object","properties":{"type":{"type":"string","const":"range"},"minValue":{"type":["number","null"],"description":"Minimum allowed value (inclusive)"},"maxValue":{"type":["number","null"],"description":"Maximum allowed value (inclusive)"}},"required":["type"]},"SetConstraintSchema":{"type":"object","properties":{"type":{"type":"string","const":"set"},"allowedValues":{"type":"array","items":{"type":["string","number","boolean"]},"description":"List of explicitly allowed values."}},"required":["type","allowedValues"]},"FixedConstraintSchema":{"type":"object","properties":{"type":{"type":"string","const":"fixed"}},"required":["type"]},"PredictionWithUncertaintyRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"prediction"},"sample":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Samples to predict for"},"sampleRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}],"description":"Datalake reference replacing inline sample"},"targetVars":{"type":"array","items":{"type":"string"},"description":"Target variables to predict"},"confidenceLevel":{"type":["number","null"],"default":0.95,"description":"Confidence level for intervals"}},"required":["type","targetVars"]},"ExplanationRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"explanation"},"explanationMode":{"anyOf":[{"$ref":"#/components/schemas/ExplanationModeSchema"},{"type":"null"}],"description":"Explicit explanation mode selection"},"causeVariable":{"type":["string","null"],"description":"The cause variable to explain"},"effectVariable":{"type":["string","null"],"description":"The effect variable to explain"},"segments":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}],"description":"The segments to explain"}},"required":["type"]},"ExplanationModeSchema":{"type":"string","enum":["directional","discovery","impact"]},"ParentImpactRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"parent_impact"},"nodes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Nodes to analyze. None = all non-latent nodes with parents"},"nSamples":{"type":"number","default":500,"description":"Samples per do() contrast (static twins only)"},"horizonOverride":{"type":["number","null"],"description":"Attribution forecast window override (temporal twins only)"}},"required":["type"]},"ForecastWithUncertaintyRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"forecast"},"forecastFrom":{"type":["number","null"],"description":"Timestamp of the forecast start"},"forecastH":{"type":"number","description":"Number of steps to forecast"},"targetVars":{"type":"array","items":{"type":"string"},"description":"Target variables to forecast"},"confidenceLevel":{"type":["number","null"],"default":0.95,"description":"Confidence level for intervals"},"originTimestamp":{"type":["number","null"],"description":"Forecast as-of timestamp (ms epoch). Overrides forecastFrom when set."}},"required":["type","forecastH","targetVars"]},"TemporalExplanationRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"temporal_explanation"},"explanationMode":{"anyOf":[{"$ref":"#/components/schemas/ExplanationModeSchema"},{"type":"null"}],"description":"Explicit explanation mode selection"},"causeVariable":{"type":["string","null"]},"effectVariable":{"type":["string","null"]},"causeVariables":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Multi-select cause variables for directional mode"},"effectVariables":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Multi-select effect variables for directional mode"},"segments":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}]},"forecastHorizonOverride":{"type":["number","null"]}},"required":["type"]},"TemporalCounterfactualRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"temporal_counterfactual"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/TemporalCounterfactualTargetSchema"}},"constraints":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CounterfactualVariableConstraintSchema"}},{"type":"null"}]},"maxChanges":{"type":"number","default":3},"forecastHorizon":{"type":["number","null"]}},"required":["type","targets"]},"TemporalCounterfactualTargetSchema":{"type":"object","properties":{"variable":{"type":"string"},"value":{},"timestamp":{"type":["number","null"]},"aggregation":{"type":"string","enum":["point","mean","cumulative"],"default":"point"},"targetMode":{"$ref":"#/components/schemas/TargetModeSchema"},"matchMode":{"anyOf":[{"$ref":"#/components/schemas/CounterfactualMatchModeSchema"},{"type":"null"}],"description":"Left unset, each aggregation keeps its own rule: a 10% band for point and mean, at-least for cumulative. A value overrides that."},"toleranceType":{"anyOf":[{"$ref":"#/components/schemas/CounterfactualToleranceTypeSchema"},{"type":"null"}]},"toleranceValue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["variable"]},"TargetModeSchema":{"type":"string","enum":["absolute","relative_percentage","relative_absolute"],"default":"absolute"},"TemporalOptimisationScenarioSchema":{"type":"object","properties":{"type":{"type":"string","const":"temporal_optimisation"},"objectives":{"type":"array","items":{"$ref":"#/components/schemas/TemporalOptimisationObjectiveSchema"}},"decisionVars":{"type":"array","items":{"type":"string"}},"variableConstraints":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/VariableConstraintSchema"}},{"type":"null"}]},"metricConstraints":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/MetricConstraintSchema"}},{"type":"null"}]},"interventionTiming":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TemporalInterventionTimingSchema"}},{"type":"null"}]},"forecastHorizon":{"type":"number"},"interventionCountConfig":{"anyOf":[{"$ref":"#/components/schemas/InterventionCountConfigSchema"},{"type":"null"}]}},"required":["type","objectives","decisionVars","forecastHorizon"]},"TemporalOptimisationObjectiveSchema":{"type":"object","properties":{"direction":{"type":"string","enum":["maximise","minimise"]},"variable":{"type":"string"},"metricSqlQuery":{"type":"string"},"weight":{"type":"number","default":1},"temporal":{"anyOf":[{"$ref":"#/components/schemas/TemporalMetricSpecSchema"},{"type":"null"}]},"discountFactor":{"type":"number","default":1},"conceptId":{"type":["string","null"]},"conceptEditVersion":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"required":["direction","variable","metricSqlQuery"]},"TemporalInterventionTimingSchema":{"type":"object","properties":{"variable":{"type":"string"},"earliestTimestamp":{"type":["number","null"]},"latestTimestamp":{"type":["number","null"]},"allowRamping":{"type":"boolean","default":true},"maxRampSteps":{"type":["number","null"]}},"required":["variable"]},"PanelForecastRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_forecast"},"forecastH":{"type":"number","description":"Number of steps to forecast"},"targetVars":{"type":"array","items":{"type":"string"},"description":"Target variables to forecast"},"confidenceLevel":{"type":["number","null"],"default":0.95,"description":"Confidence level for intervals"},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific environments to forecast. None = all environments"},"aggregateMode":{"anyOf":[{"$ref":"#/components/schemas/AggregateModeEnum"},{"type":"null"}],"description":"How to aggregate across environments. Unset defaults to avg at execution — every panel forecast stores an aggregate"},"originTimestamp":{"type":["number","null"],"description":"Forecast as-of timestamp (ms epoch). Overrides forecastFrom per environment."}},"required":["type","forecastH","targetVars"]},"AggregateModeEnum":{"type":"string","enum":["sum","avg","min","max"]},"PanelInterventionSpecSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_intervention"},"interventions":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"},{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}}]},"description":"A list of interventions or sequences"},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the metric"},"sqlQuery":{"type":"string","description":"The SQL query to calculate the metric"},"unit":{"allOf":[{"anyOf":[{"not":{}},{"type":["string","null"]}]},{"type":["string","null"]}],"description":"Canonical unit id (legacy keys coerced on read)"},"higherIsBetter":{"type":"boolean","default":true,"description":"Whether a higher value is better for this metric"},"temporal":{"anyOf":[{"$ref":"#/components/schemas/TemporalMetricSpecSchema"},{"type":"null"}],"description":"Temporal evaluation spec for time-aware metrics. Null for static panel models."},"conceptId":{"type":["string","null"],"description":"Ontology metric concept this SQL was materialised from, when picked from the ontology"},"conceptEditVersion":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"editVersion of the source concept at materialisation time; drift is detected against the live concept"}},"required":["name","sqlQuery"]},"description":"SQL queries to calculate the metrics of interest."},"variablesRelevantToMetric":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Variables causally relevant to the metric."},"segmentDefinitions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}],"description":"Optional list of segment definitions"},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific environments for intervention. None = all environments"}},"required":["type","interventions","metrics"]},"PanelExplanationRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_explanation"},"explanationMode":{"anyOf":[{"$ref":"#/components/schemas/ExplanationModeSchema"},{"type":"null"}],"description":"Explicit explanation mode selection"},"causeVariable":{"type":["string","null"]},"effectVariable":{"type":["string","null"]},"segments":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SegmentDefinitionSchema"}},{"type":"null"}]},"forecastHorizonOverride":{"type":["number","null"]},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific environments for explanation. None = all environments"}},"required":["type"]},"PanelCounterfactualRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_counterfactual"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/TemporalCounterfactualTargetSchema"}},"constraints":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CounterfactualVariableConstraintSchema"}},{"type":"null"}]},"maxChanges":{"type":"number","default":3},"forecastHorizon":{"type":["number","null"]},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific environments for counterfactual. None = all environments"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Multi-environment static panels only: baseline states to improve, applied in every environment in scope. Temporal panels solve from the twin's own trajectory and ignore this."}},"required":["type","targets"]},"PanelOptimisationScenarioSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_optimisation"},"objectives":{"type":"array","items":{"$ref":"#/components/schemas/TemporalOptimisationObjectiveSchema"}},"decisionVars":{"type":"array","items":{"type":"string"}},"variableConstraints":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/VariableConstraintSchema"}},{"type":"null"}]},"metricConstraints":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/MetricConstraintSchema"}},{"type":"null"}]},"interventionTiming":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TemporalInterventionTimingSchema"}},{"type":"null"}]},"forecastHorizon":{"type":["number","null"]},"interventionCountConfig":{"anyOf":[{"$ref":"#/components/schemas/InterventionCountConfigSchema"},{"type":"null"}]},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific environments for optimisation. None = all environments"}},"required":["type","objectives","decisionVars"]},"PanelParentImpactRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_parent_impact"},"nodes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Nodes to analyze. None = all non-latent nodes with parents"},"nSamples":{"type":"number","default":500,"description":"Samples per do() contrast (static twins only)"},"horizonOverride":{"type":["number","null"],"description":"Attribution forecast window override (temporal twins only)"},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specific environments for parent impact. None = all environments"}},"required":["type"]},"RootCauseAnalysisRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"root_cause_analysis"},"targetVariable":{"type":"string"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5}},"required":["type","targetVariable"]},"TemporalRootCauseAnalysisRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"temporal_root_cause_analysis"},"targetVariable":{"type":"string"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"anomalyTimestep":{"type":["number","null"]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5}},"required":["type","targetVariable"]},"PanelRootCauseAnalysisRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_root_cause_analysis"},"targetVariable":{"type":"string"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"anomalyTimestep":{"type":["number","null"]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"panelSamples":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{}}}},{"type":"null"}]},"panelSamplesRef":{"anyOf":[{"$ref":"#/components/schemas/PanelScenarioSamplesRefSchema"},{"type":"null"}]}},"required":["type","targetVariable"]},"PanelScenarioSamplesRefSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"}},"StaticPanelRootCauseAnalysisRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"static_panel_root_cause_analysis"},"targetVariable":{"type":"string"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"panelSamples":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{}}}},{"type":"null"}]},"panelSamplesRef":{"anyOf":[{"$ref":"#/components/schemas/PanelScenarioSamplesRefSchema"},{"type":"null"}]}},"required":["type","targetVariable"]},"AnomalyDetectionRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"anomaly_detection"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"autoRca":{"type":"boolean","default":true}},"required":["type"]},"TemporalAnomalyDetectionRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"temporal_anomaly_detection"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"startStep":{"type":["number","null"]},"endStep":{"type":["number","null"]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"autoRcaTopK":{"type":"integer","minimum":0,"default":1}},"required":["type"]},"PanelAnomalyDetectionRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_anomaly_detection"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"startStep":{"type":["number","null"]},"endStep":{"type":["number","null"]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"autoRcaTopK":{"type":"integer","minimum":0,"default":1},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"panelSamples":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{}}}},{"type":"null"}]},"panelSamplesRef":{"anyOf":[{"$ref":"#/components/schemas/PanelScenarioSamplesRefSchema"},{"type":"null"}]}},"required":["type"]},"StaticPanelAnomalyDetectionRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"static_panel_anomaly_detection"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"autoRca":{"type":"boolean","default":true},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"panelSamples":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{}}}},{"type":"null"}]},"panelSamplesRef":{"anyOf":[{"$ref":"#/components/schemas/PanelScenarioSamplesRefSchema"},{"type":"null"}]}},"required":["type"]},"CausalHealthMonitorRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"causal_health_monitor"},"dataSource":{"$ref":"#/components/schemas/ChmDataSourceSchema","default":"observed"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"forecastHorizon":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"startStep":{"type":["number","null"]},"endStep":{"type":["number","null"]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"autoRca":{"type":"boolean","default":true}},"required":["type"]},"ChmDataSourceSchema":{"type":"string","enum":["observed","forecast"]},"PanelCausalHealthMonitorRequestSchema":{"type":"object","properties":{"type":{"type":"string","const":"panel_causal_health_monitor"},"dataSource":{"$ref":"#/components/schemas/ChmDataSourceSchema","default":"observed"},"samples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"samplesRef":{"anyOf":[{"$ref":"#/components/schemas/ScenarioSamplesRefSchema"},{"type":"null"}]},"forecastHorizon":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"startStep":{"type":["number","null"]},"endStep":{"type":["number","null"]},"targetFpr":{"type":"number","minimum":0.0001,"maximum":0.1,"default":0.005},"parentToleranceSigma":{"type":"number","default":0.5},"autoRca":{"type":"boolean","default":true},"environments":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"panelSamples":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{}}}},{"type":"null"}]},"panelSamplesRef":{"anyOf":[{"$ref":"#/components/schemas/PanelScenarioSamplesRefSchema"},{"type":"null"}]}},"required":["type"]},"DigitalTwinPredictionResultSchema":{"type":"object","properties":{"results":{"type":"object","additionalProperties":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/CategoricalPredictionRecordSchema"},{"$ref":"#/components/schemas/ContinuousPredictionRecordSchema"}]}}},"changepoints":{"anyOf":[{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ForecastChangepointSchema"}}},{"type":"null"}],"description":"Detected changepoints per variable"},"history":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ForecastHistorySeriesSchema"}},{"type":"null"}],"description":"Per-variable trailing observed history from the model's stored training series"}},"required":["results"]},"CategoricalPredictionRecordSchema":{"type":"object","properties":{"timestamp":{"type":["number","null"],"description":"Timestamp of the prediction"},"prediction":{"description":"Predicted class (most likely) in decoded format"},"probabilities":{"type":"array","items":{"type":"number"},"description":"Raw predicted probabilities for each class"},"lowerBound":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Lower bounds of confidence intervals for probabilities"},"upperBound":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Upper bounds of confidence intervals for probabilities"},"confidenceLevel":{"type":["number","null"],"description":"Confidence level for bounds"}},"required":["probabilities"]},"ContinuousPredictionRecordSchema":{"type":"object","properties":{"timestamp":{"type":["number","null"],"description":"Timestamp of the prediction"},"prediction":{"type":["number","null"],"description":"Predicted value in decoded format"},"std":{"type":["number","null"],"description":"Standard deviation of prediction in decoded scale"},"lowerBound":{"type":["number","null"],"description":"Lower bound of confidence interval in decoded format"},"upperBound":{"type":["number","null"],"description":"Upper bound of confidence interval in decoded format"},"confidenceLevel":{"type":["number","null"],"description":"Confidence level for bounds"},"attribution":{"anyOf":[{"$ref":"#/components/schemas/ForecastComponentAttributionSchema"},{"type":"null"}],"description":"Component attribution for this prediction step"}}},"ForecastComponentAttributionSchema":{"type":"object","properties":{"trend":{"type":["number","null"],"description":"Adaptive trend contribution"},"seasonal":{"type":["number","null"],"description":"Seasonal component contribution"},"parents":{"type":["number","null"],"description":"Total parent causal effect"},"delta":{"type":["number","null"],"description":"Level/drift contribution"},"parentBreakdown":{"anyOf":[{"type":"object","additionalProperties":{"anyOf":[{"not":{}},{"type":["number","null"]}]}},{"type":"null"}],"description":"Per-parent contribution breakdown"}}},"ForecastChangepointSchema":{"type":"object","properties":{"stepIndex":{"type":"number","description":"Step index where changepoint occurs"},"timestamp":{"type":"number","description":"Timestamp of the changepoint"},"direction":{"type":"string","enum":["up","down","inflection"],"description":"Direction of the change"},"magnitude":{"type":"number","description":"Magnitude of the change"},"primaryDriver":{"type":"string","description":"Primary driver of the change"},"driverContribution":{"type":"number","description":"Contribution of the primary driver"}},"required":["stepIndex","timestamp","direction","magnitude","primaryDriver","driverContribution"]},"ForecastHistorySeriesSchema":{"type":"object","properties":{"timestamps":{"type":"array","items":{"type":"number"},"description":"Trailing observed-history timestamps in ms, ending at the model's last training step"},"values":{"type":"array","items":{"type":["number","null"]},"description":"Observed values aligned with timestamps; null entries mark missing source rows"}},"required":["timestamps","values"]},"OptimizationResultSchema":{"type":"object","properties":{"paretoFront":{"type":"array","items":{"$ref":"#/components/schemas/ParetoDominantSolutionSchema"},"description":"Pareto-optimal solutions"},"optimizationTrace":{"type":"array","items":{"$ref":"#/components/schemas/OptimizationTraceSchema"},"description":"Record of optimization progress"},"baselineMetrics":{"type":"object","additionalProperties":{"type":"number"},"description":"Baseline metrics for objectives"},"constraintBaselineMetrics":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Baseline metrics for constraint metrics"},"balancedSolution":{"anyOf":[{"$ref":"#/components/schemas/ParetoDominantSolutionSchema"},{"type":"null"}],"description":"Balanced solution closest to ideal point (for multi-objective)"},"bestPerObjective":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ParetoDominantSolutionSchema"}},{"type":"null"}],"description":"Best solution for each individual objective"},"allConstraintsSatisfiable":{"type":"boolean","default":true,"description":"Whether any solution satisfying all constraints was found"},"executionTime":{"type":"number","default":0,"description":"Execution time in seconds"},"metricScaleBases":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MetricScaleBasisSchema"}},{"type":"null"}],"description":"Per-metric scale basis: intensive metrics read directly from the simulation, extensive ones are rescaled to the source data's row count"}},"required":["paretoFront","optimizationTrace","baselineMetrics"]},"ParetoDominantSolutionSchema":{"type":"object","properties":{"interventions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Interventions in this solution"},"interventionCount":{"type":"number","default":0,"description":"Number of interventions in this solution"},"objectiveValues":{"type":"object","additionalProperties":{"type":"number"},"description":"Values of the objectives"},"implementationDifficulty":{"type":["number","null"],"description":"Difficulty of implementing this solution"},"expectedOutcomes":{"type":"object","additionalProperties":{},"description":"Expected outcomes of the solution"},"uncertainty":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}},"description":"Uncertainty in objective values"},"improvementOverBaseline":{"type":"object","additionalProperties":{"type":"number"},"description":"Improvements over baseline"},"constraintsSatisfied":{"type":"boolean","default":true,"description":"Whether all constraints were satisfied by this solution"},"constraintViolations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Descriptions of constraint violations if any"},"targetsAchieved":{"anyOf":[{"type":"object","additionalProperties":{"type":"boolean"}},{"type":"null"}],"description":"Whether each objective's target was achieved"},"segmentResults":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}}},{"type":"null"}],"description":"Per-segment objective values: {segment_id: {objective_name: value}}"},"segmentSampleSizes":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Per-segment sample sizes: {segment_id: sample_count}"},"segmentInterventions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Segment-specific interventions with conditions"},"totalSampleCount":{"type":["number","null"]},"affectedSampleCount":{"type":["number","null"]},"affectedPercentage":{"type":["number","null"]},"appliedInterventions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/InterventionSchema"}},{"type":"null"}],"description":"The exact intervention rows the evaluator ran for this plan, after scoping and relative-mode conversion"},"interventionResult":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesInterventionResultSchema"},{"$ref":"#/components/schemas/InterventionResultSchema"}]},{"type":"null"}],"description":"The plan re-run as an intervention scenario; null on older runs, panel temporal runs, and when the plan's run failed"}},"required":["interventions","objectiveValues","expectedOutcomes","uncertainty","improvementOverBaseline"]},"TimeSeriesInterventionResultSchema":{"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricResultSchema"},"description":"Intervention metrics"},"sampleSize":{"type":"number","description":"Number of samples used"},"causalPaths":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Causal paths from intervention to target"},"causalPathsByMetric":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"description":"Causal paths per metric name"},"segmentAnalysis":{"type":"array","items":{"$ref":"#/components/schemas/SegmentEffectSchema"},"description":"Segment-specific effects"},"uncertainty":{"type":"object","properties":{"meanEffect":{"type":"number","description":"Mean effect"},"stdEffect":{"type":"number","description":"Standard deviation of effect"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval"},"confidenceLevel":{"type":"number","description":"Confidence level"},"pValue":{"type":"number","description":"P-value testing null hypothesis of no effect"},"significant":{"type":"boolean","description":"Whether the effect is statistically significant"},"robustnessValue":{"type":["number","null"],"description":"Cinelli-Hazlett robustness value: share of residual variance an unmeasured confounder must explain in both treatment and outcome to move the estimate to the null (0..1)"},"eValue":{"type":["number","null"],"description":"E-value on the risk-ratio scale; only present for binary-rate metrics"},"eValueCiLimit":{"type":["number","null"],"description":"E-value for the confidence-interval limit closest to the null"},"baselineInterval":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Percentile interval of the resampled baseline reading, on the metric's scale, at confidenceLevel"}},"required":["meanEffect","stdEffect","confidenceInterval","confidenceLevel","pValue","significant"],"description":"Uncertainty quantification"},"uncertainties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InterventionUncertaintySchema"},"description":"Per-metric bootstrap uncertainties"},"mediatorShifts":{"$ref":"#/components/schemas/MediatorShiftsSchema","description":"Per-metric mediator shifts: {metricName: {mediators: [...], paths: {...}}}"},"robustness":{"$ref":"#/components/schemas/InterventionRobustnessScoreInlineSchema","description":"Robustness score for panel data interventions"},"interventionValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Pre/post value per intervened variable: {variable: {baseline, intervention}}"},"sweptVariable":{"type":["string","null"],"description":"Variable swept by a `range` intervention, when the scenario carried one"},"sweptMode":{"anyOf":[{"type":"string","enum":["absolute","percentage"]},{"type":"null"}],"description":"Units of the sweep grid — percentage grids apply relative changes and share units with percent dials"},"doseResponse":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DoseResponseAnalysisSchema"}},{"type":"null"}],"description":"Per-metric sweep curve keyed by metric name, present only for range scenarios"},"executionTime":{"type":"number","description":"Execution time in seconds"},"originalInterventions":{"anyOf":[{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"},{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}}]}},{"type":"null"}],"description":"Original intervention spec as provided by user (preserves sequences and ramps)"},"expandedInterventions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}},"description":"Mapping from timestamp to the concrete interventions applied at that time"},"forecastData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesForecastSchema"},"description":"Time series forecasts for intervened variables, mediators, and outcomes"},"forecastStartMs":{"type":["number","null"],"description":"First forecast grid timestamp (ms): the step after the training data ends"},"forecastEndMs":{"type":["number","null"],"description":"Last forecast grid timestamp (ms, inclusive)"}},"required":["metrics","sampleSize","uncertainty","executionTime"]},"MetricResultSchema":{"type":"object","properties":{"name":{"type":"string"},"baseline":{"type":["number","null"],"description":"Metric value for the baseline segment; null when the metric window produced no evaluable result"},"intervention":{"type":["number","null"],"description":"Metric value for the intervention segment; null when the metric window produced no evaluable result"},"windowStartMs":{"type":["number","null"],"description":"First forecast grid timestamp (ms, inclusive) the metric SQL was evaluated over; temporal twins only"},"windowEndMs":{"type":["number","null"],"description":"Last forecast grid timestamp (ms, inclusive) the metric SQL was evaluated over; temporal twins only"}},"required":["name"]},"SegmentEffectSchema":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the segment definition used"},"description":{"type":"string","description":"Description of the segment"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ConditionSchema"},"description":"Conditions defining the segment"},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricResultSchema"},"description":"Calculated metrics for this segment (e.g., baseline, intervention, effect). NaN if calculation failed."},"baselineSampleSize":{"type":"number","description":"Number of samples in the baseline segment"},"interventionSampleSize":{"type":"number","description":"Number of samples in the intervention segment"},"mediatorShifts":{"$ref":"#/components/schemas/MediatorShiftsSchema","description":"Per-metric mediator shifts: {metricName: {mediators: [...], paths: {...}}}"}},"required":["id","conditions","metrics","baselineSampleSize","interventionSampleSize"]},"MediatorShiftsSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediatorShiftsForMetricSchema"}},"MediatorShiftsForMetricSchema":{"type":"object","properties":{"mediators":{"type":"array","items":{"$ref":"#/components/schemas/MediatorShiftSchema"}},"paths":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"string"}}}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/MediatorShiftSchema"},"description":"Before/after distributions for the path endpoints — intervened variables and metric-source columns; absent on runs stored before it existed"}},"required":["mediators"]},"MediatorShiftSchema":{"anyOf":[{"$ref":"#/components/schemas/MediatorNumericShiftSchema"},{"$ref":"#/components/schemas/MediatorCategoricalShiftSchema"}]},"MediatorNumericShiftSchema":{"type":"object","properties":{"variable":{"type":"string"},"type":{"type":"string","const":"numeric"},"baselineMean":{"type":"number"},"interventionMean":{"type":"number"},"deltaMean":{"type":"number"},"baselineStd":{"type":"number"},"interventionStd":{"type":"number"},"scope":{"type":"string","enum":["cohort","population"],"description":"Which rows the before/after covers: 'cohort' is the rows a conditioned intervention touched; absent or 'population' is every row, which is what runs stored before cohort scoping existed"}},"required":["variable","type","baselineMean","interventionMean","deltaMean"]},"MediatorCategoricalShiftSchema":{"type":"object","properties":{"variable":{"type":"string"},"type":{"type":"string","const":"categorical"},"baselineProbs":{"type":"object","additionalProperties":{"type":"number"}},"interventionProbs":{"type":"object","additionalProperties":{"type":"number"}},"deltaProbs":{"type":"object","additionalProperties":{"type":"number"}},"tv":{"type":"number"},"scope":{"type":"string","enum":["cohort","population"],"description":"Which rows the before/after covers: 'cohort' is the rows a conditioned intervention touched; absent or 'population' is every row, which is what runs stored before cohort scoping existed"}},"required":["variable","type","baselineProbs","interventionProbs","deltaProbs","tv"]},"InterventionUncertaintySchema":{"type":"object","properties":{"meanEffect":{"type":"number","description":"Mean effect"},"stdEffect":{"type":"number","description":"Standard deviation of effect"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval"},"confidenceLevel":{"type":"number","description":"Confidence level"},"pValue":{"type":"number","description":"P-value testing null hypothesis of no effect"},"significant":{"type":"boolean","description":"Whether the effect is statistically significant"},"robustnessValue":{"type":["number","null"],"description":"Cinelli-Hazlett robustness value: share of residual variance an unmeasured confounder must explain in both treatment and outcome to move the estimate to the null (0..1)"},"eValue":{"type":["number","null"],"description":"E-value on the risk-ratio scale; only present for binary-rate metrics"},"eValueCiLimit":{"type":["number","null"],"description":"E-value for the confidence-interval limit closest to the null"},"baselineInterval":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Percentile interval of the resampled baseline reading, on the metric's scale, at confidenceLevel"}},"required":["meanEffect","stdEffect","confidenceInterval","confidenceLevel","pValue","significant"]},"InterventionRobustnessScoreInlineSchema":{"type":"object","properties":{"overallScore":{"type":"number"},"edgeStabilityScore":{"type":"number"},"coefficientStabilityScore":{"type":["number","null"]},"environmentCoverageScore":{"type":["number","null"]},"warnings":{"type":"array","items":{"type":"string"},"default":[]},"recommendation":{"type":"string"}},"required":["overallScore","edgeStabilityScore","recommendation"]},"DoseResponseAnalysisSchema":{"type":"object","properties":{"points":{"type":"array","items":{"$ref":"#/components/schemas/DoseResponsePointSchema"},"description":"Points along the dose-response curve"},"isLinear":{"type":"boolean","description":"Whether the relationship appears linear"},"inflectionPoints":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Values where effect direction changes"},"referenceValue":{"type":"number","description":"Reference value for dose-response analysis"}},"required":["points","isLinear","referenceValue"]},"DoseResponsePointSchema":{"type":"object","properties":{"causeValue":{"type":"number","description":"Value of the cause variable"},"effectMean":{"type":"number","description":"Mean effect at this cause value"},"effectStd":{"type":"number","description":"Standard deviation of effect"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval for effect"},"deltaVector":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Change in probability distribution"}},"required":["causeValue","effectMean","effectStd","confidenceInterval"]},"TimeSeriesForecastSchema":{"type":"object","properties":{"variable":{"type":"string","description":"Variable name"},"timestamps":{"type":"array","items":{"type":"number"},"description":"Timestamps in milliseconds"},"baselineMean":{"type":"array","items":{"type":"number"},"description":"Mean values under baseline"},"baselineStd":{"type":"array","items":{"type":"number"},"description":"Std dev under baseline"},"interventionMean":{"type":"array","items":{"type":"number"},"description":"Mean values under intervention"},"interventionStd":{"type":"array","items":{"type":"number"},"description":"Std dev under intervention"},"categories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Ordered category labels when the variable is categorical; null for numeric variables"},"baselineProbs":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"null"}],"description":"Per-timestep category probabilities under baseline, shape [timestep][category]"},"interventionProbs":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"null"}],"description":"Per-timestep category probabilities under intervention, shape [timestep][category]"},"interventionTimestamp":{"type":["number","null"],"description":"When intervention started (if applicable)"},"historyTimestamps":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Trailing observed-history timestamps in ms, ending at the forecast start boundary; absent on categorical variables and results stored before this field existed"},"historyValues":{"anyOf":[{"type":"array","items":{"type":["number","null"]}},{"type":"null"}],"description":"Observed values aligned with historyTimestamps; null entries mark missing source rows"},"isIntervened":{"type":"boolean","description":"Whether this variable was directly intervened on"},"isMediator":{"type":"boolean","description":"Whether this is on causal path"},"isOutcome":{"type":"boolean","description":"Whether this is a metric/outcome variable"}},"required":["variable","timestamps","baselineMean","baselineStd","interventionMean","interventionStd","isIntervened","isMediator","isOutcome"]},"InterventionResultSchema":{"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricResultSchema"},"description":"Intervention metrics"},"sampleSize":{"type":"number","description":"Number of samples used"},"causalPaths":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Causal paths from intervention to target"},"causalPathsByMetric":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"description":"Causal paths per metric name"},"segmentAnalysis":{"type":"array","items":{"$ref":"#/components/schemas/SegmentEffectSchema"},"description":"Segment-specific effects"},"uncertainty":{"type":"object","properties":{"meanEffect":{"type":"number","description":"Mean effect"},"stdEffect":{"type":"number","description":"Standard deviation of effect"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval"},"confidenceLevel":{"type":"number","description":"Confidence level"},"pValue":{"type":"number","description":"P-value testing null hypothesis of no effect"},"significant":{"type":"boolean","description":"Whether the effect is statistically significant"},"robustnessValue":{"type":["number","null"],"description":"Cinelli-Hazlett robustness value: share of residual variance an unmeasured confounder must explain in both treatment and outcome to move the estimate to the null (0..1)"},"eValue":{"type":["number","null"],"description":"E-value on the risk-ratio scale; only present for binary-rate metrics"},"eValueCiLimit":{"type":["number","null"],"description":"E-value for the confidence-interval limit closest to the null"},"baselineInterval":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Percentile interval of the resampled baseline reading, on the metric's scale, at confidenceLevel"}},"required":["meanEffect","stdEffect","confidenceInterval","confidenceLevel","pValue","significant"],"description":"Uncertainty quantification"},"uncertainties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InterventionUncertaintySchema"},"description":"Per-metric bootstrap uncertainties"},"mediatorShifts":{"$ref":"#/components/schemas/MediatorShiftsSchema","description":"Per-metric mediator shifts: {metricName: {mediators: [...], paths: {...}}}"},"robustness":{"$ref":"#/components/schemas/InterventionRobustnessScoreInlineSchema","description":"Robustness score for panel data interventions"},"interventionValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Pre/post value per intervened variable: {variable: {baseline, intervention}}"},"sweptVariable":{"type":["string","null"],"description":"Variable swept by a `range` intervention, when the scenario carried one"},"sweptMode":{"anyOf":[{"type":"string","enum":["absolute","percentage"]},{"type":"null"}],"description":"Units of the sweep grid — percentage grids apply relative changes and share units with percent dials"},"doseResponse":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DoseResponseAnalysisSchema"}},{"type":"null"}],"description":"Per-metric sweep curve keyed by metric name, present only for range scenarios"},"executionTime":{"type":"number","description":"Execution time in seconds"}},"required":["metrics","sampleSize","uncertainty","executionTime"]},"OptimizationTraceSchema":{"type":"object","properties":{"iteration":{"type":"number","description":"Iteration number"},"bestObjectiveValues":{"type":"object","additionalProperties":{"type":"number"},"description":"Best objective values found"},"populationDiversity":{"type":"number","description":"Diversity of the population"}},"required":["iteration","bestObjectiveValues","populationDiversity"]},"MetricScaleBasisSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["intensive","extensive","unknown"],"description":"Whether the metric's level scales with the sampled table's row count"},"sampleRows":{"type":"number","description":"Rows in the sampled table the metric was computed over"},"sourceRows":{"type":["number","null"],"description":"Rows in the twin's source data; the rescale target for extensive metrics"},"rescaled":{"type":"boolean","default":false,"description":"Whether absolute values for this metric were rescaled"},"rescaledTo":{"anyOf":[{"type":"string","enum":["source_rows","single_path"]},{"type":"null"}],"description":"What an extensive metric was rescaled to: the source data's row count (static) or one simulated future path (temporal)"}},"required":["kind","sampleRows"]},"MultiCounterfactualExplanationSchema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/CounterfactualExplanationSchema"},"description":"List of counterfactual results, one per input sample"}},"required":["results"]},"CounterfactualExplanationSchema":{"type":"object","properties":{"originalSample":{"type":"object","additionalProperties":{},"description":"Original sample this explanation corresponds to"},"imputedVariables":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}],"description":"Non-target variables the request left null, with the value the twin filled in from its own marginal before predicting and searching. originalSample already contains these fills."},"currentPrediction":{"type":"object","additionalProperties":{},"description":"Dictionary mapping each requested target variable to its predicted value in the original sample."},"requestedTargets":{"type":"array","items":{"$ref":"#/components/schemas/CounterfactualTargetSchema"},"description":"The list of target conditions requested for this sample."},"counterfactuals":{"type":"array","items":{"$ref":"#/components/schemas/CounterfactualSchema"},"description":"List of counterfactual solutions found (if any)."},"searchStatus":{"$ref":"#/components/schemas/CounterfactualSearchStatusSchema","default":"searched","description":"'searched' means the solver evaluated candidates for this sample; 'failed' means the search could not run, so an empty counterfactual list is not evidence of infeasibility."},"failureReason":{"type":["string","null"],"description":"Actionable reason the search could not run for this sample. Set only when searchStatus is 'failed'."}},"required":["originalSample","currentPrediction","requestedTargets","counterfactuals"]},"CounterfactualSchema":{"type":"object","properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/VariableChangeSchema"},"description":"Changes made to variables"},"predictedOutcomes":{"type":"object","additionalProperties":{},"description":"Dictionary mapping each target variable to its predicted value (decoded) under these changes."},"allTargetsMet":{"type":"boolean","description":"Indicates if all requested target conditions were met by this counterfactual."},"certainty":{"type":"number","default":0.8,"description":"Confidence or certainty measure of this counterfactual outcome (heuristic)."},"matchStatus":{"$ref":"#/components/schemas/CounterfactualMatchStatusSchema","default":"exact","description":"Why this counterfactual was kept: exact match, within configured tolerance, or closest non-matching fallback."},"targetDistances":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Per-target signed distance (predicted - target) for numeric targets, for UI display."}},"required":["changes","predictedOutcomes","allTargetsMet"]},"VariableChangeSchema":{"type":"object","properties":{"variable":{"type":"string","description":"The variable to change"},"fromValue":{"description":"Original value"},"toValue":{"description":"New value"},"importance":{"type":"number","description":"Importance of the change"}},"required":["variable","importance"]},"CounterfactualMatchStatusSchema":{"type":"string","enum":["exact","withinTolerance","closest"]},"CounterfactualSearchStatusSchema":{"type":"string","enum":["searched","failed"]},"ExplanationResultSchema":{"type":"object","properties":{"explanationType":{"type":"string","enum":["directional","discovery","impact"],"description":"Type of explanation performed"},"causalRelationships":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CausalRelationshipAnalysisSchema"}},{"type":"null"}],"description":"For directional explanations"},"driverRanking":{"anyOf":[{"$ref":"#/components/schemas/DriverRankingSchema"},{"type":"null"}],"description":"For discovery explanations"},"impactAnalysis":{"anyOf":[{"$ref":"#/components/schemas/ImpactAnalysisSchema"},{"type":"null"}],"description":"For impact explanations"},"executionTime":{"type":"number","description":"Time taken to generate explanation"},"sampleSize":{"type":"number","description":"Number of samples used in analysis"}},"required":["explanationType","executionTime","sampleSize"]},"CausalRelationshipAnalysisSchema":{"type":"object","properties":{"causeVar":{"type":"string","description":"The cause variable"},"effectVar":{"type":"string","description":"The effect variable"},"overallEffect":{"type":"object","properties":{"effectSize":{"type":"number","description":"Average causal effect size"},"effectRange":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Min and max effect across tested values"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"95% confidence interval for the effect"},"statisticalSignificance":{"type":"number","description":"P-value for statistical significance"},"categoryEffects":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Effects by category (for categorical causes)"},"targetEffects":{"type":"array","items":{"$ref":"#/components/schemas/TargetEffectSchema"},"description":"Effects for specific target values"},"baselineOutcomeProbs":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Baseline outcome probabilities"},"targetOutcomeDeltas":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}}},{"type":"null"}],"description":"Changes in outcome probabilities"},"contrast":{"type":"object","properties":{"type":{"type":"string","enum":["numeric","categorical"]},"causeRef":{"anyOf":[{"type":["string","number"]},{"type":"null"}]},"causeTarget":{"anyOf":[{"type":["string","number"]},{"type":"null"}]},"contrastType":{"type":"string"}},"required":["type","contrastType"],"description":"Contrast specification"},"nReplicates":{"type":"number","description":"Number of replicates"},"effectiveSampleSize":{"type":"number","description":"Effective sample size"},"summaryMethod":{"type":"string","description":"Method used to summarize effects"}},"required":["effectSize","confidenceInterval","statisticalSignificance","targetEffects","contrast","nReplicates","effectiveSampleSize","summaryMethod"],"description":"Overall causal effect analysis"},"doseResponse":{"anyOf":[{"$ref":"#/components/schemas/DoseResponseAnalysisSchema"},{"type":"null"}],"description":"Dose-response curve (for continuous causes)"},"segmentEffects":{"type":"array","items":{"$ref":"#/components/schemas/SegmentExplanationEffectSchema"},"description":"Effects by segment"},"pathwayEffects":{"type":"object","properties":{"mode":{"type":"string","enum":["qualitative","additive"],"description":"Analysis mode"},"directEffect":{"type":["number","null"],"description":"Direct effect if variables are connected"},"indirectEffects":{"type":"array","items":{"$ref":"#/components/schemas/PathwayEffectSchema"},"description":"Effects through indirect pathways"},"totalEffect":{"type":["number","null"],"description":"Sum of all pathway effects"},"sumToOverall":{"type":"boolean","description":"Whether pathway effects sum to overall effect"}},"required":["mode","indirectEffects","sumToOverall"],"description":"Analysis of causal pathways"},"units":{"type":"string","enum":["probability","value"],"description":"Units of the effect measurement"},"summaryMethod":{"type":"string","description":"Method used to summarize the analysis"}},"required":["causeVar","effectVar","overallEffect","segmentEffects","pathwayEffects","units","summaryMethod"]},"TargetEffectSchema":{"type":"object","properties":{"causeTarget":{"type":["string","number"],"description":"Target value of the cause"},"scalarEffect":{"type":"number","description":"Scalar effect size"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval for the effect"},"statisticalSignificance":{"type":"number","description":"Statistical significance level"},"deltaVector":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Change in probability distribution"},"nReplicates":{"type":"number","description":"Number of replicates"},"effectiveSampleSize":{"type":"number","description":"Effective sample size"}},"required":["causeTarget","scalarEffect","confidenceInterval","statisticalSignificance","nReplicates","effectiveSampleSize"]},"SegmentExplanationEffectSchema":{"type":"object","properties":{"segmentId":{"type":"string","description":"Unique identifier for the segment"},"segmentDescription":{"type":"string","description":"Human-readable segment description"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/ConditionSchema"},"description":"Conditions defining the segment"},"effectSize":{"type":"number","description":"Causal effect size in this segment"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval for the effect"},"sampleSize":{"type":"number","description":"Number of samples in this segment"},"contrast":{"type":"object","properties":{"type":{"type":"string","enum":["numeric","categorical"]},"causeRef":{"anyOf":[{"type":["string","number"]},{"type":"null"}]},"causeTarget":{"anyOf":[{"type":["string","number"]},{"type":"null"}]},"contrastType":{"type":"string"}},"required":["type","contrastType"],"description":"Contrast specification for this segment"},"nReplicates":{"type":["number","null"],"description":"Number of replicates"},"targetEffects":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TargetEffectSchema"}},{"type":"null"}],"description":"Target-specific effects"}},"required":["segmentId","segmentDescription","conditions","effectSize","confidenceInterval","sampleSize","contrast"]},"PathwayEffectSchema":{"type":"object","properties":{"pathway":{"type":"array","items":{"type":"string"},"description":"Variables in the causal pathway"},"effectContribution":{"type":["number","null"],"description":"Contribution of this pathway to total effect"},"percentageOfTotal":{"type":["number","null"],"description":"Percentage of total effect through this pathway"},"note":{"type":["string","null"],"description":"Additional notes about the pathway"}},"required":["pathway"]},"DriverRankingSchema":{"type":"object","properties":{"targetVariable":{"type":"string","description":"The outcome variable being explained"},"drivers":{"type":"array","items":{"$ref":"#/components/schemas/CausalRelationshipAnalysisSchema"},"description":"Causal drivers ranked by effect size"}},"required":["targetVariable","drivers"]},"ImpactAnalysisSchema":{"type":"object","properties":{"sourceVariable":{"type":"string","description":"The variable whose impacts are analyzed"},"impacts":{"type":"array","items":{"$ref":"#/components/schemas/CausalRelationshipAnalysisSchema"},"description":"Variables impacted by the source"}},"required":["sourceVariable","impacts"]},"ParentImpactResultSchema":{"type":"object","properties":{"nodeImpacts":{"type":"array","items":{"$ref":"#/components/schemas/NodeParentImpactsSchema"}},"executionTime":{"type":"number"},"sampleSize":{"type":["number","null"]}},"required":["nodeImpacts","executionTime"]},"NodeParentImpactsSchema":{"type":"object","properties":{"node":{"type":"string"},"method":{"type":"string","enum":["forecast_attribution","fwl_betas","gaamt_betas","cat_logit_betas","do_contrast"]},"parents":{"type":"array","items":{"$ref":"#/components/schemas/ParentImpactEntrySchema"}},"exogenous":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ParentImpactEntrySchema"}},{"type":"null"}],"description":"Trend/seasonal/level drivers on the same 0-100 scale as parents"},"nonParentShare":{"type":["number","null"]}},"required":["node","method","parents"]},"ParentImpactEntrySchema":{"type":"object","properties":{"parent":{"type":"string"},"impactPct":{"type":"number","description":"Share of total driver influence on the node, 0-100"},"signedEffect":{"type":"number"},"lagBreakdown":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"required":["parent","impactPct","signedEffect"]},"TemporalExplanationResultSchema":{"type":"object","properties":{"explanationType":{"type":"string","enum":["directional","discovery","impact"]},"causalRelationships":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TemporalCausalRelationshipAnalysisSchema"}},{"type":"null"}]},"forecastHorizonUsed":{"type":"number"},"executionTime":{"type":"number"}},"required":["explanationType","forecastHorizonUsed","executionTime"]},"TemporalCausalRelationshipAnalysisSchema":{"type":"object","properties":{"causeVar":{"type":"string"},"effectVar":{"type":"string"},"overallEffect":{"$ref":"#/components/schemas/TemporalOverallEffectAnalysisSchema"},"effectPropagation":{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesForecastSchema"},{"type":"null"}]},"causalPaths":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["causeVar","effectVar","overallEffect","causalPaths"]},"TemporalOverallEffectAnalysisSchema":{"type":"object","properties":{"effectSize":{"type":"number"},"effectRange":{"type":"array","items":{"type":"number"}},"confidenceInterval":{"type":"array","items":{"type":"number"}},"statisticalSignificance":{"type":"number"},"lagEffects":{"type":"array","items":{"$ref":"#/components/schemas/TemporalCausalStrengthSchema"}},"seasonalEffects":{"type":"array","items":{"$ref":"#/components/schemas/SeasonalEffectDecompositionSchema"}},"impulseResponse":{"type":"array","items":{"type":"number"}},"cumulativeEffect":{"type":"number"},"peakEffectLag":{"type":"number"},"contrast":{"$ref":"#/components/schemas/ContrastSchema"}},"required":["effectSize","effectRange","confidenceInterval","statisticalSignificance","lagEffects","seasonalEffects","impulseResponse","cumulativeEffect","peakEffectLag","contrast"]},"TemporalCausalStrengthSchema":{"type":"object","properties":{"lag":{"type":"number"},"effectSize":{"type":"number"},"confidenceInterval":{"type":"array","items":{"type":"number"}},"statisticalSignificance":{"type":"number"}},"required":["lag","effectSize","confidenceInterval","statisticalSignificance"]},"SeasonalEffectDecompositionSchema":{"type":"object","properties":{"component":{"type":"string"},"period":{"type":"number"},"periodEffects":{"type":"object","additionalProperties":{"type":"number"}},"strongestPeriod":{"type":"string"},"weakestPeriod":{"type":"string"}},"required":["component","period","periodEffects","strongestPeriod","weakestPeriod"]},"ContrastSchema":{"type":"object","properties":{"type":{"type":"string","enum":["numeric","categorical"]},"causeRef":{"anyOf":[{"type":["string","number"]},{"type":"null"}]},"causeTarget":{"anyOf":[{"type":["string","number"]},{"type":"null"}]},"contrastType":{"type":"string"}},"required":["type","contrastType"]},"TemporalCounterfactualExplanationSchema":{"type":"object","properties":{"currentState":{"type":"object","additionalProperties":{}},"baselineTrajectory":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesForecastSchema"}},"requestedTargets":{"type":"array","items":{"$ref":"#/components/schemas/TemporalCounterfactualTargetSchema"}},"counterfactuals":{"type":"array","items":{"$ref":"#/components/schemas/TemporalCounterfactualSchema"}},"baselineAlreadyMeetsTarget":{"type":["boolean","null"]},"baselineAchievedAt":{"type":["number","null"]}},"required":["currentState","baselineTrajectory","requestedTargets","counterfactuals"]},"TemporalCounterfactualSchema":{"type":"object","properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/TemporalVariableChangeSchema"}},"predictedTrajectories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesForecastSchema"}},"targetAchievedAt":{"type":["number","null"]},"allTargetsMet":{"type":"boolean"},"certainty":{"type":"number"}},"required":["changes","predictedTrajectories","allTargetsMet","certainty"]},"TemporalVariableChangeSchema":{"type":"object","properties":{"variable":{"type":"string"},"fromValue":{},"toValue":{},"timestamp":{"type":["number","null"]},"persistent":{"type":"boolean","default":true},"rampSteps":{"type":["number","null"]},"importance":{"type":"number","default":1}},"required":["variable"]},"TemporalOptimizationResultSchema":{"type":"object","properties":{"paretoFront":{"type":"array","items":{"$ref":"#/components/schemas/TemporalParetoDominantSolutionSchema"}},"baselineMetrics":{"type":"object","additionalProperties":{"type":"number"}},"balancedSolution":{"anyOf":[{"$ref":"#/components/schemas/TemporalParetoDominantSolutionSchema"},{"type":"null"}]},"bestPerObjective":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TemporalParetoDominantSolutionSchema"}},{"type":"null"}]},"forecastHorizon":{"type":"number"},"forecastStartMs":{"type":["number","null"],"description":"First forecast grid timestamp (ms): the step after the training data ends"},"forecastEndMs":{"type":["number","null"],"description":"Last forecast grid timestamp (ms, inclusive)"},"executionTime":{"type":"number"},"allConstraintsSatisfiable":{"type":"boolean","default":true,"description":"Whether any plan satisfying every metric constraint was found"},"metricScaleBases":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MetricScaleBasisSchema"}},{"type":"null"}],"description":"Per-objective scale basis; an extensive metric over the stacked Monte Carlo paths is rescaled to a single path"}},"required":["paretoFront","baselineMetrics","forecastHorizon","executionTime"]},"TemporalParetoDominantSolutionSchema":{"type":"object","properties":{"interventions":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Interventions in this solution"},"interventionCount":{"type":"number","default":0,"description":"Number of interventions in this solution"},"objectiveValues":{"type":"object","additionalProperties":{"type":"number"},"description":"Values of the objectives"},"implementationDifficulty":{"type":["number","null"],"description":"Difficulty of implementing this solution"},"expectedOutcomes":{"type":"object","additionalProperties":{},"description":"Expected outcomes of the solution"},"uncertainty":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}},"description":"Uncertainty in objective values"},"improvementOverBaseline":{"type":"object","additionalProperties":{"type":"number"},"description":"Improvements over baseline"},"constraintsSatisfied":{"type":"boolean","default":true,"description":"Whether all constraints were satisfied by this solution"},"constraintViolations":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Descriptions of constraint violations if any"},"targetsAchieved":{"anyOf":[{"type":"object","additionalProperties":{"type":"boolean"}},{"type":"null"}],"description":"Whether each objective's target was achieved"},"segmentResults":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}}},{"type":"null"}],"description":"Per-segment objective values: {segment_id: {objective_name: value}}"},"segmentSampleSizes":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Per-segment sample sizes: {segment_id: sample_count}"},"segmentInterventions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Segment-specific interventions with conditions"},"totalSampleCount":{"type":["number","null"]},"affectedSampleCount":{"type":["number","null"]},"affectedPercentage":{"type":["number","null"]},"appliedInterventions":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/InterventionSchema"}},{"type":"null"}],"description":"The exact intervention rows the evaluator ran for this plan, after scoping and relative-mode conversion"},"interventionResult":{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesInterventionResultSchema"},{"type":"null"}],"description":"The plan re-run as a Monte Carlo temporal intervention over the same horizon"},"interventionSequence":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}},"forecastTrajectories":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesForecastSchema"}},{"type":"null"}],"description":"Superseded by interventionResult.forecastData; empty on runs that carry a per-plan result"}},"required":["interventions","objectiveValues","expectedOutcomes","uncertainty","improvementOverBaseline","interventionSequence"]},"PanelForecastResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DigitalTwinPredictionResultSchema"},"description":"Forecast results per environment"},"aggregateResult":{"anyOf":[{"$ref":"#/components/schemas/DigitalTwinPredictionResultSchema"},{"type":"null"}],"description":"Aggregated forecast result across environments"},"environmentCoverage":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentCoverageSchema"},{"type":"null"}],"description":"Requested-vs-forecast environment coverage; absent on runs that predate tracking and read as full"}},"required":["environmentResults"]},"EnvironmentCoverageSchema":{"type":"object","properties":{"requested":{"type":"number"},"forecast":{"type":"number"},"failed":{"type":"array","items":{"$ref":"#/components/schemas/EnvironmentForecastFailureSchema"},"default":[]},"omittedFailures":{"type":"number","default":0}},"required":["requested","forecast"]},"EnvironmentForecastFailureSchema":{"type":"object","properties":{"environment":{"type":"string"},"reason":{"type":"string"}},"required":["environment","reason"]},"PanelInterventionResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesInterventionResultSchema"},"description":"Intervention results per environment"},"aggregateResult":{"anyOf":[{"$ref":"#/components/schemas/PanelInterventionAggregateSchema"},{"type":"null"}],"description":"All-environments aggregate shaped like a per-environment result"}},"required":["environmentResults"]},"PanelInterventionAggregateSchema":{"type":"object","properties":{"metrics":{"type":"array","items":{"$ref":"#/components/schemas/MetricResultSchema"},"description":"Intervention metrics"},"sampleSize":{"type":"number","description":"Number of samples used"},"causalPaths":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Causal paths from intervention to target"},"causalPathsByMetric":{"type":"object","additionalProperties":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"description":"Causal paths per metric name"},"segmentAnalysis":{"type":"array","items":{"$ref":"#/components/schemas/SegmentEffectSchema"},"description":"Segment-specific effects"},"uncertainty":{"type":"object","properties":{"meanEffect":{"type":"number","description":"Mean effect"},"stdEffect":{"type":"number","description":"Standard deviation of effect"},"confidenceInterval":{"type":"array","items":{"type":"number"},"description":"Confidence interval"},"confidenceLevel":{"type":"number","description":"Confidence level"},"pValue":{"type":"number","description":"P-value testing null hypothesis of no effect"},"significant":{"type":"boolean","description":"Whether the effect is statistically significant"},"robustnessValue":{"type":["number","null"],"description":"Cinelli-Hazlett robustness value: share of residual variance an unmeasured confounder must explain in both treatment and outcome to move the estimate to the null (0..1)"},"eValue":{"type":["number","null"],"description":"E-value on the risk-ratio scale; only present for binary-rate metrics"},"eValueCiLimit":{"type":["number","null"],"description":"E-value for the confidence-interval limit closest to the null"},"baselineInterval":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"Percentile interval of the resampled baseline reading, on the metric's scale, at confidenceLevel"}},"required":["meanEffect","stdEffect","confidenceInterval","confidenceLevel","pValue","significant"],"description":"Uncertainty quantification"},"uncertainties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InterventionUncertaintySchema"},"description":"Per-metric bootstrap uncertainties"},"mediatorShifts":{"$ref":"#/components/schemas/MediatorShiftsSchema","description":"Per-metric mediator shifts: {metricName: {mediators: [...], paths: {...}}}"},"robustness":{"$ref":"#/components/schemas/InterventionRobustnessScoreInlineSchema","description":"Robustness score for panel data interventions"},"interventionValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}}},{"type":"null"}],"description":"Pre/post value per intervened variable: {variable: {baseline, intervention}}"},"sweptVariable":{"type":["string","null"],"description":"Variable swept by a `range` intervention, when the scenario carried one"},"sweptMode":{"anyOf":[{"type":"string","enum":["absolute","percentage"]},{"type":"null"}],"description":"Units of the sweep grid — percentage grids apply relative changes and share units with percent dials"},"doseResponse":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DoseResponseAnalysisSchema"}},{"type":"null"}],"description":"Per-metric sweep curve keyed by metric name, present only for range scenarios"},"executionTime":{"type":"number","description":"Execution time in seconds"},"originalInterventions":{"anyOf":[{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"},{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}}]}},{"type":"null"}],"description":"Original intervention spec as provided by user (preserves sequences and ramps)"},"expandedInterventions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesInterventionSchema"}},"description":"Mapping from timestamp to the concrete interventions applied at that time"},"forecastData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesForecastSchema"},"description":"Time series forecasts for intervened variables, mediators, and outcomes"},"forecastStartMs":{"type":["number","null"],"description":"First forecast grid timestamp (ms): the step after the training data ends"},"forecastEndMs":{"type":["number","null"],"description":"Last forecast grid timestamp (ms, inclusive)"},"crossEnvironment":{"anyOf":[{"$ref":"#/components/schemas/CrossEnvironmentStatsSchema"},{"type":"null"}],"description":"Distribution of per-environment effects, which the mean result cannot express"}},"required":["metrics","sampleSize","uncertainty","executionTime"]},"CrossEnvironmentStatsSchema":{"type":"object","properties":{"scope":{"type":["string","null"]},"environmentCount":{"type":["number","null"]},"totalEnvironments":{"type":["number","null"]},"environmentsWithoutEffect":{"type":["number","null"]},"environmentsMissingResult":{"type":["number","null"]},"metrics":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PanelAggregateMetricStatsSchema"}},{"type":"null"}]}}},"PanelAggregateMetricStatsSchema":{"type":"object","properties":{"environmentCount":{"type":["number","null"]},"environmentsWithoutEffect":{"type":["number","null"]},"meanEffect":{"type":["number","null"]},"medianEffect":{"type":["number","null"]},"p10Effect":{"type":["number","null"]},"p90Effect":{"type":["number","null"]},"shareNegative":{"type":["number","null"]},"sharePositive":{"type":["number","null"]},"baselineMean":{"type":["number","null"]},"interventionMean":{"type":["number","null"]},"medianRelativeEffect":{"type":["number","null"]},"shareSignificant":{"type":["number","null"]}}},"PanelExplanationResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TemporalExplanationResultSchema"},"description":"Explanation results per environment"}},"required":["environmentResults"]},"PanelCounterfactualResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TemporalCounterfactualExplanationSchema"},"description":"Counterfactual results per environment"}},"required":["environmentResults"]},"PanelOptimizationResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TemporalOptimizationResultSchema"},"description":"Optimization results per environment"}},"required":["environmentResults"]},"PanelParentImpactResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ParentImpactResultSchema"},"description":"Parent impact results per environment"}},"required":["environmentResults"]},"RootCauseAnalysisResultSchema":{"type":"object","properties":{"sampleResults":{"type":"array","items":{"$ref":"#/components/schemas/SampleRcaResultSchema"}},"calibratedThresholds":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]},"targetFpr":{"type":["number","null"]},"executionTime":{"type":"number","default":0}},"required":["sampleResults"]},"SampleRcaResultSchema":{"type":"object","properties":{"sampleIndex":{"type":"number","default":0},"targetVariable":{"type":"string"},"observedTarget":{"type":"number"},"expectedTargetMean":{"type":"number"},"expectedTargetStd":{"type":"number"},"targetZScore":{"type":"number"},"rankedCauses":{"type":"array","items":{"$ref":"#/components/schemas/NodeSurpriseResultSchema"}},"rootCauses":{"type":"array","items":{"$ref":"#/components/schemas/NodeSurpriseResultSchema"}},"propagationChain":{"type":"array","items":{"$ref":"#/components/schemas/NodeSurpriseResultSchema"}},"causalPaths":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"observableAttribution":{"type":"number"},"latentAttribution":{"type":"number"}},"required":["targetVariable","observedTarget","expectedTargetMean","expectedTargetStd","targetZScore","rankedCauses","rootCauses","propagationChain","causalPaths","observableAttribution","latentAttribution"]},"NodeSurpriseResultSchema":{"type":"object","properties":{"variable":{"type":"string"},"observedValue":{"type":"number"},"expectedMean":{"type":"number"},"expectedStd":{"type":"number"},"zScore":{"type":"number"},"conditionalPercentile":{"type":"number"},"marginalZScore":{"type":"number","default":0},"graphDepth":{"type":"number","default":0},"isRootNode":{"type":"boolean","default":false},"explainedFraction":{"type":"number","default":0},"rootCauseScore":{"type":"number","default":0},"confidence":{"type":"number","default":1},"nConditionalSamples":{"type":"number","default":0},"isLatent":{"type":"boolean","default":false},"actionability":{"$ref":"#/components/schemas/ActionabilityEnum","default":"observable"},"variableThreshold":{"type":["number","null"]}},"required":["variable","observedValue","expectedMean","expectedStd","zScore","conditionalPercentile"]},"ActionabilityEnum":{"type":"string","enum":["actionable","observable","latent","external"]},"PanelRootCauseAnalysisResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RootCauseAnalysisResultSchema"}}},"required":["environmentResults"]},"StaticPanelRootCauseAnalysisResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RootCauseAnalysisResultSchema"}}},"required":["environmentResults"]},"AnomalyDetectionResultSchema":{"type":"object","properties":{"calibratedThresholds":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]},"targetFpr":{"type":["number","null"]},"totalSamplesScanned":{"type":"number"},"samples":{"type":"array","items":{"$ref":"#/components/schemas/SampleAnomalyScanResultSchema"},"default":[]},"executionTime":{"type":"number","default":0}},"required":["totalSamplesScanned"]},"SampleAnomalyScanResultSchema":{"type":"object","properties":{"sampleIndex":{"type":"number"},"isAnomalous":{"type":"boolean"},"systemScore":{"type":"number"},"flaggedNodes":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyFlagResultSchema"},"default":[]},"allSurprises":{"type":"array","items":{"$ref":"#/components/schemas/NodeSurpriseResultSchema"},"default":[]},"autoRca":{"anyOf":[{"$ref":"#/components/schemas/SampleRcaResultSchema"},{"type":"null"}]}},"required":["sampleIndex","isAnomalous","systemScore"]},"AnomalyFlagResultSchema":{"type":"object","properties":{"variable":{"type":"string"},"conditionalZ":{"type":"number"},"marginalZ":{"type":"number"},"isRootNode":{"type":"boolean"},"confidence":{"type":"number"},"graphDepth":{"type":"number"},"variableThreshold":{"type":["number","null"]}},"required":["variable","conditionalZ","marginalZ","isRootNode","confidence","graphDepth"]},"TemporalAnomalyDetectionResultSchema":{"type":"object","properties":{"calibratedThresholds":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]},"targetFpr":{"type":["number","null"]},"totalTimestepsScanned":{"type":"number"},"timesteps":{"type":"array","items":{"$ref":"#/components/schemas/SampleAnomalyScanResultSchema"},"default":[]},"executionTime":{"type":"number","default":0}},"required":["totalTimestepsScanned"]},"PanelAnomalyDetectionResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TemporalAnomalyDetectionResultSchema"}}},"required":["environmentResults"]},"StaticPanelAnomalyDetectionResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AnomalyDetectionResultSchema"}}},"required":["environmentResults"]},"CausalHealthMonitorResultSchema":{"type":"object","properties":{"dataSource":{"$ref":"#/components/schemas/ChmDataSourceSchema","default":"observed"},"totalTimestepsScanned":{"type":"number"},"startTimestampMs":{"type":["number","null"]},"granularityMs":{"type":["number","null"]},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/ConditionScanTimestepResultSchema"}},"nodeSummaries":{"type":"array","items":{"$ref":"#/components/schemas/NodeConditionStatusResultSchema"}},"causalAlertOrdering":{"type":"array","items":{"$ref":"#/components/schemas/CausalAlertEntryResultSchema"},"default":[]},"autoRca":{"anyOf":[{"$ref":"#/components/schemas/SampleRcaResultSchema"},{"type":"null"}]},"calibratedThresholds":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]},"targetFpr":{"type":["number","null"]},"eventLog":{"type":"array","items":{"$ref":"#/components/schemas/EventLogEntryResultSchema"},"default":[]},"leadLag":{"type":"array","items":{"$ref":"#/components/schemas/LeadLagEntryResultSchema"},"default":[]},"edgePropagation":{"type":"array","items":{"$ref":"#/components/schemas/EdgePropagationSeriesResultSchema"},"default":[]},"forecastedSamples":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"causalEdges":{"type":"array","items":{"$ref":"#/components/schemas/CausalEdgeResultSchema"},"default":[]},"executionTime":{"type":"number","default":0}},"required":["totalTimestepsScanned","timeline","nodeSummaries"]},"ConditionScanTimestepResultSchema":{"type":"object","properties":{"timestep":{"type":"number"},"timestampMs":{"type":["number","null"]},"systemHealthScore":{"type":"number"},"nodeStatuses":{"type":"array","items":{"$ref":"#/components/schemas/NodeConditionStatusResultSchema"}},"spikeAlerts":{"type":"array","items":{"$ref":"#/components/schemas/NodeConditionStatusResultSchema"},"default":[]},"trendAlerts":{"type":"array","items":{"$ref":"#/components/schemas/NodeConditionStatusResultSchema"},"default":[]},"autoRca":{"anyOf":[{"$ref":"#/components/schemas/SampleRcaResultSchema"},{"type":"null"}]}},"required":["timestep","systemHealthScore","nodeStatuses"]},"NodeConditionStatusResultSchema":{"type":"object","properties":{"variable":{"type":"string"},"alertType":{"$ref":"#/components/schemas/AlertTypeEnum"},"currentZ":{"type":"number"},"ewmaZ":{"type":"number"},"trendSlope":{"type":"number"},"cusum":{"type":"number"},"stepsElevated":{"type":"number"},"isRootNode":{"type":"boolean"},"graphDepth":{"type":"number"},"confidence":{"type":"number"},"causalDepth":{"type":"number","default":0},"variableThreshold":{"type":["number","null"]},"marginalZScore":{"type":"number","default":0},"explainedFraction":{"type":"number","default":0},"rootCauseScore":{"type":"number","default":0},"recovered":{"type":"boolean","default":false}},"required":["variable","alertType","currentZ","ewmaZ","trendSlope","cusum","stepsElevated","isRootNode","graphDepth","confidence"]},"AlertTypeEnum":{"type":"string","enum":["spike","worsening","improving","sustained","normal"]},"CausalAlertEntryResultSchema":{"type":"object","properties":{"variable":{"type":"string"},"causalDepth":{"type":"number"},"firstAlertStep":{"type":"number"},"alertType":{"$ref":"#/components/schemas/AlertTypeEnum"},"ewmaZ":{"type":"number"}},"required":["variable","causalDepth","firstAlertStep","alertType","ewmaZ"]},"EventLogEntryResultSchema":{"type":"object","properties":{"at":{"type":"number"},"atTimestampMs":{"type":["number","null"]},"kind":{"type":"string","enum":["first_alert","cascade","rca_verdict","recovered"]},"variable":{"type":["string","null"]},"alertType":{"type":["string","null"]},"ewmaZ":{"type":"number","default":0},"signedCurrentZ":{"type":"number","default":0},"sourceSignedZ":{"type":"number","default":0},"targetSignedZ":{"type":"number","default":0},"sentence":{"type":"string","default":""},"fromVar":{"type":["string","null"]},"toVar":{"type":["string","null"]},"lagSteps":{"type":["number","null"]},"correlation":{"type":["number","null"]},"target":{"type":["string","null"]},"rootCause":{"type":["string","null"]}},"required":["at","kind"]},"LeadLagEntryResultSchema":{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"},"lagSteps":{"type":"number"},"correlation":{"type":"number"}},"required":["source","target","lagSteps","correlation"]},"EdgePropagationSeriesResultSchema":{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"},"scores":{"type":"array","items":{"type":"number"}}},"required":["source","target","scores"]},"CausalEdgeResultSchema":{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"}},"required":["source","target"]},"PanelCausalHealthMonitorResultSchema":{"type":"object","properties":{"environmentResults":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CausalHealthMonitorResultSchema"}}},"required":["environmentResults"]},"EnvironmentGroupSnapshotSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"envKeys":{"type":"array","items":{"type":"string"}},"droppedEnvKeys":{"type":"array","items":{"type":"string"},"default":[]},"notice":{"type":["string","null"]}},"required":["id","name","envKeys"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations/{id}":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-simulations-{id}","summary":"Get simulation","description":"Returns the simulation run by id. Read from platform MongoDB (digitalTwinRun collection). Must belong to the workspace. Includes status, inputs, metadata, and `exportFormats` (see the list endpoint); use /simulations/{id}/results for output data. A run submitted with `environmentGroupIds` also carries `environmentGroupSnapshots`: one entry per group ({id, name, envKeys, droppedEnvKeys, notice?}) recording the membership the server resolved at submit time. It is a frozen record, not a live read — editing or deleting the group afterwards leaves it untouched, and `droppedEnvKeys` names members the version could not honour.","tags":["Simulations"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get simulation results

> Returns the simulation outputs (run.outputs) from platform MongoDB. 404 if the run has no outputs yet (e.g. still running or failed before producing results). Use after GET /simulations/{id} shows completion.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations/{id}/results":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-simulations-{id}-results","summary":"Get simulation results","description":"Returns the simulation outputs (run.outputs) from platform MongoDB. 404 if the run has no outputs yet (e.g. still running or failed before producing results). Use after GET /simulations/{id} shows completion.","tags":["Simulations"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Read scoring verdicts and per-row changes

> Reads a completed batch-scoring run back: \`digest\` (verdict counts, top drivers, row summaries) plus one page of per-row detail with each row's full change list. Query params: limit (default 50), cursor. 409 while the run is still executing; 404 when the run carries no counterfactual results (it was not a scoring run).

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"PaginatedEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{},"description":"Payload not declared in this repo"},"pagination":{"type":"object","properties":{"cursor":{"type":"string","description":"Pass back as ?cursor= to fetch the next page"},"hasMore":{"type":"boolean","description":"Whether a further page exists"},"total":{"type":"number","description":"Total matching rows, when the query can count them"}},"required":["hasMore"]}},"required":["data","pagination"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations/{id}/score":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-simulations-{id}-score","summary":"Read scoring verdicts and per-row changes","description":"Reads a completed batch-scoring run back: `digest` (verdict counts, top drivers, row summaries) plus one page of per-row detail with each row's full change list. Query params: limit (default 50), cursor. 409 while the run is still executing; 404 when the run carries no counterfactual results (it was not a scoring run).","tags":["Simulations"],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"description":"Page size (1-1000, default 50).","type":"number","minimum":1,"maximum":1000},"description":"Page size (1-1000, default 50)."},{"in":"query","name":"cursor","required":false,"schema":{"type":"string","description":"Opaque cursor from a previous response's `pagination.cursor`."},"description":"Opaque cursor from a previous response's `pagination.cursor`."},{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Read a sweep curve

> Reads the full dose-response curve of a completed range-intervention (sweep) run, one metric per call. Query param metric selects the curve; omit it to list the available metrics plus the sweep digest. Each point carries the swept value, mean, standard deviation, and confidence interval. 409 while the run is still executing; 404 when the run carries no sweep.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations/{id}/sweep":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-simulations-{id}-sweep","summary":"Read a sweep curve","description":"Reads the full dose-response curve of a completed range-intervention (sweep) run, one metric per call. Query param metric selects the curve; omit it to list the available metrics plus the sweep digest. Each point carries the swept value, mean, standard deviation, and confidence interval. 409 while the run is still executing; 404 when the run carries no sweep.","tags":["Simulations"],"parameters":[{"in":"query","name":"metric","required":false,"schema":{"type":"string","description":"Which metric's curve to return; required when the run carries several."},"description":"Which metric's curve to return; required when the run carries several."},{"in":"query","name":"environment","required":false,"schema":{"type":"string","description":"Which environment's curve to return on a multi-environment (panel) run. Required there: without it the response lists the available environments instead of picking one."},"description":"Which environment's curve to return on a multi-environment (panel) run. Required there: without it the response lists the available environments instead of picking one."},{"in":"query","name":"environmentFilter","required":false,"schema":{"type":"string","description":"Narrows the environment listing on a panel run to keys containing this text."},"description":"Narrows the environment listing on a panel run to keys containing this text."},{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Export simulation

> Downloads a completed simulation as a file. \`format=json\` returns a self-contained bundle (run metadata, scenario, and full outputs) and works for every scenario type. \`format=csv\` streams the server-side wide forecast CSV and is only available for forecast-shaped simulations (forecast, panel\_forecast, prediction) that ran against a multi-environment (panel) model with parquet-backed results; anything else gets a 400 pointing at format=json. Check \`exportFormats\` on the run to know in advance. 400 if the run has not completed. Requires the exports:read scope.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Simulations"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/simulations/{id}/export/{format}":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-simulations-{id}-export-{format}","summary":"Export simulation","description":"Downloads a completed simulation as a file. `format=json` returns a self-contained bundle (run metadata, scenario, and full outputs) and works for every scenario type. `format=csv` streams the server-side wide forecast CSV and is only available for forecast-shaped simulations (forecast, panel_forecast, prediction) that ran against a multi-environment (panel) model with parquet-backed results; anything else gets a 400 pointing at format=json. Check `exportFormats` on the run to know in advance. 400 if the run has not completed. Requires the exports:read scope.","tags":["Simulations"],"parameters":[{"in":"path","name":"format","required":true,"schema":{"type":"string","enum":["csv","json","parquet"],"description":"Export format"},"description":"Export format"}],"responses":{"200":{"description":"Successful response","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```
