API Reference
Log In
API Reference

Get the PR Health follow-through

Whether the pull requests PR Health flagged as rotting got fixed. The sync stamps a pull request the first night it sees it open, not a draft, not automation and rotting; since is the organization's first stamp, null before any. flaggedMerged and flaggedClosed count stamped pull requests merged or closed without merging after their stamp, flaggedOpen those still open and not dismissed or snoozed, and flaggedPrs the three together; pull requests that vanished from GitHub without a closing date are in none of them. atRiskThen is every pull request stamped in the first 7 days from since, dismissed or not; atRiskNow is today's rotting set, the report's pricedRottingPrs for the same scope. Both are priced at basisNow, the cost per pull request over the last 90 days, counted as the report's avgCostPerMergedPr is; basisThen is the same figure over the 90 days ending on since, counting pull requests open at that window's end. Either basis is null, never 0, when its window has no pull request outside automation or no recorded coding-assistant spend, and every dollar figure priced from basisNow is then null too; basisThen is also null before any stamp. Dollars are the estimate only. The team settings apply as they do to the report's priced figures: pull requests opened before the report's pricedSince are in no count. departmentId and assistedOnly narrow every count. Without startDate and endDate every stamp ever taken counts. With them (both or neither, at most 366 days, startDate not after endDate, dates from 1970-01-01 to 9999-12-30, else a 400) only stamps taken on those UTC days count: since is the first of them, null when the window holds none; flaggedMerged, flaggedClosed, flaggedOpen and atRiskThen cover only those rows, and the then cohort also stops at endDate. atRiskNow, basisNow and basisThen keep their meaning. startDate and endDate are echoed, null without a window.

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

VCS source: github or gitlab

int64

Scope every count 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

Count only AI-assisted pull requests (the co-author flag or a detected coding-assistant vendor).

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.

date

Start date (ISO yyyy-MM-dd) of the stamps counted. Omit it, with endDate, to count every stamp ever taken.

date

End date (ISO yyyy-MM-dd), inclusive. Required with startDate.

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