POST /api/diagnose
Submits a natural-language query to the Pastures Engine for AI-powered diagnosis. The Engine analyzes the cluster state, documentation corpus, and advisory history to produce a root-cause analysis with actionable fix commands.
The extension calls this endpoint from PasturesAIDrawer when a user asks a question.
Request
Headers
Body
Response
Response Fields
Confidence and Risk Levels
The extension maps theconfidence score to a risk level that determines UI behavior and confirmation requirements:
When
generate_plan is false, the response omits fix_commands and returns only the analysis (root_cause, fix_summary, confidence).