provider metricsmetrics POST /api/environments/{environment_id}/metrics/samples/
@utdk/posthog /api/environments/{environment_id}/metrics/samples/
environments_metrics_samples_create
Raw individual emissions for a metric (the events model), newest first — backs the Samples view and the metric->trace pivot.
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsMetricsSamplesCreate
POST/api/environments/{environment_id}/metrics/samples/
Raw individual emissions for a metric (the events model), newest first — backs the Samples view and the metric->trace pivot.

Parameters

required

Deprecated. Use /api/projects/{project_id}/ instead.

Input

required

The raw-emissions query to execute.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.environmentsMetricsSamplesCreate()