API Reference / Code - Branch Insights

Get branch codebase insights

post https://api.intelig.ai/api/v1/intelig/code/branches/summary-cards

Auth: Authorization: ApiKey <key> (an API key sent as Bearer is rejected) or Authorization: Bearer <jwt> for a dashboard session. operationId: getBranchCodebaseInsights

Returns summary cards for branch codebase health including total branches, active branches, and merge activity. Filters by repository and date range from the request body.

Example request

curl -X POST "https://api.intelig.ai/api/v1/intelig/code/branches/summary-cards" \
  -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

FieldTypeRequiredDescription
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 · ApiResponseBranchCodebaseSummaryResponseDto

FieldTypeDescription
success boolean
message string
data BranchCodebaseSummaryResponseDto Aggregated branch health summary across the codebase for a given time range

Status codes

  • 200 — Branch codebase summary cards returned successfully
  • 401 — Unauthorized - invalid or missing JWT token
  • 429 — —

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.