data_quality_checks

Every check in the project: authoring, running, results, health, and schedules.

get/api/projects/{project_id}/data_quality_checks/{id}/

Request

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

Path parameters

idstring uuid required

A UUID string identifying this data quality check.

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/.

Response

idstring uuid required
descriptionstring

Why this check exists and what a failure means.

subject_type'table' | 'view' | 'metric' | 'posthog_table' required
  • table - table
  • view - view
  • metric - metric
  • posthog_table - posthog_table
subject_uuidstring uuid nullable required

Id of the table, view, metric, or PostHog table being checked. Null once the subject is deleted.

subject_namestring required

Queryable name of the subject, refreshed on every run.

subject_statusstring required

'orphaned' once the subject stops resolving. Orphaned checks are skipped, not deleted.

column_namestring

Column the check applies to. Omit for table-scoped types like row_count.

check_type'not_null' | 'unique' | 'accepted_values' | 'relationships' | 'row_count' | 'freshness' | 'custom_sql' required
  • not_null - not_null
  • unique - unique
  • accepted_values - accepted_values
  • relationships - relationships
  • row_count - row_count
  • freshness - freshness
  • custom_sql - custom_sql
configobject

Type-specific configuration, validated against the check type's JSON schema.

severity'error' | 'warn'
  • error - error
  • warn - warn
enabledboolean

Disabled checks are never run by any trigger.

tagsstring[]

Free-form string labels for grouping and filtering.

ownerstring nullable required

Email of the human accountable for this check, or null.

last_run_atstring date-time nullable required

When the check last executed.

last_statusstring required

Outcome of the newest run: passed, failed, errored, skipped, or empty if never run.

last_succeeded_atstring date-time nullable required

When the check last passed. Read failing_since for how long a failing check has been failing. Null means it has not passed within the run retention window.

failing_sincestring date-time nullable required

When the current streak of failing runs started, so a failing check can say how long it has been failing. Null when the check is not failing.

fingerprintstring required

sha256 of the subject, type, column, and config. Re-creating the same check upserts.

created_source'user' | 'ai_generated'
  • user - user
  • ai_generated - ai_generated
ai_modelstring

Model that generated the check, if AI-authored.

confidencenumber double nullable

AI author's confidence in the check, 0-1.

reasoningstring

AI author's reasoning, surfaced as review context.

created_atstring date-time required
updated_atstring date-time nullable required

Changes

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