Endpoints
Metric Types
Get Metrics Summary
Response
List Metrics
Query Parameters
Response
Get Metric Details
Query Parameters
Response
Create Metric
Requires
read-write or admin scope.Request Body
Response
Update Metric
Requires
read-write or admin scope.Request Body
Delete Metric
Requires
read-write or admin scope.Response
Trigger Metric Capture
Requires
read-write or admin scope.Response
List Metric Snapshots
Query Parameters
Response
Use Case: Monitor Row Count Trends
Track daily row counts to detect unexpected data volume changes:Error Responses
Metric Not Found (404)
Validation Error (400)
Forbidden (403)
Common Questions
What’s the difference between a metric and a validity rule?
Metrics track numeric values over time (row counts, null percentages, mean, percentile) and alert on statistical anomalies via thesensitivity parameter. Validity rules (Validity API) enforce deterministic pass/fail constraints like NOT NULL, REGEX, or RANGE. Use metrics to catch drift, validity to catch explicit contract violations.
How does the sensitivity parameter affect anomaly detection?
Sensitivity is the z-score threshold for flagging a snapshot as anomalous, defaulting to 1.0. Raise it (e.g.2.0 or 3.0) to reduce false positives on noisy data, lower it to catch subtler shifts. Each captured snapshot returns z_score and is_anomaly so you can tune in production.
Can I capture a metric on demand outside its scheduled interval?
Yes.POST /api/v1/sdk/metrics/{asset_id}/{metric_id}/capture (or client.metrics.capture(...)) triggers an immediate capture and returns the new snapshot with anomaly status. This is useful for backfilling after creating a metric and for post-deploy validation without waiting for the next scheduled run.
Which metric types require a column_name?
Column-level types (null_percent, distinct_count, duplicate_count, min_value, max_value, mean, percentile) require column_name. row_count operates on the whole table and ignores column_name. percentile additionally needs percentile_value in the request body.