Skip to content

Add elastic kb cases command group (Cases APIs are in Kibana's OpenAPI spec but not generated in the CLI) #528

Description

@dhru42

Summary

The elastic CLI (tested against v0.5.1) has no cases command group under elastic kb, even though the Cases REST API is fully described in Kibana's bundled OpenAPI document. We hit this while converting Kibana's Cases Agent Builder skill to the universal skill format in agent-skills-sandbox#470, where the skill's Operations table maps each call to an elastic kb cases ... command.

Evidence

  • elastic kb --help and elastic kb cases --help on v0.5.1 return no cases commands (confirmed by @melissaburpo and @ghudgins).
  • The Cases endpoints are present in Kibana's bundled OpenAPI spec — oas_docs/output/kibana.yaml contains 18 /api/cases* paths (/api/cases, /api/cases/_find, /api/cases/{caseId}, /api/cases/{caseId}/comments, /api/cases/{caseId}/observables, /api/cases/configure, etc.).
  • The CLI README on main already lists cases as an example namespace (elastic kb cases list), so this looks like a generation/enablement gap rather than a design decision.

Ask

Generate/enable the elastic kb cases command group from the existing OpenAPI paths, and confirm the operation IDs and flag names so downstream skills can bind to them. The operations the Cases skill needs:

REST endpoint Purpose
POST /api/cases create
GET /api/cases/_find search/list (with owner, tags, status, severity, search, paging, sort)
GET /api/cases/{caseId} get one (for version before update)
PATCH /api/cases bulk update (status/severity/tags/assignees)
DELETE /api/cases delete
POST /api/cases/{caseId}/comments add user comment / attach alert
GET /api/cases/{caseId}/comments/_find list comments
GET /api/cases/{caseId}/alerts, GET /api/cases/alerts/{alertId} alert<->case links
GET /api/cases/configure templates / custom fields
`POST PATCH

Notes

  • These internal endpoints are expected to be excluded (no public binding needed): POST /internal/cases/_bulk_get, POST /internal/cases/{caseId}/_similar, POST /internal/cases/{caseId}/attachments/_bulk_create.
  • Until the command group ships, the skill keeps the HTTP shorthand (/api/cases*) as the authoritative contract and marks the CLI commands as projected.

Context: agent-skills-sandbox#470

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions