API Reference / Code - Branch Insights
Get branches by commit count
post
https://api.intelig.ai/api/v1/intelig/code/branches/most-commits
Auth: Authorization: ApiKey <key> (an API key sent as
Bearer is rejected) or Authorization: Bearer <jwt>
for a dashboard session. operationId: getBranchMostCommits
Returns branches ranked by commit count for chart visualization. Use this to identify the most active branches within the selected repositories and date range.
Example request
curl -X POST "https://api.intelig.ai/api/v1/intelig/code/branches/most-commits" \
-H "Authorization: ApiKey $INTELIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"orgId": 1,
"repositoryIds": [
10,
20,
30
],
"status": [
"ACTIVE",
"STALE"
],
"from": "2026-01-01"
}' Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
orgId | integer (int64) | no | Organization ID to scope the query Example: 1 |
repositoryIds | integer[] | no | Optional list of repository IDs to filter by Example: [10,20,30] |
status | string[] | no | Optional list of branch statuses to filter by Example: ["ACTIVE","STALE"] |
from | string | no | Start date for the query period (ISO 8601) Example: 2026-01-01 |
to | string | no | End date for the query period (ISO 8601) Example: 2026-02-23 |
Response 200
application/json · ApiResponseBranchMostCommitsResponseDto
| Field | Type | Description |
|---|---|---|
success | boolean | — |
message | string | — |
data | BranchMostCommitsResponseDto | Branches ranked by commit count, highlighting the most active branch |
Status codes
200— Branch commit ranking returned successfully401— Unauthorized - invalid or missing JWT token429— —
Every response is wrapped in { success, message, data }. A 4xx means the request
is wrong — do not retry it unchanged. A 429 carries Retry-After in seconds.