API Reference
Log In
API Reference

Get one engineer's PR Health pull requests

Returns the pull requests behind one engineer's row in the PR Health report: their open PRs bucketed ROTTING / AGING / ACTIVE / DRAFT by the organization's inactivity thresholds, and their PRs closed without merging whose closed timestamp falls in [startDate, endDate]. author is the provider login exactly as returned in the report's engineers[].authorLogin; the report groups rows with no provider login together with any row whose real provider login is literally unknown under that same login, and passing unknown here selects both kinds of row, matching the report exactly. Bucketing uses the same classifier as the report, so counts.rotting, counts.aging and counts.closedUnmerged equal that engineer's rottingPrs, agingPrs and closedUnmerged in the report, and counts.rotting + counts.aging + counts.active equals its openPrs; drafts are counted separately in counts.draft and belong to none of those figures, matching the report. The team settings apply as they do to the report: rows opened before the cutoff, rows in excluded repositories and automation are in neither list. Open rows the team dismissed or snoozed are in no bucket and no count: they are listed apart in triaged, each with its triage record, stalest first, capped like open and flagged by triagedTruncated; both fields are always present. departmentId and assistedOnly narrow both lists and their counts the way they narrow the engineers page. Open-PR figures reflect the current synced state within the cutoff; only the closed list is window-scoped. Both lists are ordered by inactivity (days since the PR's last provider-side activity) descending and each is capped at 200 rows, flagged by openTruncated / closedUnmergedTruncated; the counts are computed before the cap, so a truncated list still reconciles against them. Rows carry the same reviewDecision the report does, APPROVED, CHANGES_REQUESTED or absent, on the same basis. The window may span at most 366 days counting both startDate and endDate (for example 2024-01-01 to 2025-01-01, so a one-year window that crosses 29 February is one day too wide), and startDate must not be after endDate; either violation is a 400. An author with no matching rows is a 200 with empty lists and zero counts, never a 404. source=gitlab returns empty lists: GitLab writes no per-PR rows today, the same behaviour the report gives.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

VCS source: github or gitlab

date
required

Start date (ISO yyyy-MM-dd) of the closed-without-merge window

date
required

End date (ISO yyyy-MM-dd), inclusive

string
required

Provider login, as returned in the report's engineers[].authorLogin; unknown selects both rows with no provider login and rows whose real provider login is literally unknown, matching how the report groups them

int64

Scope every figure to a single department (and, with includeDescendants, its subtree), by the department its members belong to today. Must belong to the caller's organization. Omit it for the whole organization.

boolean
Defaults to false

When departmentId is set, also include its descendant departments. Ignored when departmentId is omitted.

boolean
Defaults to false

Keep only AI-assisted pull requests (the co-author flag or a detected coding-assistant vendor). Defaults to false here; the team's own default is the assistedOnly team setting, which the caller passes explicitly.

string

Team to read or write, as the team's hashid (the same id as /v2/api/teams/{id}). The caller must belong to it or be able to read it: 403 otherwise, 404 when no such team exists. An API key may only name its own organization. Omit it for the API key's organization, or for a signed-in user the first organization they belong to.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*