public-api
public-metrics

Metrics Dry Run

Dry-run a metric threshold against historical snapshots.

Tests how often a proposed threshold would have triggered alerts based on historical metric values.

SDK Usage:

from anomalyarmor import Client
client = Client()
result = client.metrics.dry_run(
    asset_id="asset-uuid",
    metric_id="metric-uuid",
    threshold_type="upper",
    threshold_value=1000,
    lookback_days=7,
)
print(f"Alert rate: {result.alert_rate_percent}%")
print(f"Recommendation: {result.recommendation}")
post/api/v1/sdk/metrics/dry-run

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/api/v1/sdk/metrics/dry-run
  • Auth: none declared

Headers

Authorizationstring

Request body

asset_idstring required

Asset UUID or qualified name

metric_idstring required

Metric UUID to test

threshold_typestring required

Type of threshold: 'upper', 'lower', 'deviation'

threshold_valuenumber required

Threshold value to test (absolute or percent deviation)

lookback_daysinteger

Days of history to analyze

Response

Successful Response

successboolean required
dataunknown
messagestring nullable
errorstring nullable
metaobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.