Overview
The Pastures Engine exposes a REST API that the Rancher extension consumes. All endpoints accept and return JSON (Content-Type: application/json).
Authentication
Authentication is optional and configured per-installation in Pastures → Settings. When an API key is set, every request includes anAuthorization header:
Base URL
The Engine URL is stored inlocalStorage and configurable in Settings. All API paths in this reference are relative to that base URL.
Endpoint Groups
Diagnostics
POST /api/diagnose — AI-powered root-cause analysis and remediation plans.Advisories
GET /api/advisories — Security and operational advisories relevant to the cluster.Health & Status
GET /health and GET /api/llm/status — Engine health check and AI provider status.Clusters
GET /api/clusters/* — Cluster inventory, status, and metadata.Operations
/api/cis/*, /api/etcd/*, /api/monitoring/*, /api/audit/* — CIS benchmarks, etcd health, monitoring, and audit logs.GPU
/api/gpu/* — GPU inventory, utilization, and scheduling.Support
POST /api/support-bundle — Generate and download support bundles.Actions
POST /api/clusters/{id}/actions/execute — Execute remediation actions on a cluster.Demo Mode
When demo mode is enabled in the extension,engineFetch() short-circuits and returns synthetic data from lib/demoResponses.ts without making any network calls. This allows the full UI to function without a running Engine instance.
Error Handling
The Engine returns standard HTTP status codes:| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request — invalid or missing parameters |
401 | Unauthorized — invalid or missing API key |
404 | Endpoint not found |
500 | Internal server error |
503 | Service unavailable — Engine or AI provider is down |