Retrieve Verse Params

Use this REST call to get a specific verse's parameters.

This can be done by leveraging the /get_verse_params REST endpoint.

In order to do so, first of all, users must have an authorization token for their account.
More info on generating a token here.

Once users have their accessToken they can add it to their authorization and send a POST request with the context_class, stanza_name and verse_name as args

curl --location --request POST 'https://api{YOUR-USER-ID}.monalabs.io/get_verse_params' \
--header 'Authorization: Bearer {YOUR-ACCESS-TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "context_class": "LOAN_APPLICATION",
    "stanza_name": "stanza_1",
    "verse_name": "stanza_1__AverageDrift"
}'
import requests
import json

url = "https://api{YOUR-USER-ID}.monalabs.io/get_verse_params"

payload = json.dumps({
  "context_class": "LOAN_APPLICATION",
  "stanza_name": "stanza_1",
  "verse_name": "stanza_1__AverageDrift"
})
headers = {
  'Authorization': 'Bearer {YOUR-ACCESS-TOKEN}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

The response will be a JSON with the complete configuration of a verse, including params set in the verse level, the stanza level, and the global default level. Also, the response will show params that were not overridden and have the system default.

{
    "response_data": {
        "always_segment_baseline_by": [],
        "arc_class": "LOAN_APPLICATION",
        "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": null,
        "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_label_delta",
            "offered_approved_delta_normalized",
            "approved_amount",
            "credit_score",
            "offered_amount"
        ],
        "min_anomaly_level": 0.2,
        "min_score": 0.0,
        "min_segment_baseline_by_depth": 0,
        "min_segment_by_depth": 0,
        "min_segment_size": 100,
        "min_segment_size_fraction": 0.005,
        "min_target_benchmark_size_ratio": 0.01,
        "name": "general__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": [
            "occupation",
            "city",
            "purpose"
        ],
        "signal_type": "KapiAverageDriftInSegment",
        "stanza_name": "general",
        "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",
        "timezone": "UTC",
        "trend_directions": [
            "asc",
            "desc"
        ],
        "user_id": "c0fbe9c4-d02e-44a6-8d23-30cedf118028",
        "verse_type": "AverageDrift"
    },
    "partial_data": false
}