Skip to content

fix(api): register missing HTTP verbs on several ES-compat endpoints - #8

Merged
xerj-team merged 1 commit into
xerj-org:mainfrom
Vinz2168:fix/missing-http-verbs
Jul 24, 2026
Merged

fix(api): register missing HTTP verbs on several ES-compat endpoints#8
xerj-team merged 1 commit into
xerj-org:mainfrom
Vinz2168:fix/missing-http-verbs

Conversation

@Vinz2168

Copy link
Copy Markdown
Collaborator

Several ES-compat endpoints only register one HTTP verb where real Elasticsearch accepts more than one, causing 405s for clients that use the other verb:

  • _refresh, _analyze (index-scoped + global), _msearch: only POST, real ES also accepts GET
  • _clone, _shrink, _split (the resize-index family): only POST, real ES also accepts PUT

Concrete impact: this blocks Kibana's saved-object migration, which issues PUT .../_clone/... during startup and gets a 405 today — a fatal migration error before Kibana renders anything. Repro'd against a local Kibana 8.13 instance.

Fix: chain the missing verb onto the existing MethodRouter for each affected route in build_es_compat_router (router.rs). No behavior change for the already-working verb; purely additive.

Tested: cargo build --release -p xerj-api clean, verified via curl that PUT .../_clone/... now returns 200 instead of 405.

Several endpoints only registered one HTTP verb where real Elasticsearch
accepts more than one, causing 405s for clients that use the other verb:

- _refresh, _analyze (index-scoped + global), _msearch: only POST, real
  ES also accepts GET
- _clone, _shrink, _split (the resize-index family): only POST, real ES
  also accepts PUT

Concretely this blocks Kibana's saved-object migration, which issues
PUT .../_clone/... during startup and gets a 405 today, causing a fatal
migration error before Kibana renders anything.

Fix: chain the missing verb onto the existing MethodRouter for each
route in build_es_compat_router (router.rs).
@xerj-team
xerj-team merged commit 1160ac5 into xerj-org:main Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants