Overview
The Assessment API backs the Assessment Question Generator. It manages a Postgres-backed bank of consulting diagnostic questions and records completed assessment sessions. All endpoints live under/api. Responses are JSON with a success boolean. Errors return success: false and an error message with HTTP 400 (validation), 503 (missing AI key), or 500 (server error).
Questions and sessions are scoped by workspaceId. Records with no workspaceId are global and visible to every workspace.
List assessment questions
200):
Create an assessment question
domain, text, skill, and evaluation; missing fields return 400.
201 with the created record in question.
Delete an assessment question
200 with a confirmation message.
Generate questions with AI
source: "ai_synthesized". Requires the GOOGLE_GENERATIVE_AI_API_KEY environment variable; if it is not set, the endpoint returns 503.
201 with the inserted questions in questions. The endpoint tries gemini-2.5-flash first and falls back to gemini-1.5-flash, then gemini-1.5-pro.
Save an assessment session
callNotes; a missing value returns 400.
201 with the saved record in session.
