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 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 llm spend
How much of a repository's agent LLM spend in a window (date_from default -30d) the pull request attribution reaches: the cost and count of $ai_generation events stamped with the repository, and the part credited to any pull request.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /llm_spend_coverageExample response
Status 200
Status 400 Invalid date, repo or source_id.
Retrieve engineering analytics llm spend
How much of a repository's agent LLM spend in a window (date_from default -30d) the pull request attribution reaches: the cost and count of $ai_generation events stamped with the repository, and the part credited to any pull request.
Required API key scopes
engineering_analytics:readQuery parameters
- date_fromstring
- date_tostring
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /llm_spend_coverageExample response
Status 200
Status 400 Invalid date, repo 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_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_costExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Retrieve engineering analytics pr
The timeline of a single pull request: header plus ordered events (opened, CI started/finished, merged or closed). Use this to answer 'where is this PR stuck and what happened to it'. This is a partial view: review and comment events are not yet available.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pr_lifecycleExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Status 404 No pull request with that number in the warehouse.
Retrieve engineering analytics pr
The timeline of a single pull request: header plus ordered events (opened, CI started/finished, merged or closed). Use this to answer 'where is this PR stuck and what happened to it'. This is a partial view: review and comment events are not yet available.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pr_lifecycleExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Status 404 No pull request with that number in the warehouse.
Retrieve engineering analytics pr
Every workflow run attributed to a pull request, across all its commits (grouped by head SHA client-side), newest first. Run-level only.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Example request
GET /api /projects /:project_id /engineering_analytics /pr_runsExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Retrieve engineering analytics pr
Every workflow run attributed to a pull request, across all its commits (grouped by head SHA client-side), newest first. Run-level only.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Example request
GET /api /projects /:project_id /engineering_analytics /pr_runsExample response
Status 200
Status 400 Missing pr_number/repo, or invalid repo or source_id.
Retrieve engineering analytics pull request
One merged pull request's friction as a multiple of the typical pull request, with the counts behind it: red CI by cause, re-runs that failed again, CI time per push, the wait for the first approval, merge-queue time and failed queue attempts, and rework. Covers pull requests merged in the last 30 days.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pull_request_frictionExample response
Status 200
Status 400 Missing pr_number or repo, or invalid source_id.
Retrieve engineering analytics pull request
One merged pull request's friction as a multiple of the typical pull request, with the counts behind it: red CI by cause, re-runs that failed again, CI time per push, the wait for the first approval, merge-queue time and failed queue attempts, and rework. Covers pull requests merged in the last 30 days.
Required API key scopes
engineering_analytics:readQuery parameters
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pull_request_frictionExample response
Status 200
Status 400 Missing pr_number or repo, or invalid source_id.
Retrieve engineering analytics pull request
Pull requests as timelines of what each waited on from ready for review to merge or now: review, CI, red checks by what turned them green, and the merge queue. Scope to one author or one GitHub team (open PRs plus PRs merged in the window, date_from default -30d), or to one pull request with pr_number and repo.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- github_teamstring
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pull_request_timelinesExample response
Status 200
Status 400 Not exactly one of author, github_team or pr_number, pr_number without repo, or invalid date or source_id.
Status 503 The complete result exceeds the request's warehouse query budget.
Retrieve engineering analytics pull request
Pull requests as timelines of what each waited on from ready for review to merge or now: review, CI, red checks by what turned them green, and the merge queue. Scope to one author or one GitHub team (open PRs plus PRs merged in the window, date_from default -30d), or to one pull request with pr_number and repo.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- github_teamstring
- pr_numberinteger
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pull_request_timelinesExample response
Status 200
Status 400 Not exactly one of author, github_team or pr_number, pr_number without repo, or invalid date or source_id.
Status 503 The complete result exceeds the request's warehouse query budget.
Retrieve engineering analytics pull
Open pull requests plus any merged or closed since date_from (default -30d), newest first, each with its head-SHA CI rollup. Pass state to list one state only. The list is paged by limit and offset; when more match, truncated is true and the ci_cards counts can exceed it. open_to_merge_seconds is coarse: it fuses draft and ready-for-review time; CI counts can lag until late completions settle. Cost and billable minutes can lag new CI by up to 5 minutes.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- limitinteger
- offsetinteger
- repostring
- source_idstring
- statestringOne of:
"closed""merged""open"
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pull_requestsExample response
Status 200
Status 400 Invalid date_from, date_to, state, limit, offset, or source_id.
Retrieve engineering analytics pull
Open pull requests plus any merged or closed since date_from (default -30d), newest first, each with its head-SHA CI rollup. Pass state to list one state only. The list is paged by limit and offset; when more match, truncated is true and the ci_cards counts can exceed it. open_to_merge_seconds is coarse: it fuses draft and ready-for-review time; CI counts can lag until late completions settle. Cost and billable minutes can lag new CI by up to 5 minutes.
Required API key scopes
engineering_analytics:readQuery parameters
- authorstring
- date_fromstring
- date_tostring
- limitinteger
- offsetinteger
- repostring
- source_idstring
- statestringOne of:
"closed""merged""open"
Response
Example request
GET /api /projects /:project_id /engineering_analytics /pull_requestsExample response
Status 200
Status 400 Invalid date_from, date_to, state, limit, offset, or source_id.
Retrieve engineering analytics
The repository's checked-in .test_quarantine.json: flaky tests temporarily quarantined with a hard expiry, classified by urgency (overdue, in grace, expiring soon, active). available is false when the repo has no quarantine file: that is not an error. Parsing is fail-open: malformed entries are reported in parse_errors while well-formed ones are kept.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /quarantineExample response
Status 200
Status 400 Invalid repo or source_id.
Retrieve engineering analytics
The repository's checked-in .test_quarantine.json: flaky tests temporarily quarantined with a hard expiry, classified by urgency (overdue, in grace, expiring soon, active). available is false when the repo has no quarantine file: that is not an error. Parsing is fail-open: malformed entries are reported in parse_errors while well-formed ones are kept.
Required API key scopes
engineering_analytics:readQuery parameters
- repostring
- source_idstring
Response
Example request
GET /api /projects /:project_id /engineering_analytics /quarantine




