provider evaluations POST /api/environments/{environment_id}/evaluations/test_hog/
@utdk/posthog /api/environments/{environment_id}/evaluations/test_hog/
environments_evaluations_test_hog_create
Test Hog evaluation code against sample events without saving.
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsEvaluationsTestHogCreate
POST/api/environments/{environment_id}/evaluations/test_hog/
Test Hog evaluation code against sample events without saving.

Parameters

required

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

Input

required

Hog source code to test. Must return a boolean (true = pass, false = fail) or null for N/A.

Number of recent $ai_generation events to test against (1–10, default 5).

Whether the evaluation can return N/A for non-applicable generations.

Optional trigger conditions to filter which events are sampled.

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.environmentsEvaluationsTestHogCreate({
  "sample_count": 5,
  "allows_na": false
})