:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"alert": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ID of the saved alert this preview is for. The AI detector reads the points that the alert's earlier AI checks fired on, the same way a live check does. Omit it for a new alert."
},
"config": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"check_ongoing_interval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "When true, evaluate the current (still incomplete) time interval in addition to completed ones."
},
"series_index": {
"description": "Zero-based index of the series in the insight's query to monitor.",
"type": "number"
},
"type": {
"default": "TrendsAlertConfig",
"enum": ["TrendsAlertConfig"],
"type": "string"
}
},
"required": ["series_index"],
"type": "object"
},
{
"properties": {
"column": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Name of the result column to evaluate. When unset, the single numeric column is used (an error if the result has more than one numeric column)."
},
"evaluation": {
"description": "How to read the result rows — an explicit choice, no implicit default.",
"enum": ["last_row", "first_row", "any_row"],
"type": "string"
},
"label_column": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Column whose value labels the evaluated row(s) in breach messages: every row in `any_row` mode, or the single evaluated row in `last_row`/`first_row`. When unset, the first non-evaluated column is used, falling back to the row number (any_row) or the value column name (last_row/first_row)."
},
"type": {
"default": "HogQLAlertConfig",
"enum": ["HogQLAlertConfig"],
"type": "string"
}
},
"required": ["evaluation"],
"type": "object"
},
{
"properties": {
"check_ongoing_interval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "When true, evaluate the current (still in-progress) period; by default only completed periods are used."
},
"funnel_step": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Zero-based step index to evaluate. Null = the last step (overall conversion)."
},
"metric": {
"enum": ["conversion_from_start", "conversion_from_previous"],
"type": "string"
},
"type": {
"default": "FunnelsAlertConfig",
"enum": ["FunnelsAlertConfig"],
"type": "string"
}
},
"required": ["metric"],
"type": "object"
},
{
"properties": {
"check_ongoing_interval": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "When true, anchor on the trailing (possibly still accumulating) bucket instead of the last complete one."
},
"type": {
"default": "MetricsAlertConfig",
"enum": ["MetricsAlertConfig"],
"type": "string"
},
"variables": {
"anyOf": [
{
"additionalProperties": {
"properties": {
"all": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"values": {
"description": "The selected values. Empty when `all` is true: All stands for every option of the variable.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["values"],
"type": "object"
},
"propertyNames": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Values for the `$name` variables in the insight's query."
}
},
"type": "object"
}
],
"description": "Per-insight-kind alert config, discriminated by ``type`` — keeps the OpenAPI (and the\ngenerated frontend types and MCP tool schemas) in sync with every kind alerts support."
},
{
"type": "null"
}
],
"description": "Per-insight-kind alert config. For SQL insights, selects the evaluated column and read direction (last_row/first_row) so the preview matches the alert; ignored for trends."
},
"date_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Relative date string for how far back to simulate (e.g. '-24h', '-30d', '-4w'). If not provided, uses the detector's minimum required samples. Trends insights only — a SQL query's own rows are the series."
},
"detector_config": {
"anyOf": [
{
"properties": {
"detectors": {
"description": "Sub-detector configurations (minimum 2)",
"items": {
"anyOf": [
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "zscore",
"enum": ["zscore"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating mean/std (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "mad",
"enum": ["mad"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating median/MAD (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "IQR multiplier for fence calculation (default: 1.5, use 3.0 for far outliers)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "iqr",
"enum": ["iqr"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating quartiles (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"lower_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Lower bound - values below this are anomalies"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "threshold",
"enum": ["threshold"],
"type": "string"
},
"upper_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound - values above this are anomalies"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ecod",
"enum": ["ecod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "copod",
"enum": ["copod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_estimators": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of trees in the forest (default: 100)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "isolation_forest",
"enum": ["isolation_forest"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"method": {
"anyOf": [
{
"enum": ["largest", "mean", "median"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Distance method: 'largest', 'mean', 'median' (default: 'largest')"
},
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors to consider (default: 5)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "knn",
"enum": ["knn"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_bins": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of histogram bins (default: 10)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "hbos",
"enum": ["hbos"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors for LOF (default: 20)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "lof",
"enum": ["lof"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"kernel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "SVM kernel type (default: \"rbf\")"
},
"nu": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound on training errors fraction (default: 0.1)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ocsvm",
"enum": ["ocsvm"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "pca",
"enum": ["pca"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
}
]
},
"type": "array"
},
"operator": {
"description": "How to combine sub-detector results",
"enum": ["and", "or"],
"type": "string"
},
"type": {
"default": "ensemble",
"enum": ["ensemble"],
"type": "string"
}
},
"required": ["detectors", "operator"],
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "zscore",
"enum": ["zscore"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating mean/std (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9)"
},
"type": {
"default": "mad",
"enum": ["mad"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating median/MAD (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "IQR multiplier for fence calculation (default: 1.5, use 3.0 for far outliers)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "iqr",
"enum": ["iqr"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size for calculating quartiles (default: 30)"
}
},
"type": "object"
},
{
"properties": {
"lower_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Lower bound - values below this are anomalies"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"type": {
"default": "threshold",
"enum": ["threshold"],
"type": "string"
},
"upper_bound": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound - values above this are anomalies"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ecod",
"enum": ["ecod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "copod",
"enum": ["copod"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_estimators": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of trees in the forest (default: 100)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "isolation_forest",
"enum": ["isolation_forest"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"method": {
"anyOf": [
{
"enum": ["largest", "mean", "median"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Distance method: 'largest', 'mean', 'median' (default: 'largest')"
},
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors to consider (default: 5)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "knn",
"enum": ["knn"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_bins": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of histogram bins (default: 10)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "hbos",
"enum": ["hbos"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"n_neighbors": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of neighbors for LOF (default: 20)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "lof",
"enum": ["lof"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"kernel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "SVM kernel type (default: \"rbf\")"
},
"nu": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Upper bound on training errors fraction (default: 0.1)"
},
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "ocsvm",
"enum": ["ocsvm"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"preprocessing": {
"anyOf": [
{
"properties": {
"diffs_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0)"
},
"lags_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Number of lag features. 0 = none, >0 = include n lagged values (default: 0)"
},
"smooth_n": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0)"
}
},
"type": "object"
},
{
"type": "null"
}
],
"description": "Preprocessing transforms applied before detection"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Anomaly probability threshold (default: 0.9)"
},
"type": {
"default": "pca",
"enum": ["pca"],
"type": "string"
},
"window": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "Rolling window size — how many historical data points to train on (default: based on calculation interval)"
}
},
"type": "object"
},
{
"properties": {
"instructions": {
"anyOf": [
{
"maxLength": 2000,
"type": "string"
},
{
"type": "null"
}
],
"description": "What counts as unusual or interesting for this metric, in your own words. Optional."
},
"type": {
"default": "llm",
"enum": ["llm"],
"type": "string"
}
},
"type": "object"
}
],
"description": "Detector configuration to simulate. Omit it to use the default daily z-score detector (threshold 0.95, window 90, first-difference preprocessing)."
},
"evaluation_delay_intervals": {
"default": 0,
"description": "Skip this many completed insight intervals before simulation, matching live evaluation. Time-series Trends only; a positive delay requires check_ongoing_interval=false.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"insight": {
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Numeric insight ID or saved insight short ID to simulate the detector on."
},
"series_index": {
"default": 0,
"description": "Zero-based index of the series to analyze (trends insights only).",
"type": "number"
}
},
"required": ["insight"],
"type": "object"
}