Skip to main content
Use the analytics endpoints to pull code review metrics into your own dashboards or reports. All three endpoints require a valid Firebase ID Token and return JSON. The dashboard endpoints aggregate data across every repo connected to your account, while the per-repo endpoint provides a granular daily breakdown for a single repository.

GET /api/v1/repos/dashboard/analytics

Returns aggregated analytics across all repositories, including daily breakdowns of bugs caught and resolved per repo. Use this endpoint to power trend charts and cross-repo comparisons. Authentication required: Yes

Response

totalBugsCaught
integer
Total number of issues raised by BugViper across all repositories and all time.
totalResolved
integer
Total number of issues that have been marked as resolved or fixed across all repositories.
addressedRate
number
Percentage of raised issues that were subsequently addressed, expressed as a decimal between 0 and 1 (e.g., 0.72 for 72%).
prsPerWeek
number
Rolling average number of pull requests reviewed per week across all repos.
avgMergeTimeHours
number
Average time in hours from PR open to merge, calculated across all merged PRs.
dailyBreakdown
array
Array of per-repo daily activity objects. Each entry includes the repo identifier, a date string, a count of bugs caught on that date, and a count of issues resolved on that date.

GET /api/v1/repos/dashboard/stats

Returns the summary statistics that populate the stat cards at the top of the BugViper dashboard. This is a lightweight endpoint designed for quick summary renders. Authentication required: Yes

Response

reposCount
integer
Number of repositories currently connected to your BugViper account.
prsReviewed
integer
Total number of distinct pull requests that have received at least one BugViper review.
reviewsRun
integer
Total number of individual review runs executed across all repos and PRs.
bugsCaught
integer
Total number of issues raised by BugViper across all reviews.
addressedRate
number
Percentage of raised issues that were addressed, expressed as a decimal between 0 and 1.
prsPerWeek
number
Rolling average number of pull requests reviewed per week.
avgMergeTimeHours
number
Average time in hours from PR open to merge across all merged PRs.

GET /api/v1/repos/{owner}/{repo}/analytics

Returns detailed analytics for a single repository, including a daily breakdown of bugs caught and resolved, addressed rate, average merge time, and PRs-per-week figures. Use this endpoint to render the per-repo analytics view. Authentication required: Yes

Path Parameters

owner
string
required
GitHub organization name or username that owns the repository.
repo
string
required
Repository name.

Response

totalIssues
integer
Total number of issues BugViper has raised across all PRs in this repository.
totalResolved
integer
Number of those issues that have been marked as resolved or fixed.
addressedRate
number
Percentage of raised issues that were addressed, expressed as a decimal between 0 and 1.
avgMergeTimeHours
number
Average time in hours from PR open to merge for this repository.
prsPerWeek
number
Rolling average number of pull requests reviewed per week in this repository.
dailyBreakdown
array
Array of daily activity objects covering the selected date range.