Engineering
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET |
Retrieve engineering analytics author workflow
One author's estimated CI cost split by workflow over a window (date_from default -30d), highest spend first. Runs are attributed to the author through their pull requests (attribution is by PR number). Returns an empty list when the job-level source isn't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- repostring
- source_idstring
Example request
GET /api /projects /:project_id /engineering_analytics /author_workflow_costsExample response
Status 200
Status 400 Missing author, or invalid date or source_id.
Retrieve engineering analytics author workflow
One author's estimated CI cost split by workflow over a window (date_from default -30d), highest spend first. Runs are attributed to the author through their pull requests (attribution is by PR number). Returns an empty list when the job-level source isn't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- repostring
- source_idstring
Example request
GET /api /projects /:project_id /engineering_analytics /author_workflow_costsExample response
Status 200
Status 400 Missing author, or invalid date or source_id.
Retrieve engineering analytics broken
The broken-tests triage panel: live CI failures over the last 2 days grouped into distinct failures (by test id + normalized error signature) and classified by how each is behaving right now — breaking trunk, a new failure spreading across branches, probably-resolved, flaky, or one PR's own problem — ranked with the most urgent first. Also returns breaking_master_jobs, the default-branch jobs whose latest run is red. Reach for this to answer 'what CI failures should I care about right now'; expand a row's latest_run_id via run_failure_logs for the failing lines. Fingerprinting is pytest-only for now (jest/playwright/cargo failures aren't grouped yet), and the breaking/resolved distinction needs the job-level source synced — without it those failures fall through to flaky/pr_only rather than being misreported.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /broken_testsExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics broken
The broken-tests triage panel: live CI failures over the last 2 days grouped into distinct failures (by test id + normalized error signature) and classified by how each is behaving right now — breaking trunk, a new failure spreading across branches, probably-resolved, flaky, or one PR's own problem — ranked with the most urgent first. Also returns breaking_master_jobs, the default-branch jobs whose latest run is red. Reach for this to answer 'what CI failures should I care about right now'; expand a row's latest_run_id via run_failure_logs for the failing lines. Fingerprinting is pytest-only for now (jest/playwright/cargo failures aren't grouped yet), and the breaking/resolved distinction needs the job-level source synced — without it those failures fall through to flaky/pr_only rather than being misreported.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /broken_testsExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics ci signals config
Return the atomic CI Signals configuration and aggregate GitHub warehouse sync status.
Required API key scopes
engineering_analytics:readResponse
Example request
GET /api /projects /:project_id /engineering_analytics /ci-signals-configExample response
Status 200
Retrieve engineering analytics ci signals config
Return the atomic CI Signals configuration and aggregate GitHub warehouse sync status.
Required API key scopes
engineering_analytics:readResponse
Example request
GET /api /projects /:project_id /engineering_analytics /ci-signals-configExample response
Status 200
Retrieve engineering analytics ci
Headline counts for the open-PR backlog: open PRs, distinct repos, stuck PRs (open, non-draft, non-bot, older than 7 days), and PRs with failing CI. The failing-CI count rests on the head-SHA join and can lag until late CI completions settle.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /ci_cardsExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics ci
Headline counts for the open-PR backlog: open PRs, distinct repos, stuck PRs (open, non-draft, non-bot, older than 7 days), and PRs with failing CI. The failing-CI count rests on the head-SHA join and can lag until late CI completions settle.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /ci_cardsExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics ci failure
The thinned CI failure logs for a pull request, grouped by failed job. Resolves the PR to its workflow runs via the pull_requests association (all of the PR's pushes, not just the latest commit), then reads the Logs product joined on run_id. Returns failed jobs only (the worker fetches logs for failures); logs_available is false when CI hasn't failed, the logs aged out of the short Logs retention, or a fork PR has no run association. Each line carries its original 1-based line number in the full pre-thinning log; lines are the failure region (errors plus surrounding context, with omission markers), capped per job and overall.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /ci_failure_logsExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Retrieve engineering analytics ci failure
The thinned CI failure logs for a pull request, grouped by failed job. Resolves the PR to its workflow runs via the pull_requests association (all of the PR's pushes, not just the latest commit), then reads the Logs product joined on run_id. Returns failed jobs only (the worker fetches logs for failures); logs_available is false when CI hasn't failed, the logs aged out of the short Logs retention, or a fork PR has no run association. Each line carries its original 1-based line number in the full pre-thinning log; lines are the failure region (errors plus surrounding context, with omission markers), capped per job and overall.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /ci_failure_logsExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Retrieve engineering analytics current branch
Current default-branch CI verdict over the fixed last-24-hours window. Counts every workflow whose latest completed run failed or timed out; failing workflow names are a bounded preview. The default branch is detected from the same window, independently of analytics date filters.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /current_branch_healthExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics current branch
Current default-branch CI verdict over the fixed last-24-hours window. Counts every workflow whose latest completed run failed or timed out; failing workflow names are a bounded preview. The default branch is detected from the same window, independently of analytics date filters.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /current_branch_healthExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics flaky
The active test-health queue: backend tests worth acting on now, from the per-test CI spans, over a window (default -7d, maximum 30 days). Evidence is counted per CI run, never per span or run attempt. A test is a 'confirmed_flake' when one commit both failed and passed it (a 'Re-run failed jobs' attempt went green, or an in-job retry recovered it); 'quarantined' when it fails while masked as xfail; otherwise 'suspected_regression'. It qualifies on any same-commit recovery, any master/main failure, an xfail, or failures on at least min_failed_prs distinct PRs. Counts are absolute, never rates: CI emits a span for every failure but only for passes slow enough to clear the emitter's duration threshold, so there is no execution denominator. 'suspected_regression' means no recovery was recorded in this data, not that the test never flakes.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- limitinteger
- min_failed_prsinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /flaky_testsExample response
Status 200
Status 400 Invalid date, threshold, limit, or source_id, or a window longer than 30 days.
Retrieve engineering analytics flaky
The active test-health queue: backend tests worth acting on now, from the per-test CI spans, over a window (default -7d, maximum 30 days). Evidence is counted per CI run, never per span or run attempt. A test is a 'confirmed_flake' when one commit both failed and passed it (a 'Re-run failed jobs' attempt went green, or an in-job retry recovered it); 'quarantined' when it fails while masked as xfail; otherwise 'suspected_regression'. It qualifies on any same-commit recovery, any master/main failure, an xfail, or failures on at least min_failed_prs distinct PRs. Counts are absolute, never rates: CI emits a span for every failure but only for passes slow enough to clear the emitter's duration threshold, so there is no execution denominator. 'suspected_regression' means no recovery was recorded in this data, not that the test never flakes.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- limitinteger
- min_failed_prsinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /flaky_testsExample response
Status 200
Status 400 Invalid date, threshold, limit, or source_id, or a window longer than 30 days.
Retrieve engineering analytics job
Per-job aggregates for one workflow over a window (default -30d), one row per de-sharded job name (matrix shards aggregate together), busiest first: queue p50, duration p50/p95, failure rate, retry pressure, run share (below 1.0 = conditional job), and billable cost. Jobs always need their run as context — this is the aggregate view; use workflow_jobs for one run's jobs. Empty when the job-level source isn't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- branchstring
- date_fromstring
- date_tostring
- repostring
- source_idstring
- workflow_namestring
Example request
GET /api /projects /:project_id /engineering_analytics /job_aggregatesExample response
Status 200
Status 400 Missing workflow_name, or invalid date or source_id.
Retrieve engineering analytics job
Per-job aggregates for one workflow over a window (default -30d), one row per de-sharded job name (matrix shards aggregate together), busiest first: queue p50, duration p50/p95, failure rate, retry pressure, run share (below 1.0 = conditional job), and billable cost. Jobs always need their run as context — this is the aggregate view; use workflow_jobs for one run's jobs. Empty when the job-level source isn't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- branchstring
- date_fromstring
- date_tostring
- repostring
- source_idstring
- workflow_namestring
Example request
GET /api /projects /:project_id /engineering_analytics /job_aggregatesExample response
Status 200
Status 400 Missing workflow_name, or invalid date or source_id.
Retrieve engineering analytics master
Default-branch failures over a window (default -24h), grouped error-tracking style by (workflow, de-sharded failing job) with a run count and first/last seen, newest group first. branch overrides the detected default branch. PR-branch failures are deliberately excluded — at monorepo volume a flat feed is a firehose; those surface per PR. Groups degrade to workflow level (failed_job '') when the job-level source isn't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- branchstring
- date_fromstring
- date_tostring
- repostring
- source_idstring
Example request
GET /api /projects /:project_id /engineering_analytics /master_failuresExample response
Status 200
Status 400 Invalid date_from, date_to, or source_id, or a window over 366 days.
Retrieve engineering analytics master
Default-branch failures over a window (default -24h), grouped error-tracking style by (workflow, de-sharded failing job) with a run count and first/last seen, newest group first. branch overrides the detected default branch. PR-branch failures are deliberately excluded — at monorepo volume a flat feed is a firehose; those surface per PR. Groups degrade to workflow level (failed_job '') when the job-level source isn't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- branchstring
- date_fromstring
- date_tostring
- repostring
- source_idstring
Example request
GET /api /projects /:project_id /engineering_analytics /master_failures