API Reference / Code - Repositories
Get PR flow metrics
post
https://api.intelig.ai/api/v1/intelig/code/repositories/pr-flow
Auth: Authorization: ApiKey <key> (an API key sent as
Bearer is rejected) or Authorization: Bearer <jwt>
for a dashboard session. operationId: getPRFlowMetrics
Returns PR lifecycle funnel and bottleneck metrics for the Flow tab. Includes open/review/approved/merged counts, average lifecycle stage times, and throughput rates. Filterable by repository IDs in the request body.
Example request
curl -X POST "https://api.intelig.ai/api/v1/intelig/code/repositories/pr-flow" \
-H "Authorization: ApiKey $INTELIG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "2024-01-01",
"to": "2024-01-31",
"repositoryIds": [
10,
11
]
}' Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
from | string | yes | Start date in YYYY-MM-DD format Example: 2024-01-01 |
to | string | yes | End date in YYYY-MM-DD format Example: 2024-01-31 |
repositoryIds | integer[] | no | Optional list of repository IDs to filter by; if empty, returns all repos Example: [10,11] |
Response 200
application/json · ApiResponsePRFlowMetricsDto
| Field | Type | Description |
|---|---|---|
success | boolean | — |
message | string | — |
data | PRFlowMetricsDto | PR flow funnel metrics with bottleneck timing and aging data |
Status codes
200— PR flow funnel and bottleneck metrics returned400— Invalid request body401— Authentication required403— Insufficient permissions for Code Intelligence pillar429— —
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.