The Admin API allows ADMIN-role users to manage the error tag catalog — the taxonomy of 2,600+ procedural error codes aligned to the Chilean curriculum. This is the backend source of truth synced from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vruizz22/innova-backend-serverless/llms.txt
Use this file to discover all available pages before exploring further.
innova-ai-engine taxonomy. Admins can browse the live catalog with fast keyset pagination, filter by domain or status, and promote or deprecate individual tags to control which codes the AI classifier can assign.
All endpoints in this section require an ADMIN role JWT. TEACHER and PARENT tokens are rejected with
403 Forbidden.Endpoints
GET /admin/error-tags
Browse the live error-tag catalog with keyset pagination. The catalog is ordered by the uniquecode index, which ensures stable pagination even as new tags are inserted. In addition to the current page of items, the response includes total counts, per-status counts, and a domain facet list — useful for building a catalog browser UI.
Authentication: JWT (ADMIN role required)
Filter by tag status. One of
ACTIVE, DRAFT, or DEPRECATED.Filter to a specific domain using its short code (e.g.
ARITH, FRACT, GEOM, TRIG). Pick from the domains facet in the response.Filter by tag source (e.g.
LLM_GENERATED, CURATED). Matches the ErrorSource enum from Prisma.Case-insensitive substring search over
code, name, and description.Keyset cursor — the
code value of the last item on the previous page. Omit for the first page.Page size. Defaults to
50. Maximum 100.Current page of error tags. Each tag contains:
code(string): unique tag code (e.g.ARITH_ADD_CARRY_OMITTED_G3)name(string): human-readable error namedomainCode(string | null): parent domain codedomainName(string | null): parent domain display namesubdomainCode(string | null): subdomain code if setsource(string): tag origin (CURATED,LLM_GENERATED, etc.)status(string):ACTIVE,DRAFT, orDEPRECATEDseverity(string | null): error severity levelapplicableGrades(array): grade levels this error is relevant fordiagnosticHint(string | null): teacher-facing hint about the error
Pass this as
cursor to retrieve the next page. null means this is the last page.Total count of tags matching the current filters (across all pages).
Aggregate counts by status:
{ active, draft, deprecated }. Always reflects the unfiltered catalog totals.All domains with their tag counts — useful for populating a domain filter facet. Each entry:
{ code, name, count }.PATCH /admin/error-tags/:code/status
Promote an error tag toACTIVE or deprecate it to DEPRECATED. Use this to control which tags the AI classifier can assign in new classifications.
Authentication: JWT (ADMIN role required)
The unique error tag code (e.g.
ARITH_SUB_BORROW_OMITTED_TENS_G3). Case-sensitive — must exactly match the code column.New status. One of
ACTIVE, DRAFT, or DEPRECATED. Validated against the ErrorStatus Prisma enum.200 OK — the updated error tag object (same shape as the items in GET /admin/error-tags).
Returns 404 Not Found if the tag code does not exist in the catalog.
Admin status endpoint
GET /admin/status provides a real-time health snapshot of the entire Innova pipeline. It is implemented in AdminStatusController and backed by AdminStatusService.
Authentication: JWT (ADMIN role required)
SQS queue depths for each pipeline queue:
guide-ingest, attempt-reprocess, llm-classify, and hourly-alerts. Each entry: { depth, dlqDepth, processedLastHour }.Activity counts for the last hour:
{ attemptsLastHour, submissionsLastHour, classifiedLastHour, pendingGuides }.LLM cost breakdown:
{ todayUsd, monthUsd, byModel: [{ model, calls, inputTokens, outputTokens, costUsd }] }.Current state of pipeline killswitches.
true = worker running, false = worker paused:graderEnabled— controls the guide grader LambdaclassifierEnabled— controls the LLM error classifiersolutionGeneratorEnabled— controls the solution generatorhourlyAlertsEnabled— alwaystrue(no SSM parameter to pause)
Pipeline killswitches
Individual workers can be paused viaPATCH /admin/status/killswitches/:key. Valid keys are graderEnabled, classifierEnabled, and solutionGeneratorEnabled. The enabled field maps to an SSM parameter: enabled: true sets the SSM “paused” parameter to false, and vice versa.
Error tag sync
The error catalog is seeded and kept in sync from theinnova-ai-engine taxonomy using a two-step script:
import-error-catalog.ts— fetches the canonical tag list from the AI engine and upserts records into theErrorTagtable.codegen-error-tags.ts— generates thesrc/shared/domain/error-tags.generated.tsTypeScript enum (ErrorTagCode) from the live database state.
2026-06-20). After running seed:full, redeploy the backend so the updated enum is bundled into the Lambda package.