insights

Check the events behind an insight for the common ways they mislead: internal and test users, local development traffic, bots and crawlers, and events sent twice. Works for trends, funnels, stickiness and lifecycle insights whose series are events. The checks apply the insight's own filters, and read the newest days of its date range, up to 7. The bot and duplicate checks read a sample of those days. For a token, the internal users check matches the emails of the organization's members only with the organization_member:read scope, and its verified domains only with organization:read. It names the emails it finds only with person:read. Nothing is stored. This route runs the query it is sent, so it needs query access as well as insight access. To check a saved insight by its id, send a GET request to insights/{id}/data_checks/.

post/api/projects/{project_id}/insights/data_checks/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/insights/data_checks/
  • 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/.

Query parameters

format'csv' | 'json'

Request body

client_query_idstring

An id for this run, chosen by the client. To stop the queries of the run, send a DELETE request to query/{client_query_id}/.

depth'quick' | 'full'
  • quick - Read within a small budget, so the checks can run on every load
  • full - Read with the same limits as the insight's own query

Response

The result of every check.

status'passed' | 'warning' | 'problem' | 'partial' | 'on_request' | 'no_events' | 'unsupported' | 'inconclusive' required
  • passed - No data issues found
  • warning - A check found a small issue
  • problem - A check found a large issue
  • partial - Some checks could not run, and the others found no issue
  • on_request - The checks would read a lot of data, so they run only on request
  • no_events - No events to check
  • unsupported - This kind of insight cannot be checked
  • inconclusive - No check could run

Changes

    • warning

      added the new on_request enum value to the ////// response property for the response status (media type: application/json)

    • warning

      added the new on_request enum value to the ////// response property for the response status (media type: text/csv)

    • warning

      added the new on_request enum value to the //// response property for the response status (media type: application/json)

    • warning

      added the new on_request enum value to the //// response property for the response status (media type: text/csv)

    • warning

      added the new partial enum value to the //// response property for the response status (media type: application/json)

    • warning

      added the new partial enum value to the //// response property for the response status (media type: text/csv)

    • info

      added the new optional request property

    • info

      added to the ///// request property anyOf list