Display API quality grades on Backstage API entity pages — computed server-side from spec.definition content using the api-grade-core grading engine.
The integration consists of two Backstage plugin packages:
backstage-plugin-api-grade # Frontend card component
backstage-plugin-api-grade-backend # Backend grading endpoint
Request flow:
Backstage UI
└─ ApiGradeCard (frontend plugin)
└─ GET /api/api-grade/grade?entityRef=...
└─ backstage-plugin-api-grade-backend
└─ Catalog client → fetches ApiEntity
└─ api-grade-core → GradeEngine.gradeContent()
└─ GradeResult → BackstageGradeResponse → JSON
Renders the API Grade card in the Info column of an API entity page. The card shows:
- A grade letter, numeric percentage, and quality label to all viewers — using
the same
letterGrade/gradeLabel/numericScorefield names defined in the JSON Output Schema shared with the CLI and MCP server - Quality Assessment commentary, numbered Recommendations, and full Diagnostics to API owners and configured groups
The card uses Backstage's useEntity() hook to read the current entity reference and calls the backend via Backstage's Discovery and Fetch APIs.
Exposes a single REST endpoint (GET /grade) registered under the api-grade plugin ID. On each request it:
- Looks up the
ApiEntitybyentityRefusing the Backstage Catalog client - Validates the entity kind (
API) and format (openapiorasyncapi) - Extracts
spec.definition(the inlined spec content) - Calls
GradeEngine.gradeContent()fromapi-grade-core - Filters the response based on the requesting user's ownership or group membership
No state is persisted — grades are computed on demand on every page load.
- Backstage instance using the New Backend System (
@backstage/backend-defaults≥ 0.4) - Node ≥ 20
@dawmatt/backstage-plugin-api-gradeand@dawmatt/backstage-plugin-api-grade-backendpackages installed
Backstage spec.type |
Supported |
|---|---|
openapi (Swagger 2.x or OpenAPI 3.x) |
Yes |
asyncapi (AsyncAPI 2.x or 3.x) |
Yes |
graphql, grpc, trpc, others |
No — card shows "format not supported" |
| Guide | Purpose |
|---|---|
| Quick Start | Install and verify in under 10 minutes |
| Plugin Setup | Full installation and wiring details for both plugins |
| Configuration | All apiGrade config options with examples |
| Troubleshooting | Common issues and solutions |
- → Quick-Start Guide — get the plugins running in under 10 minutes
- → Plugin Setup Guide — full installation and wiring for both plugins
- → Configuration Reference — all
apiGradeconfig options with examples - → Troubleshooting Guide — common issues and solutions
- → Documentation Index — full navigation across all project docs