provider engineering_analyticsengineering_analytics GET /api/projects/{project_id}/engineering_analytics/pull_requests/
@utdk/posthog /api/projects/{project_id}/engineering_analytics/pull_requests/
engineering_analytics_pull_requests
Open pull requests plus any merged or closed since date_from (default -30d), newest first, each with its head-SHA CI rollup. The list is capped; when more match, `truncated` is true and the ci_cards counts can exceed it. open_to_merge_seconds is coarse — it fuses draft and ready-for-review time; CI counts can lag until late completions settle.
author query
Optional GitHub login to scope the list to one author's pull requests.
string
date_from query
Window start: relative ('-30d', '-8w') or ISO8601. Defaults to -30d.
string
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string
source_id query
Connected GitHub data warehouse source to read from. Defaults to the oldest connected GitHub source when the team has more than one.
string

Try it

Authentication
Configure credentials for PostHog API
engineeringAnalyticsPullRequests
GET/api/projects/{project_id}/engineering_analytics/pull_requests/
Open pull requests plus any merged or closed since date_from (default -30d), newest first, each with its head-SHA CI rollup. The list is capped; when more match, `truncated` is true and the ci_cards counts can exceed it. open_to_merge_seconds is coarse — it fuses draft and ready-for-review time; CI counts can lag until late completions settle.

Parameters

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Optional GitHub login to scope the list to one author's pull requests.

Window start: relative ('-30d', '-8w') or ISO8601. Defaults to -30d.

Connected GitHub data warehouse source to read from. Defaults to the oldest connected GitHub source when the team has more than one.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.engineeringAnalyticsPullRequests()