quality
Returns the current Code Health state, comparison metrics, projection summaries, and Quality Gate impact.
get/api/projects/{project-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}/quality/code-health
- Auth: none declared
Path parameters
project-idinteger required
Response
Example response
{
"projectId": 1,
"asOf": "2026-06-09T10:15:00Z",
"codeAsOf": "2026-06-08T14:22:00Z",
"staleness": {
"classification": "fresh",
"analysisAgeDays": 0,
"codeAgeDays": 2
},
"repositories": [
{
"name": "payments-service",
"sha": "a1b2c3d",
"codeAsOf": "2026-06-08T14:22:00Z",
"commitUrl": "https://github.com/example/payments-service/commit/a1b2c3d"
}
],
"comparisonPeriod": {
"from": "2026-01-01",
"to": "2026-06-09"
},
"languages": [
{
"name": "Clojure",
"fileCount": 120,
"linesOfCode": 21050
}
],
"averageCodeHealth": {
"value": 7.4,
"delta": 0.3,
"classification": "problematic-code",
"nextGoal": {
"id": "healthy-code",
"label": "Healthy",
"value": 9,
"type": "threshold"
}
},
"hotspotCodeHealth": {
"value": 3.8,
"delta": 0.6,
"classification": "unhealthy-code",
"nextGoal": {
"id": "problematic-code",
"label": "Problematic",
"value": 4,
"type": "threshold"
}
},
"aiReadinessContext": {
"averageCodeHealth": {
"interpretation": {
"id": "ai-assisted",
"label": "AI Assisted",
"value": 6.5,
"type": "ai-readiness"
},
"nextGoal": {
"id": "ai-friendly",
"label": "AI Friendly",
"value": 9.5,
"type": "ai-readiness"
}
},
"hotspotCodeHealth": {
"interpretation": {
"id": "ai-caution",
"label": "AI Caution",
"value": 1,
"type": "ai-readiness"
},
"nextGoal": {
"id": "ai-assisted",
"label": "AI Assisted",
"value": 6.5,
"type": "ai-readiness"
}
}
},
"teams": [
{
"name": "Payments Team",
"analyticalUnitId": 9101,
"linesOfCode": 48200,
"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
}
]
}
}
],
"components": [
{
"name": "Payments Team",
"analyticalUnitId": 9101,
"linesOfCode": 48200,
"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
}
]
}
}
],
"projections": [
{
"id": "without-gating",
"name": "Without Quality Gates",
"averageCodeHealthDifference": -0.6,
"hotspotCodeHealthDifference": -0.9,
"links": {
"trend": "/projects/payments-service/quality/code-health/projections/without-gating?from=2026-01-01&to=2026-06-09&granularity=week&metrics=averageCodeHealth,hotspotCodeHealth"
}
}
],
"qualityGateImpact": {
"preventedDeclines": 37,
"links": {
"details": "/projects/payments-service/quality/code-health/declines?from=2026-01-01&to=2026-06-09&status=prevented&sort=detectedAt:desc&pageSize=50"
}
},
"links": {
"benchmarks": "/projects/payments-service/quality/code-health/benchmarks",
"trend": "/projects/payments-service/quality/code-health/trend?from=2026-01-01&to=2026-06-09&granularity=week&metrics=averageCodeHealth,hotspotCodeHealth",
"projections": "/projects/payments-service/quality/code-health/projections?from=2026-01-01&to=2026-06-09",
"qualityGateImpact": "/projects/payments-service/quality/code-health/gating-impact?from=2026-01-01&to=2026-06-09"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.