metrics
metrics

Characterize a metric anomaly: compare an anomaly window against a baseline, find the onset, and rank which label values moved.

post/api/projects/{project_id}/metrics/characterize/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/metrics/characterize/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request body

Response

metric_namestring required

Metric that was characterized.

aggregationstring required

Aggregation used (auto-picked when not specified).

intervalstring required

Bucket size of the analysis grid.

baseline_fromstring required

Baseline window start, ISO 8601.

baseline_tostring required

Baseline window end, ISO 8601.

anomaly_fromstring required

Anomaly window start, ISO 8601.

anomaly_tostring required

Anomaly window end, ISO 8601.

baseline_meannumber double required

Mean over the baseline window.

baseline_stddevnumber double required

Population stddev over the baseline window.

anomaly_meannumber double required

Mean over the anomaly window.

anomaly_peaknumber double required

Maximum bucket value in the anomaly window.

change_rationumber double required

anomaly_mean / baseline_mean. A zero baseline yields anomaly_mean itself.

direction'up' | 'down' | 'flat' required
  • up - up
  • down - down
  • flat - flat
onset_timestring nullable required

First bucket clearly outside the baseline range (3 stddevs or 50% relative change), or null if no clear onset.

Changes

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