API Reference
Log In
API Reference

Get VCS PRs/MRs by team member

Returns merged pull request counts per person (or per repository with groupBy=repository) for your team, for GitHub or GitLab. Choose the shape of the result with granularity and groupBy. prsMergedWithCodingTool counts merges whose commits matched your team's configured co-author patterns (Claude Code's by default), so it answers 'AI-assisted' without naming a vendor. The prsMergedByVendor and totalPrsMergedByVendor maps name the vendor for every merge that matched a recognized vendor's patterns. The two are not nested: if you configure a signature that no built-in vendor pattern covers, the merge is counted in prsMergedWithCodingTool with no vendor identified. Because one PR can be attributed to several vendors, vendor counts may sum to more than prsMerged. Vendor keys are coding assistant names such as ClaudeCode (not claude-code), and a key is present only with a non-zero count. The vendor maps are omitted when no vendor was attributed, and on week or month buckets they are not filled in with zeros. historyStartDate is the earliest day with PR activity recorded for this team and source, regardless of the requested dates, and is returned for every granularity. It is a lower bound on coverage, not a promise that earlier days had no activity, and it is null when no activity has been recorded for the source. With groupBy=repository, returns one row per repository for the window, with an optional per-person breakdown (includeMembers) and an optional list of the individual merged pull requests (includePullRequests, paged by prLimit and prOffset). The window may span at most 366 days counting both startDate and endDate, and at most 35 days with includePullRequests; a wider window answers 400. Repositories are matched on the last two parts of the repository name, ignoring letter case, so two spellings that differ only in case are one row; repositoryDisplay carries the longest spelling seen in the window. Grouped rows add up to the ungrouped total when the window falls inside the last 30 days and the repository filter did not change during it; for older days, each day keeps the filter that applied when it was recorded. source=gitlab with groupBy=repository returns 200 with an empty list and a reason in syncScope, because GitLab does not provide per-repository merge requests. Every response carries syncScope, saying whether a credential exists for the source, whether a repository filter is active and how many repositories it covers, so a team with no integration is distinguishable from one with a quiet month. Its totalRepositoryCount is not populated yet and is always null. teamId names the team to read, as on every PR Health endpoint; without it, the API key's team is used, else the signed-in user's first team.

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)

date
required

End date (ISO yyyy-MM-dd)

string
Defaults to window

Aggregation granularity: 'window' (default) returns one row per platform login totalled across the date range; 'day' returns one row per platform login per UTC calendar day, with 0 for quiet days, for logins with at least one merged PR in range, capped at 35 days per request; 'week' and 'month' return one row per platform login per bucket (ISO week starting Monday, or calendar month, both in UTC), with 0 for quiet buckets, capped at 400 days per request. Days older than the last 30 days are not refreshed and may miss late-recorded activity. Day-level history starts at your team's first sync.

string

When set to 'repository', returns one row per repository for the window instead of one per platform login. Only 'repository' is supported, and only with granularity=window, over a window of at most 366 days counting both startDate and endDate (400 otherwise). The repository list is capped at 200 rows with repositoriesTruncated set, and totals are summed before the cap. Omit it for the per-login shape.

boolean
Defaults to false

With groupBy=repository, adds the per-person breakdown inside each repository row. Off by default because the row count is repositories x authors.

string

With groupBy=repository, limits every row and every listed pull request to one person, matched on email ignoring letter case.

boolean
Defaults to false

With groupBy=repository, also returns the individual merged pull requests for the window, newest merge first, each one exactly once. Allowed only for a window of at most 35 days (400 otherwise).

int32
Defaults to 100

Page size for includePullRequests, at most 200.

int32
Defaults to 0

Page offset for includePullRequests.

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