API Reference
Log In
API Reference

Get one page of the PR Health pull requests

Flat paginated list of the pull requests behind the PR Health report: every open PR (drafts included, bucketed DRAFT) plus PRs closed without merging whose closed timestamp falls in [startDate, endDate] (bucketed CLOSED_UNMERGED). Buckets use the report's inactivity classifier against the org's thresholds, echoed in the response. The team settings apply as they do to the report. Without bucket the list holds every bucket except AUTOMATION; bucket=AUTOMATION returns exactly the open automation pull requests (declared bots and automation-pattern matches, drafts included), whose totalElements equals the report's totals.automationPrs, and ignores assistedOnly. Closed automation pull requests are in no bucket. bucket filters to one bucket; author filters to one provider login, with unknown also selecting rows that carry no login, matching the report's grouping. repo filters to one repository by name, case-insensitively. cause returns one action-queue cause instead: only open pull requests of that cause (AUTOMATION, STUCK_DRAFT, AUTHOR_GONE, APPROVED_NOT_MERGED, CHANGES_REQUESTED_QUIET, WAITING_ON_REVIEW or ON_PACE, case-insensitive), each row carrying its cause, ordered exactly like the queue's group so the queue's preview rows are this page's first rows; startDate and endDate then filter nothing, and cause with bucket is a 400. departmentId narrows the page and totalElements together, before paging. sortBy inactivity orders by days since last provider-side activity, age by days since the PR was opened, repo by repository name then number, author by provider login and review by first review time; default is inactivity desc (stalest first) with repo/number tiebreaks. triaged=EXCLUDE (the default) drops open pull requests the team dismissed or snoozed until a date after today (UTC); triaged=ONLY returns just those, each row carrying its triage record, and no closed rows. Automation ignores dismissals, so bucket=AUTOMATION and cause=AUTOMATION are the same under both. With triaged=ONLY and no bucket, cause, repo, author or assistedOnly, totalElements equals the report's totals.triagedPrs. size is capped at 200. 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.

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

AUTOMATION, ROTTING, AGING, ACTIVE, DRAFT or CLOSED_UNMERGED, case-insensitive

string

Provider login, as returned in the report's engineers[].authorLogin; unknown also selects rows with no provider login

int32
Defaults to 0

Zero-based page index

int32
Defaults to 50

Page size, 1..200

string
Defaults to inactivity

inactivity, age, repo, author or review; author orders by the displayed identity, activeMappedEmail else the login, unknown last

string
Defaults to desc

asc or desc

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. Ignored with bucket=AUTOMATION and cause=AUTOMATION.

string

One action-queue cause, case-insensitive: AUTOMATION, STUCK_DRAFT, AUTHOR_GONE, APPROVED_NOT_MERGED, CHANGES_REQUESTED_QUIET, WAITING_ON_REVIEW or ON_PACE. Not combinable with bucket.

string

One repository by name (owner/repo), case-insensitive

string
Defaults to EXCLUDE

EXCLUDE (the default) lists pull requests nobody dismissed or snoozed. ONLY lists just the dismissed and snoozed ones, each carrying its triage record. Automation ignores it: the AUTOMATION bucket and cause list the same rows under both. Case-insensitive; anything else is a 400.

string

One ticket id, case-insensitive: the key PR Health read from the pull request's title or branch. At most 80 characters.

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
*/*