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 attention pull
Open pull requests that need attention: failing CI, or stuck (open, non-draft, non-bot, older than 7 days), by the same rules as the ci_cards counts. Failing first, then newest, capped; total counts every match in the whole open backlog, however old. Cost and billable minutes can lag new CI by up to 5 minutes.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /attention_pull_requestsExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics attention pull
Open pull requests that need attention: failing CI, or stuck (open, non-draft, non-bot, older than 7 days), by the same rules as the ci_cards counts. Failing first, then newest, capped; total counts every match in the whole open backlog, however old. Cost and billable minutes can lag new CI by up to 5 minutes.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /attention_pull_requestsExample response
Status 200
Status 400 Invalid source_id.
Retrieve engineering analytics author
Every author's friction over pull requests merged in the last 30 days, most first: red CI they did not cause, re-runs that failed again, CI waits, the wait for the first approval, merge-queue time and kickouts, and rework. The score is a multiple of the typical author and never counts how much or how fast someone ships. Bots are excluded, and authors need at least 3 merged pull requests.
Required API key scopes
engineering_analytics:readQuery parameters
- github_teamstring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /author_frictionExample response
Status 200
Status 400 Invalid source_id or repo.
Retrieve engineering analytics author
Every author's friction over pull requests merged in the last 30 days, most first: red CI they did not cause, re-runs that failed again, CI waits, the wait for the first approval, merge-queue time and kickouts, and rework. The score is a multiple of the typical author and never counts how much or how fast someone ships. Bots are excluded, and authors need at least 3 merged pull requests.
Required API key scopes
engineering_analytics:readQuery parameters
- github_teamstring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /author_frictionExample response
Status 200
Status 400 Invalid source_id or repo.
Retrieve engineering analytics author friction
One author's friction over pull requests merged in the last 30 days, next to the median of each of the author's teams, and the author's pull requests that added the most friction. Bots are excluded.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /author_friction_detailExample response
Status 200
Status 400 Missing author, or invalid source_id or repo.
Retrieve engineering analytics author friction
One author's friction over pull requests merged in the last 30 days, next to the median of each of the author's teams, and the author's pull requests that added the most friction. Bots are excluded.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /author_friction_detailExample response
Status 200
Status 400 Missing author, or invalid source_id or repo.
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, blocking the merge queue, a new failure spreading across branches, probably-resolved, flaky, or one PR's own problem: ranked with the most urgent first. A blocking_merge_queue row is a failure on a merge-queue gate branch that never hit trunk: the commit had already passed the PR's own CI, so it is the semantic conflict the queue exists to catch, and it is holding up landings. 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, blocking the merge queue, a new failure spreading across branches, probably-resolved, flaky, or one PR's own problem: ranked with the most urgent first. A blocking_merge_queue row is a failure on a merge-queue gate branch that never hit trunk: the commit had already passed the PR's own CI, so it is the semantic conflict the queue exists to catch, and it is holding up landings. 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_health