For the complete documentation index, see llms.txt. This page is also available as Markdown.

Digital Twins

List digital twins

get
/api/v1/workspaces/{wsId}/digital-twins

Lists digital twins in the workspace. Paginated (limit, cursor). Read from platform MongoDB. Versions are listed under /versions.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
Query parameters
limitnumber · min: 1 · max: 1000Optional

Page size (1-1000, default 50).

Example: 1
cursorstringOptional

Opaque cursor from a previous response's pagination.cursor.

Example: example
Responses
200

Successful response

application/json
get/api/v1/workspaces/{wsId}/digital-twins
GET /api/v1/workspaces/{wsId}/digital-twins HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "text",
      "organisationId": "text",
      "workspaceId": "text",
      "name": "text",
      "normalizedName": null,
      "type": "static",
      "canonicalInputSchema": [
        {
          "field": "text",
          "type": "None",
          "subtype": "Integer",
          "availableTypes": [
            "None"
          ],
          "isIndex": null,
          "categories": [
            "text"
          ],
          "aliases": [
            "text"
          ],
          "description": null,
          "displayWidth": null,
          "originalFormat": null,
          "displayFormat": null,
          "unit": null,
          "unitModifier": null,
          "dateOrderAssumed": null
        }
      ],
      "tags": [
        "text"
      ],
      "status": "active",
      "createdAt": "text",
      "suggestedSimulations": [
        {
          "id": "text",
          "name": "text",
          "description": "text",
          "scenario": {
            "type": "text",
            "objectives": [
              {
                "direction": "maximise",
                "variable": "text",
                "metricSqlQuery": "text",
                "unit": {},
                "weight": 1,
                "variablesRelevantToMetric": [
                  "text"
                ],
                "target": {
                  "type": "percentage",
                  "value": null
                },
                "conceptId": null,
                "conceptEditVersion": 1
              }
            ],
            "conditions": [
              {
                "variable": "text",
                "operator": "eq",
                "value": 1
              }
            ],
            "decisionVars": [
              "text"
            ],
            "variableConstraints": [
              {
                "variable": "text",
                "type": "range",
                "minValue": null,
                "maxValue": null,
                "allowedValues": [
                  "text"
                ],
                "maxChangePercent": 1,
                "conditionalAllowedValues": [
                  {
                    "condition": {
                      "variable": "text",
                      "operator": "eq",
                      "value": 1
                    },
                    "allowedValues": [
                      "text"
                    ],
                    "minValue": null,
                    "maxValue": null
                  }
                ]
              }
            ],
            "metricConstraints": [
              {
                "metricName": "text",
                "sqlQuery": "text",
                "constraintType": "min_value",
                "value": null,
                "booleanValue": null,
                "temporal": {
                  "startDate": null,
                  "endDate": null,
                  "startTimestampMs": null,
                  "endTimestampMs": null,
                  "intervalSteps": null
                }
              }
            ],
            "segmentDefinitions": [
              {
                "id": "text",
                "description": null,
                "conditions": [
                  {
                    "variable": "text",
                    "operator": "eq",
                    "value": 1
                  }
                ]
              }
            ],
            "enableSegmentInterventions": false,
            "interventionTypes": {
              "ANY_ADDITIONAL_PROPERTY": "text"
            },
            "interventionCountConfig": {
              "maxInterventions": 1,
              "optimizeCount": true
            }
          },
          "createdAt": "text"
        }
      ],
      "suggestionsGeneratedAt": null,
      "environmentGroups": [
        {
          "id": "text",
          "name": "text",
          "definition": "[Circular Reference]",
          "createdAt": "text",
          "createdBy": null,
          "updatedAt": null,
          "splitColumn": null,
          "splitValue": null
        }
      ],
      "autoUpdate": {
        "enabled": false,
        "mode": "assimilate_only"
      }
    }
  ],
  "pagination": {
    "cursor": "text",
    "hasMore": true,
    "total": 1
  }
}

Create digital twin

post
/api/v1/workspaces/{wsId}/digital-twins

Creates a new digital twin and its first version (1.0.0). Body: name, type (static, temporal, multi-environment-temporal, multi-environment-static), optional tags, and the data to model: datasetId (a derived dataset) OR sourceId (model a raw source directly, no dataset required) — at most one of the two. Twin and version records are created in platform MongoDB only; no data-service call until discover, run-pipeline, or train. The response includes versionId for the initial version.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
Body
namestringRequired
typestring · enumRequiredDefault: staticPossible values:
tagsstring[] · nullableOptional
datasetIdstring · nullableOptional
sourceIdstring · nullableOptional
selectedTimeColumnNamestring · nullableOptional
environmentColumnsstring[] · nullableOptional
shardCountinteger · min: 1 · nullableOptional
Responses
201

Successful response

application/json
post/api/v1/workspaces/{wsId}/digital-twins
POST /api/v1/workspaces/{wsId}/digital-twins HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 158

{
  "name": "text",
  "type": "static",
  "tags": [
    "text"
  ],
  "datasetId": null,
  "sourceId": null,
  "selectedTimeColumnName": null,
  "environmentColumns": [
    "text"
  ],
  "shardCount": null
}
{
  "data": {
    "id": "text",
    "organisationId": "text",
    "workspaceId": "text",
    "name": "text",
    "normalizedName": null,
    "type": "static",
    "canonicalInputSchema": [
      {
        "field": "text",
        "type": "None",
        "subtype": "Integer",
        "availableTypes": [
          "None"
        ],
        "isIndex": null,
        "categories": [
          "text"
        ],
        "aliases": [
          "text"
        ],
        "description": null,
        "displayWidth": null,
        "originalFormat": null,
        "displayFormat": null,
        "unit": null,
        "unitModifier": null,
        "dateOrderAssumed": null
      }
    ],
    "tags": [
      "text"
    ],
    "status": "active",
    "createdAt": "text",
    "suggestedSimulations": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "scenario": {
          "type": "text",
          "objectives": [
            {
              "direction": "maximise",
              "variable": "text",
              "metricSqlQuery": "text",
              "unit": {},
              "weight": 1,
              "variablesRelevantToMetric": [
                "text"
              ],
              "target": {
                "type": "percentage",
                "value": null
              },
              "conceptId": null,
              "conceptEditVersion": 1
            }
          ],
          "conditions": [
            {
              "variable": "text",
              "operator": "eq",
              "value": 1
            }
          ],
          "decisionVars": [
            "text"
          ],
          "variableConstraints": [
            {
              "variable": "text",
              "type": "range",
              "minValue": null,
              "maxValue": null,
              "allowedValues": [
                "text"
              ],
              "maxChangePercent": 1,
              "conditionalAllowedValues": [
                {
                  "condition": {
                    "variable": "text",
                    "operator": "eq",
                    "value": 1
                  },
                  "allowedValues": [
                    "text"
                  ],
                  "minValue": null,
                  "maxValue": null
                }
              ]
            }
          ],
          "metricConstraints": [
            {
              "metricName": "text",
              "sqlQuery": "text",
              "constraintType": "min_value",
              "value": null,
              "booleanValue": null,
              "temporal": {
                "startDate": null,
                "endDate": null,
                "startTimestampMs": null,
                "endTimestampMs": null,
                "intervalSteps": null
              }
            }
          ],
          "segmentDefinitions": [
            {
              "id": "text",
              "description": null,
              "conditions": [
                {
                  "variable": "text",
                  "operator": "eq",
                  "value": 1
                }
              ]
            }
          ],
          "enableSegmentInterventions": false,
          "interventionTypes": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          },
          "interventionCountConfig": {
            "maxInterventions": 1,
            "optimizeCount": true
          }
        },
        "createdAt": "text"
      }
    ],
    "suggestionsGeneratedAt": null,
    "environmentGroups": [
      {
        "id": "text",
        "name": "text",
        "definition": {
          "mode": "columnValues",
          "columnValues": {
            "ANY_ADDITIONAL_PROPERTY": [
              "text"
            ]
          },
          "environments": [
            {
              "ANY_ADDITIONAL_PROPERTY": "text"
            }
          ],
          "statFilters": "[Circular Reference]",
          "agreementThreshold": 1
        },
        "createdAt": "text",
        "createdBy": null,
        "updatedAt": null,
        "splitColumn": null,
        "splitValue": null
      }
    ],
    "autoUpdate": {
      "enabled": false,
      "mode": "assimilate_only"
    },
    "versionId": "text"
  }
}

Get digital twin

get
/api/v1/workspaces/{wsId}/digital-twins/{id}

Returns the digital twin by id from platform MongoDB. Must belong to the workspace. Includes canonicalInputSchema, suggestedSimulations.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Responses
200

Successful response

application/json
get/api/v1/workspaces/{wsId}/digital-twins/{id}
GET /api/v1/workspaces/{wsId}/digital-twins/{id} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "id": "text",
    "organisationId": "text",
    "workspaceId": "text",
    "name": "text",
    "normalizedName": null,
    "type": "static",
    "canonicalInputSchema": [
      {
        "field": "text",
        "type": "None",
        "subtype": "Integer",
        "availableTypes": [
          "None"
        ],
        "isIndex": null,
        "categories": [
          "text"
        ],
        "aliases": [
          "text"
        ],
        "description": null,
        "displayWidth": null,
        "originalFormat": null,
        "displayFormat": null,
        "unit": null,
        "unitModifier": null,
        "dateOrderAssumed": null
      }
    ],
    "tags": [
      "text"
    ],
    "status": "active",
    "createdAt": "text",
    "suggestedSimulations": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "scenario": {
          "type": "text",
          "objectives": [
            {
              "direction": "maximise",
              "variable": "text",
              "metricSqlQuery": "text",
              "unit": {},
              "weight": 1,
              "variablesRelevantToMetric": [
                "text"
              ],
              "target": {
                "type": "percentage",
                "value": null
              },
              "conceptId": null,
              "conceptEditVersion": 1
            }
          ],
          "conditions": [
            {
              "variable": "text",
              "operator": "eq",
              "value": 1
            }
          ],
          "decisionVars": [
            "text"
          ],
          "variableConstraints": [
            {
              "variable": "text",
              "type": "range",
              "minValue": null,
              "maxValue": null,
              "allowedValues": [
                "text"
              ],
              "maxChangePercent": 1,
              "conditionalAllowedValues": [
                {
                  "condition": {
                    "variable": "text",
                    "operator": "eq",
                    "value": 1
                  },
                  "allowedValues": [
                    "text"
                  ],
                  "minValue": null,
                  "maxValue": null
                }
              ]
            }
          ],
          "metricConstraints": [
            {
              "metricName": "text",
              "sqlQuery": "text",
              "constraintType": "min_value",
              "value": null,
              "booleanValue": null,
              "temporal": {
                "startDate": null,
                "endDate": null,
                "startTimestampMs": null,
                "endTimestampMs": null,
                "intervalSteps": null
              }
            }
          ],
          "segmentDefinitions": [
            {
              "id": "text",
              "description": null,
              "conditions": [
                {
                  "variable": "text",
                  "operator": "eq",
                  "value": 1
                }
              ]
            }
          ],
          "enableSegmentInterventions": false,
          "interventionTypes": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          },
          "interventionCountConfig": {
            "maxInterventions": 1,
            "optimizeCount": true
          }
        },
        "createdAt": "text"
      }
    ],
    "suggestionsGeneratedAt": null,
    "environmentGroups": [
      {
        "id": "text",
        "name": "text",
        "definition": {
          "mode": "columnValues",
          "columnValues": {
            "ANY_ADDITIONAL_PROPERTY": [
              "text"
            ]
          },
          "environments": [
            {
              "ANY_ADDITIONAL_PROPERTY": "text"
            }
          ],
          "statFilters": "[Circular Reference]",
          "agreementThreshold": 1
        },
        "createdAt": "text",
        "createdBy": null,
        "updatedAt": null,
        "splitColumn": null,
        "splitValue": null
      }
    ],
    "autoUpdate": {
      "enabled": false,
      "mode": "assimilate_only"
    }
  }
}

Delete digital twin

delete
/api/v1/workspaces/{wsId}/digital-twins/{id}

Deletes the twin. Proxies DELETE to data-service so that data-service state (orchestrator, models, runs) is cleaned up; then the platform record would typically be removed by the caller or a follow-up. Requires digital-twins:delete and full permission.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Responses
204

No Content

No content

delete/api/v1/workspaces/{wsId}/digital-twins/{id}
DELETE /api/v1/workspaces/{wsId}/digital-twins/{id} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update digital twin

patch
/api/v1/workspaces/{wsId}/digital-twins/{id}

Updates name and/or tags. Only these fields are writable. Stored in platform MongoDB.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Body
namestringOptional
tagsstring[]Optional
Responses
200

Successful response

application/json
patch/api/v1/workspaces/{wsId}/digital-twins/{id}
PATCH /api/v1/workspaces/{wsId}/digital-twins/{id} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "name": "text",
  "tags": [
    "text"
  ]
}
{
  "data": {
    "id": "text",
    "organisationId": "text",
    "workspaceId": "text",
    "name": "text",
    "normalizedName": null,
    "type": "static",
    "canonicalInputSchema": [
      {
        "field": "text",
        "type": "None",
        "subtype": "Integer",
        "availableTypes": [
          "None"
        ],
        "isIndex": null,
        "categories": [
          "text"
        ],
        "aliases": [
          "text"
        ],
        "description": null,
        "displayWidth": null,
        "originalFormat": null,
        "displayFormat": null,
        "unit": null,
        "unitModifier": null,
        "dateOrderAssumed": null
      }
    ],
    "tags": [
      "text"
    ],
    "status": "active",
    "createdAt": "text",
    "suggestedSimulations": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "scenario": {
          "type": "text",
          "objectives": [
            {
              "direction": "maximise",
              "variable": "text",
              "metricSqlQuery": "text",
              "unit": {},
              "weight": 1,
              "variablesRelevantToMetric": [
                "text"
              ],
              "target": {
                "type": "percentage",
                "value": null
              },
              "conceptId": null,
              "conceptEditVersion": 1
            }
          ],
          "conditions": [
            {
              "variable": "text",
              "operator": "eq",
              "value": 1
            }
          ],
          "decisionVars": [
            "text"
          ],
          "variableConstraints": [
            {
              "variable": "text",
              "type": "range",
              "minValue": null,
              "maxValue": null,
              "allowedValues": [
                "text"
              ],
              "maxChangePercent": 1,
              "conditionalAllowedValues": [
                {
                  "condition": {
                    "variable": "text",
                    "operator": "eq",
                    "value": 1
                  },
                  "allowedValues": [
                    "text"
                  ],
                  "minValue": null,
                  "maxValue": null
                }
              ]
            }
          ],
          "metricConstraints": [
            {
              "metricName": "text",
              "sqlQuery": "text",
              "constraintType": "min_value",
              "value": null,
              "booleanValue": null,
              "temporal": {
                "startDate": null,
                "endDate": null,
                "startTimestampMs": null,
                "endTimestampMs": null,
                "intervalSteps": null
              }
            }
          ],
          "segmentDefinitions": [
            {
              "id": "text",
              "description": null,
              "conditions": [
                {
                  "variable": "text",
                  "operator": "eq",
                  "value": 1
                }
              ]
            }
          ],
          "enableSegmentInterventions": false,
          "interventionTypes": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          },
          "interventionCountConfig": {
            "maxInterventions": 1,
            "optimizeCount": true
          }
        },
        "createdAt": "text"
      }
    ],
    "suggestionsGeneratedAt": null,
    "environmentGroups": [
      {
        "id": "text",
        "name": "text",
        "definition": {
          "mode": "columnValues",
          "columnValues": {
            "ANY_ADDITIONAL_PROPERTY": [
              "text"
            ]
          },
          "environments": [
            {
              "ANY_ADDITIONAL_PROPERTY": "text"
            }
          ],
          "statFilters": "[Circular Reference]",
          "agreementThreshold": 1
        },
        "createdAt": "text",
        "createdBy": null,
        "updatedAt": null,
        "splitColumn": null,
        "splitValue": null
      }
    ],
    "autoUpdate": {
      "enabled": false,
      "mode": "assimilate_only"
    }
  }
}

Import digital twin from export zip

post
/api/v1/workspaces/{wsId}/digital-twins/import

Imports a digital twin from an export zip. Request body: raw zip bytes (Content-Type application/zip, filename via x-filename header, must contain twin.json). Max 512 MB on this route; larger imports go through the platform UI. Optional query param webhookUrl — POSTed once (best effort, unsigned) at the terminal state. Returns 202 with jobId; poll links.self. Requires digital-twins:write scope.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
Query parameters
webhookUrlstringOptional

Called with the job result when the import reaches a terminal state.

Example: example
Header parameters
x-filenamestringRequired

Filename to store the upload under

Example: example
Body
anyOptional

Raw file bytes

Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/import
POST /api/v1/workspaces/{wsId}/digital-twins/import HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-filename: text
Content-Type: application/zip
Accept: */*
{
  "data": {
    "jobId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "cancel": "text"
    }
  }
}

List environment groups

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups

Multi-environment (panel) twins: returns the twin's saved environment groups. A group is a named, declarative rule over the twin's environment columns — mode columnValues (allowed values per environment column), environments (exact combos, each {column: value}), or statFilters (select environments by per-environment aggregates over any twin column). Groups belong to the twin, not to a version, so they survive retraining; their concrete membership only exists relative to a version and is computed by POST .../versions/{vId}/environment-groups/resolve. Single-environment twins have none.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Responses
200

Successful response

application/json
get/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "text",
      "name": "text",
      "definition": {
        "mode": "columnValues",
        "columnValues": {
          "ANY_ADDITIONAL_PROPERTY": [
            "text"
          ]
        },
        "environments": [
          {
            "ANY_ADDITIONAL_PROPERTY": "text"
          }
        ],
        "statFilters": {
          "booleanOperator": "AND",
          "filters": "[Circular Reference]"
        },
        "agreementThreshold": 1
      },
      "createdAt": "text",
      "createdBy": null,
      "updatedAt": null,
      "splitColumn": null,
      "splitValue": null
    }
  ]
}

Create an environment group

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups

Multi-environment (panel) twins: saves a named environment group on the twin. The id is minted server-side. Names are unique per twin and a twin is capped at 200 groups — both are 409 Conflict, not validation errors. The definition is stored verbatim and is not resolved here: a rule naming a column no version has is accepted and reports itself as unresolvable when resolved against a version. Resolve it with POST .../versions/{vId}/environment-groups/resolve, aggregate a scoped graph with POST .../versions/{vId}/graph/slice, or scope a run with environmentGroupIds on POST /simulations.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Body
namestring · min: 1 · max: 120Required

Display name; unique per twin

Responses
201

Successful response

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 309

{
  "name": "text",
  "definition": {
    "mode": "columnValues",
    "columnValues": {
      "ANY_ADDITIONAL_PROPERTY": [
        "text"
      ]
    },
    "environments": [
      {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    ],
    "statFilters": {
      "booleanOperator": "AND",
      "filters": [
        {
          "column": "text",
          "comparisonOperator": "text",
          "value": "text",
          "reduce": "value"
        }
      ]
    },
    "agreementThreshold": 1
  }
}
{
  "data": {
    "id": "text",
    "name": "text",
    "definition": {
      "mode": "columnValues",
      "columnValues": {
        "ANY_ADDITIONAL_PROPERTY": [
          "text"
        ]
      },
      "environments": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "statFilters": {
        "booleanOperator": "AND",
        "filters": [
          {
            "column": "text",
            "comparisonOperator": "text",
            "value": "text",
            "reduce": "value"
          }
        ]
      },
      "agreementThreshold": 1
    },
    "createdAt": "text",
    "createdBy": null,
    "updatedAt": null,
    "splitColumn": null,
    "splitValue": null
  }
}

Start digital twin export

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/export

Starts an async export of the digital twin as a portable zip: twin metadata, selected versions with their trained model params (full serialized parameters including tree ensembles), and optionally simulation runs. Body (all optional): includeRuns, versions (ids), environments (panel twins), webhookUrl (POSTed once, best effort, at the terminal state). Returns 202 with jobId; poll links.self and fetch links.download when completed. The zip round-trips through POST digital-twins/import.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Body
includeRunsbooleanOptional

Include simulation run artifacts in the export (default false)

versionsstring[]Optional

Version ids to export; all versions when omitted

environmentsstring[]Optional

Panel twins: environment keys to export; all environments when omitted

webhookUrlstring · uri · nullableOptional

Optional URL called once when the export completes

Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/export
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/export HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 99

{
  "includeRuns": true,
  "versions": [
    "text"
  ],
  "environments": [
    "text"
  ],
  "webhookUrl": "https://example.com"
}
{
  "data": {
    "jobId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "cancel": "text"
    }
  }
}

List versions

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions

Lists all versions of this digital twin. Paginated (limit, cursor). Read from platform MongoDB (digitalTwinVersion collection). Versions carry lifecycleState, causalGraph, and the data they model as datasetId (a derived dataset) or sourceId (a raw source) — whichever the twin was created with.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Query parameters
limitnumber · min: 1 · max: 1000Optional

Page size (1-1000, default 50).

Example: 1
cursorstringOptional

Opaque cursor from a previous response's pagination.cursor.

Example: example
Responses
200

Successful response

application/json
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "text",
      "twinId": "text",
      "organisationId": "text",
      "workspaceId": "text",
      "versionMajor": 1,
      "versionMinor": 1,
      "versionPatch": 1,
      "version": null,
      "createdAt": "text",
      "createdBy": null,
      "derivedFromVersionId": null,
      "changelog": {
        "temporalDependenciesDiffs": [
          {
            "type": "added",
            "variable": "text",
            "oldPrerequisites": [
              "text"
            ],
            "newPrerequisites": [
              "text"
            ]
          }
        ],
        "fixedSubGraphDiffs": [
          {
            "type": "added",
            "changeTarget": "relationships",
            "relationship": {
              "source": "text",
              "target": "text",
              "strength": 1,
              "strengthStatus": "measured",
              "timeLagEffects": [
                {
                  "lag": 1,
                  "strength": 1,
                  "granularity": null
                }
              ],
              "cyclicalEffects": [
                {
                  "frequency": "text",
                  "strength": 1
                }
              ],
              "confidence": null,
              "agreementRate": null,
              "isEnvironmentGated": false
            }
          }
        ],
        "causalGraphDiffs": [
          {
            "type": "added",
            "relationship": {
              "source": "text",
              "target": "text",
              "strength": 1,
              "strengthStatus": "measured",
              "timeLagEffects": [
                {
                  "lag": 1,
                  "strength": 1,
                  "granularity": null
                }
              ],
              "cyclicalEffects": [
                {
                  "frequency": "text",
                  "strength": 1
                }
              ],
              "confidence": null,
              "agreementRate": null,
              "isEnvironmentGated": false
            },
            "oldRelationship": {
              "source": "text",
              "target": "text",
              "strength": 1,
              "strengthStatus": "measured",
              "timeLagEffects": [
                {
                  "lag": 1,
                  "strength": 1,
                  "granularity": null
                }
              ],
              "cyclicalEffects": [
                {
                  "frequency": "text",
                  "strength": 1
                }
              ],
              "confidence": null,
              "agreementRate": null,
              "isEnvironmentGated": false
            }
          }
        ],
        "nodesDiffs": [
          {
            "type": "added",
            "node": {
              "name": "text",
              "nodeType": "observed",
              "type": "None",
              "categories": [
                "text"
              ],
              "latentClusterId": null,
              "environmentColumns": [
                "text"
              ],
              "isDerived": false,
              "symbolicEquation": {
                "expression": "text",
                "r2": 1,
                "noisePercentage": 1,
                "termBreakdown": [
                  {
                    "expression": "text",
                    "parentVariable": null,
                    "parentVariables": [
                      "text"
                    ],
                    "coefficient": 1,
                    "operator": "text",
                    "contributionPercentage": 1
                  }
                ],
                "complexity": 1,
                "explanationType": "regression",
                "epsilonSigma": null,
                "epsilonSigmaRelative": null,
                "expressionWithNoise": null,
                "discoveryMethod": null,
                "parentContributions": [
                  {
                    "parent": "text",
                    "contributionPct": 1,
                    "signedEffect": 1,
                    "direction": "positive",
                    "terms": [
                      "text"
                    ],
                    "status": "included"
                  }
                ],
                "unexplainedPct": null,
                "directionReferenceClass": null,
                "alternatives": [
                  {
                    "label": "text",
                    "expression": "text",
                    "r2": null,
                    "complexity": null
                  }
                ]
              },
              "derivedInfo": {
                "derivedType": "text",
                "targetColumn": "text",
                "sourceColumns": [
                  "text"
                ],
                "expression": "text",
                "r2": null,
                "isDeterministic": true,
                "implausibilityReason": null,
                "lag": null,
                "cumulativeDirection": null,
                "seasonalTerms": [
                  {
                    "period": 1,
                    "order": 1
                  }
                ],
                "isMonotonicallyIncreasing": null,
                "isMonotonicallyDecreasing": null
              },
              "parentImpacts": {
                "node": "text",
                "method": "forecast_attribution",
                "parents": [
                  {
                    "parent": "text",
                    "impactPct": 1,
                    "signedEffect": 1,
                    "lagBreakdown": {
                      "ANY_ADDITIONAL_PROPERTY": 1
                    }
                  }
                ],
                "exogenous": [
                  {
                    "parent": "text",
                    "impactPct": 1,
                    "signedEffect": 1,
                    "lagBreakdown": {
                      "ANY_ADDITIONAL_PROPERTY": 1
                    }
                  }
                ],
                "nonParentShare": null
              }
            },
            "oldNode": {
              "name": "text",
              "nodeType": "observed",
              "type": "None",
              "categories": [
                "text"
              ],
              "latentClusterId": null,
              "environmentColumns": [
                "text"
              ],
              "isDerived": false,
              "symbolicEquation": {
                "expression": "text",
                "r2": 1,
                "noisePercentage": 1,
                "termBreakdown": [
                  {
                    "expression": "text",
                    "parentVariable": null,
                    "parentVariables": [
                      "text"
                    ],
                    "coefficient": 1,
                    "operator": "text",
                    "contributionPercentage": 1
                  }
                ],
                "complexity": 1,
                "explanationType": "regression",
                "epsilonSigma": null,
                "epsilonSigmaRelative": null,
                "expressionWithNoise": null,
                "discoveryMethod": null,
                "parentContributions": [
                  {
                    "parent": "text",
                    "contributionPct": 1,
                    "signedEffect": 1,
                    "direction": "positive",
                    "terms": [
                      "text"
                    ],
                    "status": "included"
                  }
                ],
                "unexplainedPct": null,
                "directionReferenceClass": null,
                "alternatives": [
                  {
                    "label": "text",
                    "expression": "text",
                    "r2": null,
                    "complexity": null
                  }
                ]
              },
              "derivedInfo": {
                "derivedType": "text",
                "targetColumn": "text",
                "sourceColumns": [
                  "text"
                ],
                "expression": "text",
                "r2": null,
                "isDeterministic": true,
                "implausibilityReason": null,
                "lag": null,
                "cumulativeDirection": null,
                "seasonalTerms": [
                  {
                    "period": 1,
                    "order": 1
                  }
                ],
                "isMonotonicallyIncreasing": null,
                "isMonotonicallyDecreasing": null
              },
              "parentImpacts": {
                "node": "text",
                "method": "forecast_attribution",
                "parents": [
                  {
                    "parent": "text",
                    "impactPct": 1,
                    "signedEffect": 1,
                    "lagBreakdown": {
                      "ANY_ADDITIONAL_PROPERTY": 1
                    }
                  }
                ],
                "exogenous": [
                  {
                    "parent": "text",
                    "impactPct": 1,
                    "signedEffect": 1,
                    "lagBreakdown": {
                      "ANY_ADDITIONAL_PROPERTY": 1
                    }
                  }
                ],
                "nonParentShare": null
              }
            }
          }
        ],
        "evaluationDiffs": [
          {
            "type": "improvement",
            "metric": "text",
            "oldValue": null,
            "newValue": 1,
            "percentChange": null
          }
        ]
      },
      "datasetId": "text",
      "type": "static",
      "inputFields": [
        {
          "field": "text",
          "type": "None",
          "subtype": "Integer",
          "availableTypes": [
            "None"
          ],
          "isIndex": null,
          "categories": [
            "text"
          ],
          "aliases": [
            "text"
          ],
          "description": null,
          "displayWidth": null,
          "originalFormat": null,
          "displayFormat": null,
          "unit": null,
          "unitModifier": null,
          "dateOrderAssumed": null
        }
      ],
      "temporalDependencies": null,
      "timeSeriesMetadata": {
        "colName": "text",
        "granularity": "ms",
        "validGranularities": [
          "text"
        ],
        "startDate": "text",
        "endDate": "text",
        "typicalDeltaSeconds": null,
        "selectedGrid": null,
        "candidateGrids": [
          "text"
        ],
        "scoring": {
          "ANY_ADDITIONAL_PROPERTY": {
            "ANY_ADDITIONAL_PROPERTY": 1
          }
        },
        "coverage": {
          "observedSteps": 1,
          "gridSteps": 1,
          "imputedSteps": 1,
          "gapCount": 1,
          "gaps": [
            {
              "startDate": "text",
              "endDate": "text",
              "missingSteps": 1
            }
          ]
        }
      },
      "granularity": null,
      "fixedSubGraph": {
        "relationships": [
          {
            "source": "text",
            "target": "text",
            "strength": 1,
            "strengthStatus": "measured",
            "timeLagEffects": [
              {
                "lag": 1,
                "strength": 1,
                "granularity": null
              }
            ],
            "cyclicalEffects": [
              {
                "frequency": "text",
                "strength": 1
              }
            ],
            "confidence": null,
            "agreementRate": null,
            "isEnvironmentGated": false
          }
        ],
        "antiRelationships": [
          {
            "source": "text",
            "target": "text",
            "strength": 1,
            "strengthStatus": "measured",
            "timeLagEffects": [
              {
                "lag": 1,
                "strength": 1,
                "granularity": null
              }
            ],
            "cyclicalEffects": [
              {
                "frequency": "text",
                "strength": 1
              }
            ],
            "confidence": null,
            "agreementRate": null,
            "isEnvironmentGated": false
          }
        ]
      },
      "variableRoles": {
        "sources": [
          "text"
        ],
        "targets": [
          "text"
        ]
      },
      "derivedColumns": [
        {
          "derivedType": "text",
          "targetColumn": "text",
          "sourceColumns": [
            "text"
          ],
          "expression": "text",
          "r2": null,
          "isDeterministic": true,
          "implausibilityReason": null,
          "lag": null,
          "cumulativeDirection": null,
          "seasonalTerms": [
            {
              "period": 1,
              "order": 1
            }
          ],
          "isMonotonicallyIncreasing": null,
          "isMonotonicallyDecreasing": null
        }
      ],
      "dataSignature": "text",
      "configSignature": "text",
      "nTrainSamples": null,
      "causalGraph": [
        {
          "source": "text",
          "target": "text",
          "strength": 1,
          "strengthStatus": "measured",
          "timeLagEffects": [
            {
              "lag": 1,
              "strength": 1,
              "granularity": null
            }
          ],
          "cyclicalEffects": [
            {
              "frequency": "text",
              "strength": 1
            }
          ],
          "confidence": null,
          "agreementRate": null,
          "isEnvironmentGated": false
        }
      ],
      "nodes": [
        {
          "name": "text",
          "nodeType": "observed",
          "type": "None",
          "categories": [
            "text"
          ],
          "latentClusterId": null,
          "environmentColumns": [
            "text"
          ],
          "isDerived": false,
          "symbolicEquation": {
            "expression": "text",
            "r2": 1,
            "noisePercentage": 1,
            "termBreakdown": [
              {
                "expression": "text",
                "parentVariable": null,
                "parentVariables": [
                  "text"
                ],
                "coefficient": 1,
                "operator": "text",
                "contributionPercentage": 1
              }
            ],
            "complexity": 1,
            "explanationType": "regression",
            "epsilonSigma": null,
            "epsilonSigmaRelative": null,
            "expressionWithNoise": null,
            "discoveryMethod": null,
            "parentContributions": [
              {
                "parent": "text",
                "contributionPct": 1,
                "signedEffect": 1,
                "direction": "positive",
                "terms": [
                  "text"
                ],
                "status": "included"
              }
            ],
            "unexplainedPct": null,
            "directionReferenceClass": null,
            "alternatives": [
              {
                "label": "text",
                "expression": "text",
                "r2": null,
                "complexity": null
              }
            ]
          },
          "derivedInfo": {
            "derivedType": "text",
            "targetColumn": "text",
            "sourceColumns": [
              "text"
            ],
            "expression": "text",
            "r2": null,
            "isDeterministic": true,
            "implausibilityReason": null,
            "lag": null,
            "cumulativeDirection": null,
            "seasonalTerms": [
              {
                "period": 1,
                "order": 1
              }
            ],
            "isMonotonicallyIncreasing": null,
            "isMonotonicallyDecreasing": null
          },
          "parentImpacts": {
            "node": "text",
            "method": "forecast_attribution",
            "parents": [
              {
                "parent": "text",
                "impactPct": 1,
                "signedEffect": 1,
                "lagBreakdown": {
                  "ANY_ADDITIONAL_PROPERTY": 1
                }
              }
            ],
            "exogenous": [
              {
                "parent": "text",
                "impactPct": 1,
                "signedEffect": 1,
                "lagBreakdown": {
                  "ANY_ADDITIONAL_PROPERTY": 1
                }
              }
            ],
            "nonParentShare": null
          }
        }
      ],
      "evaluation": {
        "modelType": "cbn",
        "nodeMetrics": {
          "ANY_ADDITIONAL_PROPERTY": {
            "accuracy": null,
            "accuracyPerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "weightedAccuracy": null,
            "falsePositiveRate": null,
            "falseNegativeRate": null,
            "truePositiveRate": null,
            "trueNegativeRate": null,
            "precision": null,
            "recall": null,
            "f1Score": null,
            "precisionPerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "recallPerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "f1ScorePerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "positiveClassLabel": null,
            "mse": null,
            "r2": null,
            "logLikelihood": null,
            "auc": null,
            "brierScore": null,
            "mae": null,
            "mape": {
              "ANY_ADDITIONAL_PROPERTY": null
            }
          }
        },
        "globalMetrics": {
          "logLikelihood": null,
          "averageMse": null,
          "averageMae": null,
          "averageAccuracy": null,
          "averageMape": null
        },
        "skippedReason": "insufficient_data",
        "skipReasons": [
          "text"
        ],
        "nEvalPoints": null
      },
      "panelEvaluation": {
        "ANY_ADDITIONAL_PROPERTY": {
          "modelType": "cbn",
          "nodeMetrics": {
            "ANY_ADDITIONAL_PROPERTY": {
              "accuracy": null,
              "accuracyPerClass": {
                "ANY_ADDITIONAL_PROPERTY": 1
              },
              "weightedAccuracy": null,
              "falsePositiveRate": null,
              "falseNegativeRate": null,
              "truePositiveRate": null,
              "trueNegativeRate": null,
              "precision": null,
              "recall": null,
              "f1Score": null,
              "precisionPerClass": {
                "ANY_ADDITIONAL_PROPERTY": 1
              },
              "recallPerClass": {
                "ANY_ADDITIONAL_PROPERTY": 1
              },
              "f1ScorePerClass": {
                "ANY_ADDITIONAL_PROPERTY": 1
              },
              "positiveClassLabel": null,
              "mse": null,
              "r2": null,
              "logLikelihood": null,
              "auc": null,
              "brierScore": null,
              "mae": null,
              "mape": {
                "ANY_ADDITIONAL_PROPERTY": null
              }
            }
          },
          "globalMetrics": {
            "logLikelihood": null,
            "averageMse": null,
            "averageMae": null,
            "averageAccuracy": null,
            "averageMape": null
          },
          "skippedReason": "insufficient_data",
          "skipReasons": [
            "text"
          ],
          "nEvalPoints": null
        }
      },
      "graphRecommendations": [
        {
          "x": "text",
          "y": "text",
          "direction": "forward",
          "reasons": [
            "text"
          ]
        }
      ],
      "environmentColumns": [
        "text"
      ],
      "selectedEnvironmentColumns": [
        "text"
      ],
      "selectedTimeColumnName": null,
      "environmentSelection": {
        "baseline": "all",
        "exceptions": [
          {
            "ANY_ADDITIONAL_PROPERTY": "text"
          }
        ]
      },
      "extraOps": [
        {
          "id": "text",
          "sourceId": "text",
          "config": "[Circular Reference]"
        }
      ],
      "nEnvironments": null,
      "latentClusters": [
        {
          "clusterId": 1,
          "affectedNodes": [
            "text"
          ],
          "estimatedDim": 1,
          "dicSatisfied": true,
          "interColumnNames": [
            "text"
          ],
          "intraColumnNames": [
            "text"
          ],
          "modelStatus": "modelled",
          "modelFailureReason": "tooFewMembers",
          "modelFailureDetail": null,
          "avgLcScore": null,
          "reconstructionError": null,
          "envPredictability": null,
          "memberLatentShare": {
            "ANY_ADDITIONAL_PROPERTY": 1
          },
          "seasonalStrength": null
        }
      ],
      "latentDiscoveryConfig": {
        "enabled": true,
        "residualCorrelationThreshold": 0.3,
        "ciTestAlpha": 0.05,
        "minClusterSize": 2,
        "maxLatentDim": 5
      },
      "nodeDomains": {
        "ANY_ADDITIONAL_PROPERTY": {
          "min": 1,
          "max": 1
        }
      },
      "lastTimestampMs": null,
      "headCommit": 1,
      "trainedWindowSignature": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "trainedWindowProfile": {
        "ANY_ADDITIONAL_PROPERTY": {
          "count": null,
          "distinct": null,
          "min": null,
          "max": null
        }
      },
      "resolvedInputs": [
        {
          "datasetId": "text",
          "versionId": null,
          "deltaVersion": 1
        }
      ],
      "updateEligibility": {
        "updateMode": "assimilable",
        "reasons": [
          "text"
        ],
        "newRows": null,
        "fromTsMs": null,
        "toTsMs": null,
        "historyDiff": {
          "changedColumns": [
            {
              "column": "text",
              "stored": {
                "count": null,
                "distinct": null,
                "min": null,
                "max": null
              },
              "current": {
                "count": null,
                "distinct": null,
                "min": null,
                "max": null
              }
            }
          ],
          "deltaOperations": [
            {
              "datasetId": "text",
              "version": 1,
              "operation": "text",
              "timestampMs": null
            }
          ],
          "rewrittenDatasets": [
            "text"
          ]
        }
      },
      "trainingStages": {
        "confounderModelling": true,
        "equationDiscovery": true,
        "lagScreening": null,
        "evalHorizons": [
          {
            "count": 1,
            "unit": "S"
          }
        ]
      },
      "timeComponent": {
        "models": {
          "ANY_ADDITIONAL_PROPERTY": {
            "theilSenSlope": 1,
            "theilSenIntercept": 1,
            "harmonic": {
              "periodsWithHarmonics": [
                []
              ],
              "sinCosCoefficients": [
                1
              ],
              "productPairs": [
                []
              ],
              "productCoefficients": [
                1
              ]
            }
          }
        },
        "varExplained": {
          "ANY_ADDITIONAL_PROPERTY": 1
        },
        "trainNSamples": 1
      },
      "causalAlgorithmVersion": null,
      "digitalTwinAlgorithmVersion": null,
      "shardCount": 1,
      "maxLag": 1,
      "layout": {
        "success": true,
        "positions": {
          "ANY_ADDITIONAL_PROPERTY": {
            "x": 1,
            "y": 1
          }
        },
        "edgeWaypoints": {
          "ANY_ADDITIONAL_PROPERTY": {
            "x": 1,
            "y": 1
          }
        }
      },
      "lifecycleState": "created",
      "currentTaskId": null,
      "failureContext": {
        "error": "text",
        "failedAtStage": "causal_discovery",
        "retryable": true,
        "userFacing": false
      },
      "traces": {
        "ANY_ADDITIONAL_PROPERTY": {
          "start": null,
          "end": null,
          "name": null
        }
      },
      "arrayFeatureMap": {
        "ANY_ADDITIONAL_PROPERTY": [
          "text"
        ]
      },
      "arrayFeatureToBase": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ],
  "pagination": {
    "cursor": "text",
    "hasMore": true,
    "total": 1
  }
}

Create version

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions

Derives a new version from an existing one — the retrain primitive. Body (all optional): bump (major | minor | patch, default patch), baseVersionId (default: the latest version), datasetId (point the new version at different data). The new version inherits the base's configuration and causal graph, resets all training outputs, and lands in lifecycleState resolved — train it with POST .../versions/{vId}/train. Version numbers never collide: the bumped component skips past any label already taken.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
Body
bumpstring · enumOptional

Which version component to bump (default patch)

Default: patchPossible values:
baseVersionIdstring · nullableOptional

Version to derive from; the latest version when omitted

datasetIdstring · nullableOptional

Point the new version at a different dataset

Responses
201

Successful response

application/json
dataany ofRequired
or
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "bump": "patch",
  "baseVersionId": null,
  "datasetId": null
}
{
  "data": {
    "id": "text",
    "twinId": "text",
    "organisationId": "text",
    "workspaceId": "text",
    "versionMajor": 1,
    "versionMinor": 1,
    "versionPatch": 1,
    "version": null,
    "createdAt": "text",
    "createdBy": null,
    "derivedFromVersionId": null,
    "changelog": {
      "temporalDependenciesDiffs": [
        {
          "type": "added",
          "variable": "text",
          "oldPrerequisites": [
            "text"
          ],
          "newPrerequisites": [
            "text"
          ]
        }
      ],
      "fixedSubGraphDiffs": [
        {
          "type": "added",
          "changeTarget": "relationships",
          "relationship": {
            "source": "text",
            "target": "text",
            "strength": 1,
            "strengthStatus": "measured",
            "timeLagEffects": [
              {
                "lag": 1,
                "strength": 1,
                "granularity": null
              }
            ],
            "cyclicalEffects": [
              {
                "frequency": "text",
                "strength": 1
              }
            ],
            "confidence": null,
            "agreementRate": null,
            "isEnvironmentGated": false
          }
        }
      ],
      "causalGraphDiffs": [
        {
          "type": "added",
          "relationship": {
            "source": "text",
            "target": "text",
            "strength": 1,
            "strengthStatus": "measured",
            "timeLagEffects": [
              {
                "lag": 1,
                "strength": 1,
                "granularity": null
              }
            ],
            "cyclicalEffects": [
              {
                "frequency": "text",
                "strength": 1
              }
            ],
            "confidence": null,
            "agreementRate": null,
            "isEnvironmentGated": false
          },
          "oldRelationship": {
            "source": "text",
            "target": "text",
            "strength": 1,
            "strengthStatus": "measured",
            "timeLagEffects": [
              {
                "lag": 1,
                "strength": 1,
                "granularity": null
              }
            ],
            "cyclicalEffects": [
              {
                "frequency": "text",
                "strength": 1
              }
            ],
            "confidence": null,
            "agreementRate": null,
            "isEnvironmentGated": false
          }
        }
      ],
      "nodesDiffs": [
        {
          "type": "added",
          "node": {
            "name": "text",
            "nodeType": "observed",
            "type": "None",
            "categories": [
              "text"
            ],
            "latentClusterId": null,
            "environmentColumns": [
              "text"
            ],
            "isDerived": false,
            "symbolicEquation": {
              "expression": "text",
              "r2": 1,
              "noisePercentage": 1,
              "termBreakdown": [
                {
                  "expression": "text",
                  "parentVariable": null,
                  "parentVariables": [
                    "text"
                  ],
                  "coefficient": 1,
                  "operator": "text",
                  "contributionPercentage": 1
                }
              ],
              "complexity": 1,
              "explanationType": "regression",
              "epsilonSigma": null,
              "epsilonSigmaRelative": null,
              "expressionWithNoise": null,
              "discoveryMethod": null,
              "parentContributions": [
                {
                  "parent": "text",
                  "contributionPct": 1,
                  "signedEffect": 1,
                  "direction": "positive",
                  "terms": [
                    "text"
                  ],
                  "status": "included"
                }
              ],
              "unexplainedPct": null,
              "directionReferenceClass": null,
              "alternatives": [
                {
                  "label": "text",
                  "expression": "text",
                  "r2": null,
                  "complexity": null
                }
              ]
            },
            "derivedInfo": {
              "derivedType": "text",
              "targetColumn": "text",
              "sourceColumns": [
                "text"
              ],
              "expression": "text",
              "r2": null,
              "isDeterministic": true,
              "implausibilityReason": null,
              "lag": null,
              "cumulativeDirection": null,
              "seasonalTerms": [
                {
                  "period": 1,
                  "order": 1
                }
              ],
              "isMonotonicallyIncreasing": null,
              "isMonotonicallyDecreasing": null
            },
            "parentImpacts": {
              "node": "text",
              "method": "forecast_attribution",
              "parents": [
                {
                  "parent": "text",
                  "impactPct": 1,
                  "signedEffect": 1,
                  "lagBreakdown": {
                    "ANY_ADDITIONAL_PROPERTY": 1
                  }
                }
              ],
              "exogenous": [
                {
                  "parent": "text",
                  "impactPct": 1,
                  "signedEffect": 1,
                  "lagBreakdown": {
                    "ANY_ADDITIONAL_PROPERTY": 1
                  }
                }
              ],
              "nonParentShare": null
            }
          },
          "oldNode": {
            "name": "text",
            "nodeType": "observed",
            "type": "None",
            "categories": [
              "text"
            ],
            "latentClusterId": null,
            "environmentColumns": [
              "text"
            ],
            "isDerived": false,
            "symbolicEquation": {
              "expression": "text",
              "r2": 1,
              "noisePercentage": 1,
              "termBreakdown": [
                {
                  "expression": "text",
                  "parentVariable": null,
                  "parentVariables": [
                    "text"
                  ],
                  "coefficient": 1,
                  "operator": "text",
                  "contributionPercentage": 1
                }
              ],
              "complexity": 1,
              "explanationType": "regression",
              "epsilonSigma": null,
              "epsilonSigmaRelative": null,
              "expressionWithNoise": null,
              "discoveryMethod": null,
              "parentContributions": [
                {
                  "parent": "text",
                  "contributionPct": 1,
                  "signedEffect": 1,
                  "direction": "positive",
                  "terms": [
                    "text"
                  ],
                  "status": "included"
                }
              ],
              "unexplainedPct": null,
              "directionReferenceClass": null,
              "alternatives": [
                {
                  "label": "text",
                  "expression": "text",
                  "r2": null,
                  "complexity": null
                }
              ]
            },
            "derivedInfo": {
              "derivedType": "text",
              "targetColumn": "text",
              "sourceColumns": [
                "text"
              ],
              "expression": "text",
              "r2": null,
              "isDeterministic": true,
              "implausibilityReason": null,
              "lag": null,
              "cumulativeDirection": null,
              "seasonalTerms": [
                {
                  "period": 1,
                  "order": 1
                }
              ],
              "isMonotonicallyIncreasing": null,
              "isMonotonicallyDecreasing": null
            },
            "parentImpacts": {
              "node": "text",
              "method": "forecast_attribution",
              "parents": [
                {
                  "parent": "text",
                  "impactPct": 1,
                  "signedEffect": 1,
                  "lagBreakdown": {
                    "ANY_ADDITIONAL_PROPERTY": 1
                  }
                }
              ],
              "exogenous": [
                {
                  "parent": "text",
                  "impactPct": 1,
                  "signedEffect": 1,
                  "lagBreakdown": {
                    "ANY_ADDITIONAL_PROPERTY": 1
                  }
                }
              ],
              "nonParentShare": null
            }
          }
        }
      ],
      "evaluationDiffs": [
        {
          "type": "improvement",
          "metric": "text",
          "oldValue": null,
          "newValue": 1,
          "percentChange": null
        }
      ]
    },
    "datasetId": "text",
    "type": "static",
    "inputFields": [
      {
        "field": "text",
        "type": "None",
        "subtype": "Integer",
        "availableTypes": [
          "None"
        ],
        "isIndex": null,
        "categories": [
          "text"
        ],
        "aliases": [
          "text"
        ],
        "description": null,
        "displayWidth": null,
        "originalFormat": null,
        "displayFormat": null,
        "unit": null,
        "unitModifier": null,
        "dateOrderAssumed": null
      }
    ],
    "temporalDependencies": null,
    "timeSeriesMetadata": {
      "colName": "text",
      "granularity": "ms",
      "validGranularities": [
        "text"
      ],
      "startDate": "text",
      "endDate": "text",
      "typicalDeltaSeconds": null,
      "selectedGrid": null,
      "candidateGrids": [
        "text"
      ],
      "scoring": {
        "ANY_ADDITIONAL_PROPERTY": {
          "ANY_ADDITIONAL_PROPERTY": 1
        }
      },
      "coverage": {
        "observedSteps": 1,
        "gridSteps": 1,
        "imputedSteps": 1,
        "gapCount": 1,
        "gaps": [
          {
            "startDate": "text",
            "endDate": "text",
            "missingSteps": 1
          }
        ]
      }
    },
    "granularity": null,
    "fixedSubGraph": {
      "relationships": [
        {
          "source": "text",
          "target": "text",
          "strength": 1,
          "strengthStatus": "measured",
          "timeLagEffects": [
            {
              "lag": 1,
              "strength": 1,
              "granularity": null
            }
          ],
          "cyclicalEffects": [
            {
              "frequency": "text",
              "strength": 1
            }
          ],
          "confidence": null,
          "agreementRate": null,
          "isEnvironmentGated": false
        }
      ],
      "antiRelationships": [
        {
          "source": "text",
          "target": "text",
          "strength": 1,
          "strengthStatus": "measured",
          "timeLagEffects": [
            {
              "lag": 1,
              "strength": 1,
              "granularity": null
            }
          ],
          "cyclicalEffects": [
            {
              "frequency": "text",
              "strength": 1
            }
          ],
          "confidence": null,
          "agreementRate": null,
          "isEnvironmentGated": false
        }
      ]
    },
    "variableRoles": {
      "sources": [
        "text"
      ],
      "targets": [
        "text"
      ]
    },
    "derivedColumns": [
      {
        "derivedType": "text",
        "targetColumn": "text",
        "sourceColumns": [
          "text"
        ],
        "expression": "text",
        "r2": null,
        "isDeterministic": true,
        "implausibilityReason": null,
        "lag": null,
        "cumulativeDirection": null,
        "seasonalTerms": [
          {
            "period": 1,
            "order": 1
          }
        ],
        "isMonotonicallyIncreasing": null,
        "isMonotonicallyDecreasing": null
      }
    ],
    "dataSignature": "text",
    "configSignature": "text",
    "nTrainSamples": null,
    "causalGraph": [
      {
        "source": "text",
        "target": "text",
        "strength": 1,
        "strengthStatus": "measured",
        "timeLagEffects": [
          {
            "lag": 1,
            "strength": 1,
            "granularity": null
          }
        ],
        "cyclicalEffects": [
          {
            "frequency": "text",
            "strength": 1
          }
        ],
        "confidence": null,
        "agreementRate": null,
        "isEnvironmentGated": false
      }
    ],
    "nodes": [
      {
        "name": "text",
        "nodeType": "observed",
        "type": "None",
        "categories": [
          "text"
        ],
        "latentClusterId": null,
        "environmentColumns": [
          "text"
        ],
        "isDerived": false,
        "symbolicEquation": {
          "expression": "text",
          "r2": 1,
          "noisePercentage": 1,
          "termBreakdown": [
            {
              "expression": "text",
              "parentVariable": null,
              "parentVariables": [
                "text"
              ],
              "coefficient": 1,
              "operator": "text",
              "contributionPercentage": 1
            }
          ],
          "complexity": 1,
          "explanationType": "regression",
          "epsilonSigma": null,
          "epsilonSigmaRelative": null,
          "expressionWithNoise": null,
          "discoveryMethod": null,
          "parentContributions": [
            {
              "parent": "text",
              "contributionPct": 1,
              "signedEffect": 1,
              "direction": "positive",
              "terms": [
                "text"
              ],
              "status": "included"
            }
          ],
          "unexplainedPct": null,
          "directionReferenceClass": null,
          "alternatives": [
            {
              "label": "text",
              "expression": "text",
              "r2": null,
              "complexity": null
            }
          ]
        },
        "derivedInfo": {
          "derivedType": "text",
          "targetColumn": "text",
          "sourceColumns": [
            "text"
          ],
          "expression": "text",
          "r2": null,
          "isDeterministic": true,
          "implausibilityReason": null,
          "lag": null,
          "cumulativeDirection": null,
          "seasonalTerms": [
            {
              "period": 1,
              "order": 1
            }
          ],
          "isMonotonicallyIncreasing": null,
          "isMonotonicallyDecreasing": null
        },
        "parentImpacts": {
          "node": "text",
          "method": "forecast_attribution",
          "parents": [
            {
              "parent": "text",
              "impactPct": 1,
              "signedEffect": 1,
              "lagBreakdown": {
                "ANY_ADDITIONAL_PROPERTY": 1
              }
            }
          ],
          "exogenous": [
            {
              "parent": "text",
              "impactPct": 1,
              "signedEffect": 1,
              "lagBreakdown": {
                "ANY_ADDITIONAL_PROPERTY": 1
              }
            }
          ],
          "nonParentShare": null
        }
      }
    ],
    "evaluation": {
      "modelType": "cbn",
      "nodeMetrics": {
        "ANY_ADDITIONAL_PROPERTY": {
          "accuracy": null,
          "accuracyPerClass": {
            "ANY_ADDITIONAL_PROPERTY": 1
          },
          "weightedAccuracy": null,
          "falsePositiveRate": null,
          "falseNegativeRate": null,
          "truePositiveRate": null,
          "trueNegativeRate": null,
          "precision": null,
          "recall": null,
          "f1Score": null,
          "precisionPerClass": {
            "ANY_ADDITIONAL_PROPERTY": 1
          },
          "recallPerClass": {
            "ANY_ADDITIONAL_PROPERTY": 1
          },
          "f1ScorePerClass": {
            "ANY_ADDITIONAL_PROPERTY": 1
          },
          "positiveClassLabel": null,
          "mse": null,
          "r2": null,
          "logLikelihood": null,
          "auc": null,
          "brierScore": null,
          "mae": null,
          "mape": {
            "ANY_ADDITIONAL_PROPERTY": null
          }
        }
      },
      "globalMetrics": {
        "logLikelihood": null,
        "averageMse": null,
        "averageMae": null,
        "averageAccuracy": null,
        "averageMape": null
      },
      "skippedReason": "insufficient_data",
      "skipReasons": [
        "text"
      ],
      "nEvalPoints": null
    },
    "panelEvaluation": {
      "ANY_ADDITIONAL_PROPERTY": {
        "modelType": "cbn",
        "nodeMetrics": {
          "ANY_ADDITIONAL_PROPERTY": {
            "accuracy": null,
            "accuracyPerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "weightedAccuracy": null,
            "falsePositiveRate": null,
            "falseNegativeRate": null,
            "truePositiveRate": null,
            "trueNegativeRate": null,
            "precision": null,
            "recall": null,
            "f1Score": null,
            "precisionPerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "recallPerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "f1ScorePerClass": {
              "ANY_ADDITIONAL_PROPERTY": 1
            },
            "positiveClassLabel": null,
            "mse": null,
            "r2": null,
            "logLikelihood": null,
            "auc": null,
            "brierScore": null,
            "mae": null,
            "mape": {
              "ANY_ADDITIONAL_PROPERTY": null
            }
          }
        },
        "globalMetrics": {
          "logLikelihood": null,
          "averageMse": null,
          "averageMae": null,
          "averageAccuracy": null,
          "averageMape": null
        },
        "skippedReason": "insufficient_data",
        "skipReasons": [
          "text"
        ],
        "nEvalPoints": null
      }
    },
    "graphRecommendations": [
      {
        "x": "text",
        "y": "text",
        "direction": "forward",
        "reasons": [
          "text"
        ]
      }
    ],
    "environmentColumns": [
      "text"
    ],
    "selectedEnvironmentColumns": [
      "text"
    ],
    "selectedTimeColumnName": null,
    "environmentSelection": {
      "baseline": "all",
      "exceptions": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ]
    },
    "extraOps": [
      {
        "id": "text",
        "sourceId": "text",
        "config": "[Circular Reference]"
      }
    ],
    "nEnvironments": null,
    "latentClusters": [
      {
        "clusterId": 1,
        "affectedNodes": [
          "text"
        ],
        "estimatedDim": 1,
        "dicSatisfied": true,
        "interColumnNames": [
          "text"
        ],
        "intraColumnNames": [
          "text"
        ],
        "modelStatus": "modelled",
        "modelFailureReason": "tooFewMembers",
        "modelFailureDetail": null,
        "avgLcScore": null,
        "reconstructionError": null,
        "envPredictability": null,
        "memberLatentShare": {
          "ANY_ADDITIONAL_PROPERTY": 1
        },
        "seasonalStrength": null
      }
    ],
    "latentDiscoveryConfig": {
      "enabled": true,
      "residualCorrelationThreshold": 0.3,
      "ciTestAlpha": 0.05,
      "minClusterSize": 2,
      "maxLatentDim": 5
    },
    "nodeDomains": {
      "ANY_ADDITIONAL_PROPERTY": {
        "min": 1,
        "max": 1
      }
    },
    "lastTimestampMs": null,
    "headCommit": 1,
    "trainedWindowSignature": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "trainedWindowProfile": {
      "ANY_ADDITIONAL_PROPERTY": {
        "count": null,
        "distinct": null,
        "min": null,
        "max": null
      }
    },
    "resolvedInputs": [
      {
        "datasetId": "text",
        "versionId": null,
        "deltaVersion": 1
      }
    ],
    "updateEligibility": {
      "updateMode": "assimilable",
      "reasons": [
        "text"
      ],
      "newRows": null,
      "fromTsMs": null,
      "toTsMs": null,
      "historyDiff": {
        "changedColumns": [
          {
            "column": "text",
            "stored": {
              "count": null,
              "distinct": null,
              "min": null,
              "max": null
            },
            "current": {
              "count": null,
              "distinct": null,
              "min": null,
              "max": null
            }
          }
        ],
        "deltaOperations": [
          {
            "datasetId": "text",
            "version": 1,
            "operation": "text",
            "timestampMs": null
          }
        ],
        "rewrittenDatasets": [
          "text"
        ]
      }
    },
    "trainingStages": {
      "confounderModelling": true,
      "equationDiscovery": true,
      "lagScreening": null,
      "evalHorizons": [
        {
          "count": 1,
          "unit": "S"
        }
      ]
    },
    "timeComponent": {
      "models": {
        "ANY_ADDITIONAL_PROPERTY": {
          "theilSenSlope": 1,
          "theilSenIntercept": 1,
          "harmonic": {
            "periodsWithHarmonics": [
              []
            ],
            "sinCosCoefficients": [
              1
            ],
            "productPairs": [
              []
            ],
            "productCoefficients": [
              1
            ]
          }
        }
      },
      "varExplained": {
        "ANY_ADDITIONAL_PROPERTY": 1
      },
      "trainNSamples": 1
    },
    "causalAlgorithmVersion": null,
    "digitalTwinAlgorithmVersion": null,
    "shardCount": 1,
    "maxLag": 1,
    "layout": {
      "success": true,
      "positions": {
        "ANY_ADDITIONAL_PROPERTY": {
          "x": 1,
          "y": 1
        }
      },
      "edgeWaypoints": {
        "ANY_ADDITIONAL_PROPERTY": {
          "x": 1,
          "y": 1
        }
      }
    },
    "lifecycleState": "created",
    "currentTaskId": null,
    "failureContext": {
      "error": "text",
      "failedAtStage": "causal_discovery",
      "retryable": true,
      "userFacing": false
    },
    "traces": {
      "ANY_ADDITIONAL_PROPERTY": {
        "start": null,
        "end": null,
        "name": null
      }
    },
    "arrayFeatureMap": {
      "ANY_ADDITIONAL_PROPERTY": [
        "text"
      ]
    },
    "arrayFeatureToBase": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    }
  }
}

Delete an environment group

delete
/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups/{groupId}

Removes the group from the twin. Nothing downstream is deleted: simulation runs scoped to the group keep the membership frozen on their environmentGroupSnapshots, and any saved link to the group id simply stops resolving. 404 when the twin has no group with this id.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
groupIdstringRequired

Path parameter: groupId

Example: 123
Responses
204

No Content

No content

delete/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups/{groupId}
DELETE /api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups/{groupId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update an environment group

patch
/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups/{groupId}

Renames an environment group and/or replaces its membership rule. Send at least one of name or definition; a definition replaces the stored one wholesale rather than merging into it. Names stay unique per twin, so a colliding rename is 409 Conflict. Groups are twin-level, so the change applies to every version at once — a saved group is re-resolved against whichever version reads it next, and runs already submitted keep the membership frozen on their snapshots.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
groupIdstringRequired

Path parameter: groupId

Example: 123
Body
namestring · min: 1 · max: 120Optional

New display name; unique per twin

Responses
200

Successful response

application/json
patch/api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups/{groupId}
PATCH /api/v1/workspaces/{wsId}/digital-twins/{id}/environment-groups/{groupId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 309

{
  "name": "text",
  "definition": {
    "mode": "columnValues",
    "columnValues": {
      "ANY_ADDITIONAL_PROPERTY": [
        "text"
      ]
    },
    "environments": [
      {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    ],
    "statFilters": {
      "booleanOperator": "AND",
      "filters": [
        {
          "column": "text",
          "comparisonOperator": "text",
          "value": "text",
          "reduce": "value"
        }
      ]
    },
    "agreementThreshold": 1
  }
}
{
  "data": {
    "id": "text",
    "name": "text",
    "definition": {
      "mode": "columnValues",
      "columnValues": {
        "ANY_ADDITIONAL_PROPERTY": [
          "text"
        ]
      },
      "environments": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "statFilters": {
        "booleanOperator": "AND",
        "filters": [
          {
            "column": "text",
            "comparisonOperator": "text",
            "value": "text",
            "reduce": "value"
          }
        ]
      },
      "agreementThreshold": 1
    },
    "createdAt": "text",
    "createdBy": null,
    "updatedAt": null,
    "splitColumn": null,
    "splitValue": null
  }
}

Get version

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}

Returns one version by id from platform MongoDB. Version must belong to this twin and workspace. Includes causalGraph, nodes, inputFields, lifecycleState, variableRoles, temporalDependencies, evaluation, and the data it models as datasetId or sourceId (matching how the twin was created).

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Delete version

delete
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}

Deletes the version. Proxies DELETE to data-service so orchestrator/model state is removed; platform version record is not deleted by this route. Requires digital-twins:delete and full permission.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
204

No Content

No content

delete/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}
DELETE /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId} HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Download completed export

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/export/{pipelineRunId}/download

Streams the completed export zip (application/zip). 404 if the run does not exist in this workspace; 409 while the export job is still running. Requires exports:read scope.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
pipelineRunIdstringRequired

Path parameter: pipelineRunId

Example: 123
Responses
200

Successful response

application/octet-stream
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/export/{pipelineRunId}/download
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/export/{pipelineRunId}/download HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Run causal discovery

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/discover

Runs causal discovery for this version (infers causal graph from data). Proxies to data-service execute-causal-discovery. Returns 202 with jobId (pipelineRunId or workflowId) and links (self, cancel). Poll jobs/{jobId} for status; when complete, the version's causal graph is updated. Optional body: webhookUrl — POSTed once (best effort, unsigned) when the job reaches a terminal state; polling stays the source of truth.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
webhookUrlstring · nullableOptional
Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/discover
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/discover HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "webhookUrl": null
}
{
  "data": {
    "jobId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "cancel": "text"
    }
  }
}

List the version's environments

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environments

Multi-environment (panel) twins: returns environmentColumns and the environments the version's data contains — each with its envKey, column values, and sample size. Works before training (computed from the data, cached server-side). Use the envKeys to target specific environments in sample, intervene, and forecast calls.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environments
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environments HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Get model evaluation

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/evaluation

Returns evaluation and panelEvaluation for this version from platform MongoDB. No proxy; values are set when training or run-pipeline completes. Null if not yet evaluated.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/evaluation
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/evaluation HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Get causal graph

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph

Returns the version's causal graph: relationships (edges), nodes, and fixedSubGraph (user-fixed edges/anti-edges). Read from platform MongoDB.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Replace causal graph

put
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph

Replaces the entire causal graph. Body: relationships (array of {source, target, strength?}), nodes (array of {name, nodeType, type}). Overwrites causalGraph and nodes in platform MongoDB. fixedSubGraph is left unchanged — pin or forbid edges through graph/fixed.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
put/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph
PUT /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "relationships": [
    {
      "source": "text",
      "target": "text",
      "strength": 1
    }
  ],
  "nodes": [
    {
      "name": "text",
      "nodeType": "text",
      "type": "text"
    }
  ]
}
{
  "data": "text"
}

Get version parameters

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/params

Returns learned or configured parameters for this version (e.g. model params). Proxies to data-service GET /api/digital-twin/{twinId}/version/{vId}/params. Only available after training or pipeline run.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/params
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/params HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Run full pipeline

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/run-pipeline

Runs the full digital-twin pipeline: discovery (if needed), temporal dependencies, variable roles, training. Version must have a dataset (datasetId). Platform fetches the dataset schema and may auto-populate inputFields on the version if empty. Proxies to data-service execute-full-pipeline. Returns 202 with jobId and links (self, cancel). Poll jobs/{jobId} for completion. Optional body: webhookUrl — POSTed once (best effort, unsigned) at the terminal state.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
webhookUrlstring · nullableOptional
Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/run-pipeline
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/run-pipeline HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "webhookUrl": null
}
{
  "data": {
    "jobId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "cancel": "text"
    }
  }
}

Sample raw draws from the trained model

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/sample

Runs conditional sampling in-process on the trained model and returns the raw joint posterior draws, columnar — the primitive every simulation family is built on. Body: spec (InterventionSpec | TimeSeriesInterventionSpec | PanelInterventionSpec with interventions, valueSpecs, and optional conditions), n (default 1000, max 100000), seed (panel twins derive stable per-environment child seeds from it). Non-panel twins answer {columns: {column: values}, n}; panel twins answer {environments: {envKey: {column: values}}, n}, each environment sampled independently. Version must be trained. Synchronous — no job to poll.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
ninteger · min: 1 · max: 100000Optional

Number of joint posterior draws (default 1000)

seedinteger · nullableOptional

Reproducibility seed. Panel twins derive a stable per-environment child seed from it.

Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/sample
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/sample HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "spec": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "n": 1,
  "seed": 1
}
{
  "data": "text"
}

Generate scenario from natural-language query

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/scenario-from-query

Generates a structured simulation scenario from a natural-language query using the platform LLM (same generator as the New Simulation wizard's Generate from Query). Body: query, optional scenarioType. Proxies to data-service scenario-from-query. Returns the generated scenario plus a validation report; run it via POST simulations.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
querystring · min: 1Required
scenarioTypestring · nullableOptional
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/scenario-from-query
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/scenario-from-query HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "query": "text",
  "scenarioType": null
}
{
  "data": "text"
}

Score rows against targets

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/score

Batch counterfactual scoring: for each supplied row, the trained model finds the smallest set of changes that reaches the target outcome(s). Static trained twins only. Body: rows (≤500; keys name twin variables, a non-variable column becomes the row label), targets ([{variable, value, matchMode?}]), maxChanges (default 3), constraints, webhookUrl. Returns 202 with runId; read the verdicts back via GET simulations/{runId}/score once completed.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
maxChangesinteger · min: 1 · max: 10Optional

Most changes a counterfactual may make per row (default 3)

webhookUrlstring · uri · nullableOptional

Optional URL called once when the run completes

Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/score
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/score HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 253

{
  "rows": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "targets": [
    {
      "variable": "text",
      "value": null,
      "matchMode": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "maxChanges": 1,
  "constraints": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "webhookUrl": "https://example.com"
}
{
  "data": {
    "runId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "results": "text"
    }
  }
}

Get temporal dependencies

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/temporal-dependencies

Returns temporal dependencies for this version. If already stored on the version (platform MongoDB), returns that; otherwise computes them from the version's dataset via the data-service and returns the result (not persisted by this call).

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/temporal-dependencies
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/temporal-dependencies HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Set temporal dependencies

put
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/temporal-dependencies

Stores temporal dependencies in the version (platform MongoDB). Body: object as returned by GET. Used to override or persist computed dependencies.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
put/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/temporal-dependencies
PUT /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/temporal-dependencies HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "prerequisites": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  }
}
{
  "data": "text"
}

Train digital twin model

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/train

Starts training for this version. Proxies to data-service create-digital-twin (orchestrator). Returns 202 with jobId (pipelineRunId or workflowId) and links (self, cancel). Poll jobs/{jobId} for status. Optional body: webhookUrl — POSTed once (best effort, unsigned) at the terminal state.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
webhookUrlstring · nullableOptional
Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/train
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/train HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "webhookUrl": null
}
{
  "data": {
    "jobId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "cancel": "text"
    }
  }
}

Check whether the model can assimilate new data

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/update-eligibility

Reports whether update-model would find new data and whether it can be assimilated incrementally: pending row counts, drift signals, and the recommended action (update vs retrain). Read-only and cheap — orchestrators should call this before firing update-model.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/update-eligibility
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/update-eligibility HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Assimilate new data into the trained model

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/update-model

Folds data added to the version's backing source or dataset since the last train/update into the trained model incrementally — no retrain. No request body: new data reaches the model by extending or syncing the source first, then calling this. Requires lifecycleState trained. The job SUCCEEDS with a terminal status rather than failing: committed (new rows folded in), up_to_date (nothing new), or retrain_required (the model cannot take these rows incrementally — the data drifted structurally, or the twin kind does not assimilate: static and temporal twins do out of the box, panel twins need the v2 panel engine, multi-environment-static does not; metadata.reasons says which). One update runs per version at a time; a concurrent call returns 409. Check GET update-eligibility first to know the likely outcome without starting a job. Optional body: webhookUrl — POSTed once (best effort, unsigned) at the terminal state.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
webhookUrlstring · nullableOptional
Responses
202

Accepted; poll the linked resource for completion

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/update-model
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/update-model HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "webhookUrl": null
}
{
  "data": {
    "jobId": "text",
    "status": "text",
    "createdAt": "text",
    "links": {
      "self": "text",
      "cancel": "text"
    }
  }
}

Get variable roles

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/variable-roles

Returns variable roles (input/target/etc.) for this version. If version.variableRoles exists in platform MongoDB, returns it; otherwise computes them from the version's dataset via the data-service (not persisted).

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/variable-roles
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/variable-roles HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Set variable roles

put
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/variable-roles

Stores variable roles on the version (platform MongoDB). Body: record of variable role assignments. Overwrites existing variableRoles. Roles naming a variable outside the version's input fields are dropped, so the stored roles always describe the variables the version was trained on; the stored value is what the response returns.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
sourcesstring[]Required
targetsstring[]Required
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
put/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/variable-roles
PUT /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/variable-roles HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 39

{
  "sources": [
    "text"
  ],
  "targets": [
    "text"
  ]
}
{
  "data": "text"
}

Resolve an environment group against a version

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environment-groups/resolve

Multi-environment (panel) twins: turns a group's declarative rule into the concrete environments it matches on this version. Send exactly one of groupId (a group saved on the twin) or definition (an ad-hoc rule, resolved without saving). Returns environmentColumns, the matching combos, their envKeys, sampleSize, totalEnvCount (environments this version has causal-discovery evidence for), unresolvedEnvCount, and — for statFilters rules — matchedBeforeEvidenceFilter, how many environments the filter selected in the data before intersecting with that evidence.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
groupIdstringOptional

Id of a saved environment group on this twin

Responses
200

Successful response

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environment-groups/resolve
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environment-groups/resolve HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 312

{
  "groupId": "text",
  "definition": {
    "mode": "columnValues",
    "columnValues": {
      "ANY_ADDITIONAL_PROPERTY": [
        "text"
      ]
    },
    "environments": [
      {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    ],
    "statFilters": {
      "booleanOperator": "AND",
      "filters": [
        {
          "column": "text",
          "comparisonOperator": "text",
          "value": "text",
          "reduce": "value"
        }
      ]
    },
    "agreementThreshold": 1
  }
}
{
  "data": {
    "groupId": null,
    "name": null,
    "environmentColumns": [
      "text"
    ],
    "environments": [
      {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    ],
    "envKeys": [
      "text"
    ],
    "sampleSize": 1,
    "totalEnvCount": 1,
    "unresolvedEnvCount": 0,
    "matchedBeforeEvidenceFilter": null,
    "unresolvable": {
      "reason": "noEnvironmentColumns",
      "message": "text",
      "columns": [
        "text"
      ]
    }
  }
}

Query environments by data statistics

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environments/resolve

Panel twins: resolves a stat-filter group to the concrete environments it matches — filter on ANY twin column, not just the environment columns, via per-environment aggregates (mean/min/max), constant values, or categorical presence (any). Returns environmentColumns, the matching environments as {column: value} combos, their envKeys, sampleSize, and totalEnvCount. Feed the combos to graph/slice or scope simulations with them. Example: {statFilters: {booleanOperator: "AND", filters: [{column: "revenue", reduce: "mean", comparisonOperator: ">", value: 400}]}}.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
Responses
200

Successful response

application/json
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environments/resolve
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/environments/resolve HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "statFilters": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
{
  "data": {
    "groupId": null,
    "name": null,
    "environmentColumns": [
      "text"
    ],
    "environments": [
      {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    ],
    "envKeys": [
      "text"
    ],
    "sampleSize": 1,
    "totalEnvCount": 1,
    "unresolvedEnvCount": 0,
    "matchedBeforeEvidenceFilter": null,
    "unresolvable": {
      "reason": "noEnvironmentColumns",
      "message": "text",
      "columns": [
        "text"
      ]
    }
  }
}

Get fixed subgraph

get
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/fixed

Returns the version's fixed subgraph: relationships (edges pinned as present) and antiRelationships (edges forbidden). Empty arrays when nothing is fixed.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
get/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/fixed
GET /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/fixed HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": "text"
}

Patch fixed subgraph

patch
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/fixed

Applies incremental domain knowledge to the fixed subgraph. Body: addEdges ([{source, target}]) pins edges as present; removeEdges ([{source, target}]) forbids them. Discovery and training respect the fixed subgraph on their next run. Returns the updated fixedSubGraph.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
patch/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/fixed
PATCH /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/fixed HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "addEdges": [
    {
      "source": "text",
      "target": "text"
    }
  ],
  "removeEdges": [
    {
      "source": "text",
      "target": "text"
    }
  ]
}
{
  "data": "text"
}

Aggregate the causal graph over an environment subset

post
/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/slice

Panel twins: re-aggregates the causal graph over a subset of environments and returns that subset's adjacency — causalGraph (edges with strength and cross-environment agreement), nodes, envCount, sampleSize, totalEnvCount, and the agreementThreshold used. The subset is given either inline or by reference. Inline, mode picks the rule: environments (exact combos, each {column: value}), columnValues (allowed values per environment column), or statFilters (select environments by per-environment aggregates). By reference, send {groupId} naming a saved environment group on this twin (see GET .../environment-groups) and, optionally, an agreementThreshold that overrides the one stored on the group for this call. agreementThreshold (0-1, default 0.5) sets the share of environments an edge must hold in to survive. Computed from stored causal-discovery evidence — no retraining, read-only. 422 when the subset matches no environments with evidence; POST .../environment-groups/resolve answers the same question without the 422 when you only want the membership. List the environments first via GET .../environments.

Authorizations
AuthorizationstringRequired

An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one.

Path parameters
wsIdstringRequired

Path parameter: wsId

Example: 123
idstringRequired

Path parameter: id

Example: 123
vIdstringRequired

Path parameter: vId

Example: 123
Body
or
Responses
200

Successful response

application/json
dataany of · nullableRequired

Payload not declared in this repo

stringOptional
or
numberOptional
or
booleanOptional
or
or
post/api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/slice
POST /api/v1/workspaces/{wsId}/digital-twins/{id}/versions/{vId}/graph/slice HTTP/1.1
Host: sandbox.rootcause.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 203

{
  "mode": "columnValues",
  "columnValues": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "environments": [
    {
      "ANY_ADDITIONAL_PROPERTY": "text"
    }
  ],
  "statFilters": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "agreementThreshold": 1
}
{
  "data": "text"
}

Last updated