engineering_analytics
engineering_analytics

Per-owning-team rollup of the CI test surfaces each team owns, over the same run evidence as flaky_tests and with the same meaning of flaky: flaky_test_count is owned tests one commit was seen both failing and passing in the window, regression_test_count is owned tests that failed with no such proof and still hit the blast-radius bar, plus failed/recovery/quarantined run counts. Each has an equal-length previous-window twin for honest deltas. Ownership is stamped on the spans at CI emission time from the repo's ownership map (the distributed owners.yaml files); unstamped spans aggregate under the literal team 'unowned', and a re-stamped test lands under its latest owner only. Each row also carries test_file_count (the daily owners.yaml census denominator, with a window-start twin) and merged_pr_count (merged PRs by the team's members, bots excluded); teams with census counts but no CI signal appear with zero signal counts and a null last_seen_at. Teams are organizational owners of code surfaces, never authors. Counts are absolute, never rates: CI emits every failure but omits ordinary passing spans, so there is no execution denominator. 'suspected_regression' means no recovery was recorded in this data, not that the test never flakes.

get/api/projects/{project_id}/engineering_analytics/team_ci_health/

Request

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

date_fromstring

Window start: relative ('-14d', '-7d') or ISO8601. Defaults to -14d; the window may span at most 30 days. An equal-length prior window is scanned for the *_prior twins; near the 30-day ceiling that prior window can reach past Traces retention, deflating *_prior counts and overstating deltas.

date_tostring

Window end: relative or ISO8601. Defaults to now.

limitinteger

Maximum number of teams to return (1-200). Defaults to 100.

min_failed_prsinteger

An unrecovered test counts toward regression_test_count once it failed on at least this many distinct pull requests in the window. Minimum 1. Defaults to 3. Does not affect flaky_test_count, which needs proof, not a threshold.

owner_teamstring

Restrict the roster to one owning team slug (or 'unowned'). The cheap way to read a single team's rollup.

source_idstring uuid

Connected GitHub data warehouse source to read from. Defaults to the oldest connected GitHub source when the team has more than one.

Response

truncatedboolean required

True when more teams had signal than the cap.

limitinteger required

Maximum number of teams returned in items.

Changes

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