Webhook
Mona allows receiving notifications via any webhook URL, using the "webhooks" key.
Below is an example of an insight JSON as it is sent via the webhook.
The JSON includes metadata about the insight, the main "signal" which the insight is based on, other related "signals", and enrichment data for the insight if exists.
Note that the call is a POST request.
{
"insights": [
{
"user_id": "<YOUR_USER_ID>",
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"stanza_name": "loan",
"verse_name": "loan__AverageDrift",
"score": 3.602425108045929,
"main_signal": {
"user_id": "<YOUR_USER_ID>",
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"stanza_name": "loan",
"verse_name": "loan__AverageDrift",
"timestamp": 1619654400,
"signal_type": "KapiAverageDriftInSegment",
"is_desc": true,
"anomaly_level": 0.12277031924748652,
"value": 7763.624505928854,
"benchmark": 8803.671052631578,
"std": 8471.481976080446,
"segment": {
"purpose": [
{
"value": "Vacation costs"
}
]
},
"segment_size": 861.0,
"segment_ratio": 0.03511660394054663,
"baseline_segment": {
"stage": [
{
"value": "inference"
}
]
},
"is_score_inf": false,
"kapi": "offered_amount",
"params": {
"MIN_SEGMENT_SIZE": 500,
"MAX_SEGMENT_SIZE": null,
"STD_MULTIPLIER_THRESHOLD": 0.1,
"AVERAGE_EPSILON": 0.01
},
"verse": {
"always_segment_baseline_by": [],
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"avoid_related_anomalies_for": [],
"avoid_same_field_for_segment_and_metric": true,
"avoid_segmenting_on_missing": false,
"baseline_min_segment_size": 1,
"baseline_segment": "{\"stage\": [{\"value\": \"inference\"}]}",
"benchmark_baseline_min_segment_size": 1,
"benchmark_baseline_segment": "{}",
"benchmark_max_segment_size": null,
"benchmark_max_segment_size_fraction": null,
"benchmark_min_segment_size": 100,
"benchmark_min_segment_size_fraction": 0,
"benchmark_set_period": "6w",
"benchmark_set_period_type": "previous_to_target",
"cadence": "1d",
"create_extra_adjacent_signals": true,
"default_urgency": "normal",
"description": "",
"disabled": false,
"enhance_exclude_segments": false,
"epsilon": 0.01,
"exclude_segments": [],
"expire_after": "3d",
"field_vectors": [],
"find_related_anomalies_for": [],
"high_urgency_baseline_min_segment_size": null,
"high_urgency_benchmark_baseline_min_segment_size": null,
"high_urgency_benchmark_min_segment_size": null,
"high_urgency_benchmark_min_segment_size_fraction": null,
"high_urgency_min_anomaly_level": null,
"high_urgency_min_score": null,
"high_urgency_min_segment_size": 600,
"high_urgency_min_segment_size_fraction": null,
"high_urgency_require_all_criteria": true,
"high_urgency_target_baseline_min_segment_size": null,
"high_urgency_target_min_segment_size": null,
"high_urgency_target_min_segment_size_fraction": null,
"investigate_no_drill": false,
"max_segment_baseline_by_depth": 2,
"max_segment_by_depth": 2,
"max_segment_size": null,
"max_segment_size_fraction": null,
"metrics": [
"credit_score",
"offered_approved_delta_normalized",
"credit_label_delta",
"offered_amount",
"approved_amount"
],
"min_anomaly_level": 0.1,
"min_score": 0.0,
"min_segment_baseline_by_depth": 0,
"min_segment_by_depth": 0,
"min_segment_size": 500,
"min_segment_size_fraction": 0,
"min_target_benchmark_size_ratio": 0.01,
"name": "loan__AverageDrift",
"no_std_mode_min_diff_percent": 25.0,
"no_std_mode_min_segment_size": -1,
"no_std_mode_reference_values": [
0
],
"related_anomalies_min_correlation": 0.3,
"score_anomaly_level_exponent": 1.0,
"score_anomaly_level_multiplier": 1.0,
"score_segment_size_exponent": 0.5,
"score_segment_size_log_base": 0.0,
"score_use_segment_absolute_size": true,
"segment_baseline_by": [],
"segment_by": [
"\"purpose\"",
"\"occupation\"",
"\"stage\""
],
"signal_type": "KapiAverageDriftInSegment",
"stanza_name": "loan",
"target_baseline_min_segment_size": 1,
"target_baseline_segment": "{}",
"target_max_segment_size": null,
"target_max_segment_size_fraction": null,
"target_min_segment_size": 100,
"target_min_segment_size_fraction": 0,
"target_set_period": "2w",
"time_resolution": "1d",
"timestamp_field_name": "timestamp",
"timezone": "UTC",
"trend_directions": [
"desc"
],
"user_id": "<YOUR_USER_ID>",
"verse_type": "AverageDrift"
},
"is_valid": true,
"config_verse_key": "d69b950c806f17c025h39rn3d349784b5e",
"urgency": "high",
"creation_timestamp_millis": 1663066279000,
"summary_id": "c767c8b9-92c7-4220-bd5f-db1d38ad346a",
"time_resolution": null,
"target_timerange": [
1618444800,
1619654400
],
"target_total_size": 253.0,
"target_size_avg": null,
"target_size_ratio": 0.04211752954885967,
"benchmark_total_size": 608.0,
"benchmark_size_avg": null,
"benchmark_timerange": [
1614816000,
1618444800
],
"benchmark_size_ratio": 0.03220338983050847,
"target_baseline_segment": {
"stage": [
{
"value": "inference"
}
]
},
"benchmark_baseline_segment": {
"stage": [
{
"value": "inference"
}
]
},
"segment_json_representation": "{\"purpose\": [{\"value\": \"Vacation costs\"}]}"
},
"related_signals": [
{
"user_id": "<YOUR_USER_ID>",
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"stanza_name": "loan",
"verse_name": "loan__AverageDrift",
"timestamp": 1619654400,
"signal_type": "KapiAverageDriftInSegment",
"is_desc": true,
"anomaly_level": 0.12277031924748652,
"value": 7763.624505928854,
"benchmark": 8803.671052631578,
"std": 8471.481976080446,
"segment": {
"stage": [
{
"value": "inference"
}
],
"purpose": [
{
"value": "Vacation costs"
}
]
},
"segment_size": 861.0,
"segment_ratio": 0.03511660394054663,
"baseline_segment": {
"stage": [
{
"value": "inference"
}
]
},
"is_score_inf": false,
"kapi": "offered_amount",
"params": {
"MIN_SEGMENT_SIZE": 500,
"MAX_SEGMENT_SIZE": null,
"STD_MULTIPLIER_THRESHOLD": 0.1,
"AVERAGE_EPSILON": 0.01
},
"verse": {
"always_segment_baseline_by": [],
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"avoid_related_anomalies_for": [],
"avoid_same_field_for_segment_and_metric": true,
"avoid_segmenting_on_missing": false,
"baseline_min_segment_size": 1,
"baseline_segment": "{\"stage\": [{\"value\": \"inference\"}]}",
"benchmark_baseline_min_segment_size": 1,
"benchmark_baseline_segment": "{}",
"benchmark_max_segment_size": null,
"benchmark_max_segment_size_fraction": null,
"benchmark_min_segment_size": 100,
"benchmark_min_segment_size_fraction": 0,
"benchmark_set_period": "6w",
"benchmark_set_period_type": "previous_to_target",
"cadence": "1d",
"create_extra_adjacent_signals": true,
"default_urgency": "normal",
"description": "",
"disabled": false,
"enhance_exclude_segments": false,
"epsilon": 0.01,
"exclude_segments": [],
"expire_after": "3d",
"field_vectors": [],
"find_related_anomalies_for": [],
"high_urgency_baseline_min_segment_size": null,
"high_urgency_benchmark_baseline_min_segment_size": null,
"high_urgency_benchmark_min_segment_size": null,
"high_urgency_benchmark_min_segment_size_fraction": null,
"high_urgency_min_anomaly_level": null,
"high_urgency_min_score": null,
"high_urgency_min_segment_size": 600,
"high_urgency_min_segment_size_fraction": null,
"high_urgency_require_all_criteria": true,
"high_urgency_target_baseline_min_segment_size": null,
"high_urgency_target_min_segment_size": null,
"high_urgency_target_min_segment_size_fraction": null,
"investigate_no_drill": false,
"max_segment_baseline_by_depth": 2,
"max_segment_by_depth": 2,
"max_segment_size": null,
"max_segment_size_fraction": null,
"metrics": [
"credit_score",
"offered_approved_delta_normalized",
"credit_label_delta",
"offered_amount",
"approved_amount"
],
"min_anomaly_level": 0.1,
"min_score": 0.0,
"min_segment_baseline_by_depth": 0,
"min_segment_by_depth": 0,
"min_segment_size": 500,
"min_segment_size_fraction": 0,
"min_target_benchmark_size_ratio": 0.01,
"name": "loan__AverageDrift",
"no_std_mode_min_diff_percent": 25.0,
"no_std_mode_min_segment_size": -1,
"no_std_mode_reference_values": [
0
],
"related_anomalies_min_correlation": 0.3,
"score_anomaly_level_exponent": 1.0,
"score_anomaly_level_multiplier": 1.0,
"score_segment_size_exponent": 0.5,
"score_segment_size_log_base": 0.0,
"score_use_segment_absolute_size": true,
"segment_baseline_by": [],
"segment_by": [
"\"purpose\"",
"\"occupation\"",
"\"stage\""
],
"signal_type": "KapiAverageDriftInSegment",
"stanza_name": "loan",
"target_baseline_min_segment_size": 1,
"target_baseline_segment": "{}",
"target_max_segment_size": null,
"target_max_segment_size_fraction": null,
"target_min_segment_size": 100,
"target_min_segment_size_fraction": 0,
"target_set_period": "2w",
"time_resolution": "1d",
"timestamp_field_name": "timestamp",
"timezone": "UTC",
"trend_directions": [
"desc"
],
"user_id": "<YOUR_USER_ID>",
"verse_type": "AverageDrift"
},
"is_valid": true,
"config_verse_key": "d69b950c806f17c025h39rn3d349784b5e",
"urgency": "high",
"creation_timestamp_millis": 1663066279000,
"summary_id": "c767c8b9-92c7-4220-bd5f-db1d38ad346a",
"time_resolution": null,
"target_timerange": [
1618444800,
1619654400
],
"target_total_size": 253.0,
"target_size_avg": null,
"target_size_ratio": 0.04211752954885967,
"benchmark_total_size": 608.0,
"benchmark_size_avg": null,
"benchmark_timerange": [
1614816000,
1618444800
],
"benchmark_size_ratio": 0.03220338983050847,
"target_baseline_segment": {
"stage": [
{
"value": "inference"
}
]
},
"benchmark_baseline_segment": {
"stage": [
{
"value": "inference"
}
]
},
"segment_json_representation": "{\"stage\": [{\"value\": \"inference\"}], \"purpose\": [{\"value\": \"Vacation costs\"}]}"
}
],
"related_signals_enrichment": [
{
"minus_culprit_score": 0
}
],
"is_valid": true,
"config_verse_key": "d69b950c806f17c025h39rn3d349784b5e",
"creation_timestamp_millis": 1663066286000,
"summary_id": "330fd771-22e8-4ccb-9ccb-6ec1a41c880f",
"enrichments": {
"field_correlations_average_drift": [
{
"user_id": "<YOUR_USER_ID>",
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"stanza_name": "loan",
"verse_name": "loan__AverageDrift",
"timestamp": 1619654400,
"signal_type": "KapiAverageDriftInSegment",
"is_desc": true,
"anomaly_level": 0.23072252352334063,
"value": 972.1347353470887,
"benchmark": 1081.5576865534076,
"std": 474.2621116279933,
"segment": {},
"segment_size": 637.0,
"segment_ratio": 1.0,
"baseline_segment": {
"purpose": [
{
"value": "Vacation costs"
}
],
"stage": [
{
"value": "inference"
}
]
},
"is_score_inf": false,
"kapi": "feature_8",
"params": {
"MIN_SEGMENT_SIZE": 500,
"MAX_SEGMENT_SIZE": null,
"STD_MULTIPLIER_THRESHOLD": 0.1,
"AVERAGE_EPSILON": 0.01
},
"verse": {
"always_segment_baseline_by": [],
"arc_class": "LOAN_APPLICATION_TUTORIAL",
"avoid_related_anomalies_for": [],
"avoid_same_field_for_segment_and_metric": true,
"avoid_segmenting_on_missing": false,
"baseline_min_segment_size": 1,
"baseline_segment": "{\"purpose\": [{\"value\": \"Vacation costs\"}], \"stage\": [{\"value\": \"inference\"}]}",
"benchmark_baseline_min_segment_size": 1,
"benchmark_baseline_segment": "{}",
"benchmark_max_segment_size": null,
"benchmark_max_segment_size_fraction": null,
"benchmark_min_segment_size": 100,
"benchmark_min_segment_size_fraction": 0,
"benchmark_set_period": "6w",
"benchmark_set_period_type": "previous_to_target",
"cadence": "1d",
"create_extra_adjacent_signals": true,
"default_urgency": "normal",
"description": "",
"disabled": false,
"enhance_exclude_segments": false,
"epsilon": 0.01,
"exclude_segments": [
"{\"offered_amount\": [{\"value\": \"SpecialValueSemantics.MISSING\"}]}"
],
"expire_after": "3d",
"field_vectors": [],
"find_related_anomalies_for": [],
"high_urgency_baseline_min_segment_size": null,
"high_urgency_benchmark_baseline_min_segment_size": null,
"high_urgency_benchmark_min_segment_size": null,
"high_urgency_benchmark_min_segment_size_fraction": null,
"high_urgency_min_anomaly_level": null,
"high_urgency_min_score": null,
"high_urgency_min_segment_size": 600,
"high_urgency_min_segment_size_fraction": null,
"high_urgency_require_all_criteria": true,
"high_urgency_target_baseline_min_segment_size": null,
"high_urgency_target_min_segment_size": null,
"high_urgency_target_min_segment_size_fraction": null,
"investigate_no_drill": false,
"max_segment_baseline_by_depth": 2,
"max_segment_by_depth": 2,
"max_segment_size": null,
"max_segment_size_fraction": null,
"metrics": [
"feature_3",
"credit_score",
"feature_8",
"offered_approved_delta",
"offered_approved_delta_normalized",
"feature_2",
"approved_amount"
],
"min_anomaly_level": 0.1,
"min_score": 0.0,
"min_segment_baseline_by_depth": 0,
"min_segment_by_depth": 0,
"min_segment_size": 500,
"min_segment_size_fraction": 0,
"min_target_benchmark_size_ratio": 0.01,
"name": "loan__AverageDrift",
"no_std_mode_min_diff_percent": 25.0,
"no_std_mode_min_segment_size": -1,
"no_std_mode_reference_values": [
0
],
"related_anomalies_min_correlation": 0.3,
"score_anomaly_level_exponent": 1.0,
"score_anomaly_level_multiplier": 1.0,
"score_segment_size_exponent": 0.5,
"score_segment_size_log_base": 0.0,
"score_use_segment_absolute_size": true,
"segment_baseline_by": [],
"segment_by": [],
"signal_type": "KapiAverageDriftInSegment",
"stanza_name": "loan",
"target_baseline_min_segment_size": 1,
"target_baseline_segment": "{}",
"target_max_segment_size": null,
"target_max_segment_size_fraction": null,
"target_min_segment_size": 100,
"target_min_segment_size_fraction": 0,
"target_set_period": "2w",
"time_resolution": "1d",
"timestamp_field_name": "timestamp",
"timezone": "UTC",
"trend_directions": [
"asc",
"desc"
],
"user_id": "<YOUR_USER_ID>",
"verse_type": "AverageDrift"
},
"is_valid": true,
"config_verse_key": null,
"urgency": null,
"creation_timestamp_millis": null,
"summary_id": null,
"time_resolution": null,
"target_timerange": [
1618444800,
1619654400
],
"target_total_size": 191.0,
"target_size_avg": null,
"target_size_ratio": 1.0,
"benchmark_total_size": 446.0,
"benchmark_size_avg": null,
"benchmark_timerange": [
1614816000,
1618444800
],
"benchmark_size_ratio": 1.0,
"target_baseline_segment": {
"purpose": [
{
"value": "Vacation costs"
}
],
"stage": [
{
"value": "inference"
}
]
},
"benchmark_baseline_segment": {
"purpose": [
{
"value": "Vacation costs"
}
],
"stage": [
{
"value": "inference"
}
]
},
"enrichment_metric_correlation": 0.38947211738898047,
"segment_json_representation": "{}"
}
]
},
"urgency": "high",
"pregenerated_insights_ids": [],
"pregenerated_preceding_insights_ids": [],
"expire_at": 1619913600,
"start_timestamp": 1619654400,
"preceding_insights_ids": [],
"acked": false,
"_id": "66080819-a45f-4b8b-8c27-87dd158eaf85",
"verbal_notification_description": "When `purpose: \"Vacation costs\"` (baseline: `stage: \"inference\"`)\nAverage `offered_amount` declined *8803.671 -> 7763.625*\n\nBased on 253 records (last 2 weeks) vs 608 records (previous 6 weeks)"
}
]
}
For more information regarding how to send specific insights from Mona to a Webhook, see under "Notifications".
Updated about 2 years ago