API Reference
Log In
API Reference

Get one page of PR Health groups by repository, engineer or department

Where the report's figures come from, one row per group, with the engineers page's definitions: openPrs (open, not draft), agingPrs, rottingPrs, closedUnmerged and mergedPrs (both in [startDate, endDate]). The team settings, departmentId and assistedOnly apply as they do to the engineers page, before grouping and paging. A group appears only when it holds an open pull request or one closed without merging. groupBy=repo groups repository spellings case-insensitively (key is the lowercase name, label one of the spellings seen) and sets noMergesInWindow when the repository had no human merge in the last 90 days, whatever the window, cutoff, department or AI filter. groupBy=engineer returns the engineers page's rows (key is the login, unknown for none) with their mappedEmail, prsInWindow and activeMappedEmail (the engineers page's verified email); the last two are null on repo and department rows. groupBy=department returns the selected department's direct child departments with their subtrees rolled up, or the top-level departments when departmentId is omitted, plus an unassigned row; a row with directMembersOnly=true holds the selected department's own members. Choosing a row's departmentId (with includeDescendants=true, or false for directMembersOnly) gives exactly that row's figures. departmentAvailable is false when the organization has no org chart. totals are whole across every group; for repo and department the rows sum to them except mergedPrs, which also holds the merges of groups that have nothing else. sortBy: rottingPrs, closedUnmerged, openPrs, name, share (rottingPrs + closedUnmerged); ties order by name. Every row and the totals also carry pricedRottingPrs and pricedClosedUnmerged, cut to pull requests opened on or after the report's pricedSince. No dollars are returned: the caller multiplies the priced counts by the report's avgCostPerMergedPr. 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/merged window

date
required

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

string
required

repo, engineer or department, case-insensitive

string
Defaults to rottingPrs

rottingPrs, closedUnmerged, openPrs, name or share

string
Defaults to desc

asc or desc

int32
Defaults to 0

Zero-based page index

int32
Defaults to 5

Page size, 1..200

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. Never narrows noMergesInWindow.

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