API Reference / Code - Repositories

Get aging pull requests

post https://api.intelig.ai/api/v1/intelig/code/repositories/aging-prs

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

Returns pull requests that have been open longer than 7 days for the Flow tab spotlight. Highlights PRs at risk of becoming stale, including age, author, and review status. Filterable by repository IDs in the request body.

Example request

curl -X POST "https://api.intelig.ai/api/v1/intelig/code/repositories/aging-prs" \
  -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

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

FieldTypeDescription
success boolean
message string
data AgingPRDto List of aging pull requests that have been open beyond thresholds

Status codes

  • 200 — List of aging PRs returned
  • 400 — Invalid request body
  • 401 — Authentication required
  • 403 — Insufficient permissions for Code Intelligence pillar
  • 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.