quality
Returns historical Code Health metrics over time.
get/api/projects/{project-id}/quality/code-health/trend
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/trend
- Auth: none declared
Path parameters
project-idinteger required
Query parameters
type'team' | 'component'
Filter the trend by a team or component.
namestring
Name of the team or component to filter by. Required when type is specified.
pageSizeinteger
Number of data points to return per page. Defaults to 100.
pageTokenstring
Opaque cursor returned as nextPageToken in a previous response. Resumes pagination from where the previous page ended. pageSize may differ from the original request.
sortstring
Sort results by a property. Format: property or property:asc / property:desc. Valid sort properties depend on the endpoint.
fromstring date
Example:2026-03-20
Include only data points on or after this date (inclusive). Format: YYYY-MM-DD.
tostring date
Example:2026-03-20
Include only data points on or before this date (inclusive). Format: YYYY-MM-DD.
Response
Example response
{
"projectId": 1,
"period": {
"from": "2026-01-01",
"to": "2026-06-09"
},
"metrics": [
"averageCodeHealth",
"hotspotCodeHealth"
],
"series": [
{
"date": "2026-01-05",
"averageCodeHealth": 7.1,
"hotspotCodeHealth": 5.2,
"projections": {
"realized": {
"averageCodeHealth": 6.4
},
"potential": {
"averageCodeHealth": 6.8
}
}
}
],
"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": "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"
}
}
},
"nextPageToken": "eyJwYWdlTmJyIjoxLCJwYWdlU2l6ZSI6NTB9"
}