feat: add elastic api for untyped HTTP
Author: margaretjguCreated Sep 14, 2026Updated Sep 14, 2026
Labelsenhancement
The command surface is generated from specs, but agents still hit gaps: preview Kibana routes, custom headers, undocumented query params, and hitting an arbitrary path during incidents.
Add elastic api <method> <path> that uses the active context's ES, Kibana, or Cloud base URL (--service es|kb|cloud). Reuse existing auth, --json, --dry-run, --input-file. No pagination helper in MVP.
Prefer typed commands. Use elastic api only when no generated command exists.
Acceptance: elastic api GET / --service es --dry-run prints the resolved request. A real GET / against a configured ES returns cluster info. Path params are encoded. redirect: 'error' on the fetch.
Source: elastic/cli