quality

Returns the current Code Health of a component, ranked against the other components of the project.

Changed on
get/api/projects/{project-id}/components/{component-id}/quality/code-health

Request

  • Base URL: https://codescene.io (the document declares no server; this is the origin it was published from)
  • URL: https://codescene.io/api/projects/{project-id}/components/{component-id}/quality/code-health
  • Auth: none declared

Path parameters

project-idinteger required
component-idinteger required

Response

OR

Example response

{
  "projectId": 1,
  "asOf": "2026-06-09T10:15:00Z",
  "comparisonPeriod": {
    "from": "2026-01-01",
    "to": "2026-06-09"
  },
  "type": "team",
  "analyticalUnitId": 9101,
  "name": "Payments Team",
  "averageCodeHealth": {
    "value": 7.4,
    "delta": 0.3,
    "classification": "problematic-code",
    "nextGoal": {
      "id": "healthy-code",
      "label": "Healthy",
      "value": 9,
      "type": "threshold"
    },
    "trend": {
      "direction": "steady"
    },
    "series": [
      {
        "date": "2026-06-01",
        "value": 7.2
      }
    ]
  },
  "hotspotCodeHealth": {
    "value": 7.4,
    "delta": 0.3,
    "classification": "problematic-code",
    "nextGoal": {
      "id": "healthy-code",
      "label": "Healthy",
      "value": 9,
      "type": "threshold"
    },
    "trend": {
      "direction": "steady"
    },
    "series": [
      {
        "date": "2026-06-01",
        "value": 7.2
      }
    ]
  },
  "context": {
    "averageCodeHealth": {
      "interpretation": {
        "id": "industry-average",
        "label": "Average Organizations",
        "value": 5.15,
        "type": "benchmark"
      },
      "nextGoal": {
        "id": "problematic-code",
        "label": "Problematic",
        "value": 8.9,
        "type": "threshold"
      }
    },
    "hotspotCodeHealth": {
      "interpretation": {
        "id": "industry-average",
        "label": "Average Organizations",
        "value": 5.15,
        "type": "benchmark"
      },
      "nextGoal": {
        "id": "problematic-code",
        "label": "Problematic",
        "value": 8.9,
        "type": "threshold"
      }
    }
  },
  "aiReadinessContext": {
    "averageCodeHealth": {
      "interpretation": {
        "id": "industry-average",
        "label": "Average Organizations",
        "value": 5.15,
        "type": "benchmark"
      },
      "nextGoal": {
        "id": "problematic-code",
        "label": "Problematic",
        "value": 8.9,
        "type": "threshold"
      }
    },
    "hotspotCodeHealth": {
      "interpretation": {
        "id": "industry-average",
        "label": "Average Organizations",
        "value": 5.15,
        "type": "benchmark"
      },
      "nextGoal": {
        "id": "problematic-code",
        "label": "Problematic",
        "value": 8.9,
        "type": "threshold"
      }
    }
  },
  "peers": {
    "averageCodeHealth": {
      "rank": 3,
      "peerCount": 12,
      "median": 7.1
    },
    "hotspotCodeHealth": {
      "rank": 3,
      "peerCount": 12,
      "median": 7.1
    }
  },
  "files": {
    "totalFiles": 3,
    "hotspotCount": 2,
    "upliftTargetCount": 1,
    "healthyHotspotCount": 1,
    "offboardingRiskCount": 1
  }
}

Changes