Engineering
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET |
Retrieve engineering analytics ci timing
How long a selected workflow, matrix, job or step usually takes: compares it with runs of the same workflow on the repository's default branch over the last 7 days, from stored data only. A run counts only when it ran the same jobs on the same runner tiers, so the answer never mixes in a different workflow, job or runner. Pull request runs and merge queue runs are left out. At most the newest 40 default-branch runs are checked, and sampled is true when more existed. average_seconds and sample_count cover successful samples only, and recent lists the newest three matches of any status. average_seconds is null when no comparable run exists. unavailable_reason says why no comparison was made. Answers are cached for 5 minutes.
Required API key scopes
engineering_analytics:readQuery parameters
- ci_enginestringOne of:
"github_actions""depot_ci" - job_idsstring
- kindstringOne of:
"workflow""matrix""job""step" - repostring
- run_attemptinteger
- run_idinteger
- source_idstring
- step_numberinteger
Response
Example request
GET /api /projects /:project_id /engineering_analytics /ci_timing_contextExample response
Status 200
Status 400 Missing or invalid parameters, a run the source does not hold, a job id that is not in the run attempt, or a step number the job does not have.
Retrieve engineering analytics ci timing
How long a selected workflow, matrix, job or step usually takes: compares it with runs of the same workflow on the repository's default branch over the last 7 days, from stored data only. A run counts only when it ran the same jobs on the same runner tiers, so the answer never mixes in a different workflow, job or runner. Pull request runs and merge queue runs are left out. At most the newest 40 default-branch runs are checked, and sampled is true when more existed. average_seconds and sample_count cover successful samples only, and recent lists the newest three matches of any status. average_seconds is null when no comparable run exists. unavailable_reason says why no comparison was made. Answers are cached for 5 minutes.
Required API key scopes
engineering_analytics:readQuery parameters
- ci_enginestringOne of:
"github_actions""depot_ci" - job_idsstring
- kindstringOne of:
"workflow""matrix""job""step" - repostring
- run_attemptinteger
- run_idinteger
- source_idstring
- step_numberinteger
Response
Example request
GET /api /projects /:project_id /engineering_analytics /ci_timing_contextExample response
Status 200
Status 400 Missing or invalid parameters, a run the source does not hold, a job id that is not in the run attempt, or a step number the job does not have.
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 delivery
One author's median ready to merged time, split at the first approval, next to the same medians for the author's own team and for the whole repository, over pull requests merged in the window (date_from default -30d). The team is picked from the author's GitHub teams that own code: a team that pr_number asked to review, else the team the author's pull requests asked to review most often, else every team. Bots and drafts are excluded.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /delivery_comparisonExample response
Status 200
Status 400 Missing author, or invalid pr_number, date or source_id.
Retrieve engineering analytics delivery
One author's median ready to merged time, split at the first approval, next to the same medians for the author's own team and for the whole repository, over pull requests merged in the window (date_from default -30d). The team is picked from the author's GitHub teams that own code: a team that pr_number asked to review, else the team the author's pull requests asked to review most often, else every team. Bots and drafts are excluded.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /delivery_comparisonExample response
Status 200
Status 400 Missing author, or invalid pr_number, date or source_id.
Retrieve engineering analytics delivery
Delivery and CI friction for one author or one GitHub team over a window (date_from default -30d), each figure next to the same figure over the whole repository: CI spend per merged PR, ready to merged split at the first approval, pushes after approval, merge-queue attempts, and lead time to deploy. Bots and drafts are excluded. Figures whose optional source isn't synced are null and flagged.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- github_teamstring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /delivery_summaryExample response
Status 200
Status 400 Not exactly one of author or github_team, or invalid date or source_id.
Retrieve engineering analytics delivery
Delivery and CI friction for one author or one GitHub team over a window (date_from default -30d), each figure next to the same figure over the whole repository: CI spend per merged PR, ready to merged split at the first approval, pushes after approval, merge-queue attempts, and lead time to deploy. Bots and drafts are excluded. Figures whose optional source isn't synced are null and flagged.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- github_teamstring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /delivery_summaryExample response
Status 200
Status 400 Not exactly one of author or github_team, or invalid date or source_id.
Retrieve engineering analytics
DORA-style deploy metrics over the GitHub deployments + deployment_statuses warehouse pair, each headline with its previous-window twin: deployment frequency, merge-to-deploy lead time (with a per-bucket box-plot series), and honest proxies for change failure rate and time to restore (deploy-status based: no incident data is linked). deploy_data_available is false when the deploy tables aren't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- environmentarray
- github_teamstring
- granularitystringOne of:
"day""hour""week" - repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /doraExample response
Status 200
Status 400 Invalid environment, date_from, date_to, granularity, or source_id.
Retrieve engineering analytics
DORA-style deploy metrics over the GitHub deployments + deployment_statuses warehouse pair, each headline with its previous-window twin: deployment frequency, merge-to-deploy lead time (with a per-bucket box-plot series), and honest proxies for change failure rate and time to restore (deploy-status based: no incident data is linked). deploy_data_available is false when the deploy tables aren't synced.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- environmentarray
- github_teamstring
- granularitystringOne of:
"day""hour""week" - repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /doraExample response
Status 200
Status 400 Invalid environment, date_from, date_to, granularity, or source_id.
Retrieve engineering analytics flaky
The active test-health queue: pytest and Jest 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 a tolerated failure is recorded while it is masked; otherwise 'suspected_regression'. It qualifies on any same-commit recovery, any master/main failure, a quarantined failure, or failures on at least min_failed_prs distinct PRs. 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.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- limitinteger
- min_failed_prsinteger
- repostring
- runnerstringOne of:
"jest""pytest" - source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /flaky_testsExample response
Status 200
Status 400 Invalid date, threshold, limit, runner, or source_id, or a window longer than 30 days.
Retrieve engineering analytics flaky
The active test-health queue: pytest and Jest 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 a tolerated failure is recorded while it is masked; otherwise 'suspected_regression'. It qualifies on any same-commit recovery, any master/main failure, a quarantined failure, or failures on at least min_failed_prs distinct PRs. 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.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- limitinteger
- min_failed_prsinteger
- repostring
- runnerstringOne of:
"jest""pytest" - source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /flaky_testsExample response
Status 200
Status 400 Invalid date, threshold, limit, runner, 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. Optionally scope to a single git branch via branch or one run group via run_scope. 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
- run_scopestringOne of:
"all""default_branch""merge_queue""pull_request" - 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, run_scope, 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. Optionally scope to a single git branch via branch or one run group via run_scope. 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
- run_scopestringOne of:
"all""default_branch""merge_queue""pull_request" - 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, run_scope, or source_id.
Retrieve engineering analytics job log
What one GitHub Actions job's log says it did: cache restores (hit, older cache, miss, restore failed) and migrations applied, for the job and per step. Reads the log from GitHub on demand. Only a completed job's answer is cached. log_read is false, never an error, when there is no log to read: a Depot CI job, a job the source does not hold, an expired log, or a failed fetch.
Required API key scopes
engineering_analytics:readQuery parameters
- ci_enginestringOne of:
"github_actions""depot_ci" - job_idinteger
- repostring
- run_idinteger
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /job_log_insightsExample response
Status 200
Status 400 Missing or invalid repo, run_id, job_id, ci_engine or source_id, or an ambiguous job_id.
Retrieve engineering analytics job log
What one GitHub Actions job's log says it did: cache restores (hit, older cache, miss, restore failed) and migrations applied, for the job and per step. Reads the log from GitHub on demand. Only a completed job's answer is cached. log_read is false, never an error, when there is no log to read: a Depot CI job, a job the source does not hold, an expired log, or a failed fetch.
Required API key scopes
engineering_analytics:readQuery parameters
- ci_enginestringOne of:
"github_actions""depot_ci" - job_idinteger
- repostring
- run_idinteger
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /job_log_insightsExample response
Status 200
Status 400 Missing or invalid repo, run_id, job_id, ci_engine or source_id, or an ambiguous job_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_failuresExample response
Status 200
Status 400 Invalid date_from, date_to, or source_id, or a window over 366 days.
Retrieve engineering analytics pr
Estimated CI cost for a pull request, summed over the jobs of all its workflow runs. Billable self-hosted Linux runners only: provider-hosted (free GitHub-hosted) and non-Linux jobs are excluded. Every figure is zero/null with jobs_available false when the job-level source isn't synced yet. llm_spend carries the agent LLM token spend attributed to the PR by git branch, or null when no $ai_generation event matched.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pr_costExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Retrieve engineering analytics pr
Estimated CI cost for a pull request, summed over the jobs of all its workflow runs. Billable self-hosted Linux runners only: provider-hosted (free GitHub-hosted) and non-Linux jobs are excluded. Every figure is zero/null with jobs_available false when the job-level source isn't synced yet. llm_spend carries the agent LLM token spend attributed to the PR by git branch, or null when no $ai_generation event matched.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pr_cost










