engineering_analytics
engineering_analytics

Delivery and CI friction for one author or one GitHub team over a window (date_from default -30d), each figure next to the same figure over the whole repository: CI spend per merged PR, ready to merged split at the first approval, pushes after approval, merge-queue attempts, and lead time to deploy. Bots and drafts are excluded. Figures whose optional source isn't synced are null and flagged.

get/api/projects/{project_id}/engineering_analytics/delivery_summary/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/engineering_analytics/delivery_summary/
  • Auth: HTTP bearer

Path parameters

project_idstring required

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

Query parameters

authorstring

GitHub login: scope the read to this author's pull requests. Pass exactly one scope.

date_fromstring

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

date_tostring

Window end: relative or ISO8601. Defaults to now.

github_teamstring

GitHub team slug: scope the read to pull requests authored by the team's members, through the team membership table. Pass exactly one scope.

repostring

'owner/name' repository. Required with pr_number; otherwise it picks the repository when the selected source syncs several.

source_idstring uuid

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

Response

scope_kind'author' | 'github_team' | 'pull_request' required
  • author - Author
  • github_team - GitHub Team
  • pull_request - Pull Request
scopestring required

The GitHub login or GitHub team slug the summary is for.

has_membership_databoolean required

True when the team membership table is synced. A github_team scope without it matches no pull requests, so every scope figure is empty rather than the whole repository.

jobs_availableboolean required

True when the workflow jobs table is synced, which cost needs.

review_data_availableboolean required

True when the reviews table is synced, which the approval split needs.

ready_data_availableboolean required

True when issue events are synced, which ready-to-merge time needs.

opened_pr_countinteger required

PRs in scope opened in the window, drafts included, bots excluded.

merged_pr_countinteger required

PRs in scope merged in the window (bots and drafts excluded): the population of every per-merged-PR figure.

open_pr_countinteger required

PRs in scope that are open and not drafts right now. Ignores the window.

draft_pr_countinteger required

PRs in scope that are open drafts right now. Ignores the window.

total_cost_usdnumber double nullable required

Estimated CI cost summed over the merged PRs in scope. Null when nothing was costable.

total_billable_minutesnumber double nullable required

Billable minutes summed over the merged PRs in scope. Null when the jobs table isn't synced.

push_countinteger required

Pushes summed over the merged PRs in scope.

Changes

No recorded changes to this operation across all 1 revision of this API.