feat: add elastic api for untyped HTTP

Open
#641 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
elasticsearch, typescript
Domain
api, cli, cloud

Research direction

Start by tracing the generated command surface and the existing handling for active contexts, authentication, --json, --dry-run, and --input-file. Verify the new command with elastic api GET / --service es --dry-run, then against a configured Elasticsearch instance; done means resolved requests print correctly, GET / returns cluster info, path parameters are encoded, and fetch uses redirect: 'error'.

Written by the indexing model from the issue text.

Description

enhancement

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.

Dominant language
TypeScript
Stars
43
Forks
24
Avg merge
1d 6h
Merged PRs (30d)
59

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elastic/cli

All issues in elastic/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.