Expand description
Cases: typed wrappers over the /api/cases family.
Case identity on mutation is id plus the fetched version — the API is
optimistic-concurrency and a stale version answers 409 (triage spec
sections 3 and 10). Cases are collaboration records: there is no mirror,
no reconciliation, and deletion is a real verb (unlike alerts).
Structs§
- Case
- A case as the API returns it. The four identity/workflow fields are
required (fail-closed); everything else is optional or flattened into
extraso the full server object survives a round trip to render. - NewCase
Enums§
- Case
Status - The case status vocabulary. Cases legitimately use
in-progress(it is a filter value); the transition verbs target onlyopenandclosed.
Constants§
Functions§
- add_
comment - Add a user comment; the response is the updated case.
- attach_
alerts - Attach alerts as one comment of type
alert. All alerts in one call share a rule (the API takes oneruleobject per comment); the caller groups by rule.alert_idsandindicesare parallel arrays. - case_
path - comments_
path - create
- Create a case. The API requires a non-empty description; when the
operator gave none, or gave an empty or whitespace-only one, the title
stands in —
Some("")must fall back exactly likeNone, or it defeats the fallback and earns a server 400 on minimum length.connectorandsettingsare required by the route; elasticctl pins the no-op connector and leaves alert-status syncing off — alert transitions stay explicit CLI actions. - decode_
case - decode_
find - Decode
GET /api/cases/_find:{cases, page, per_page, total, ...}. - delete
- Delete cases permanently. 204 with an empty body on success.
- delete_
path DELETE /api/cases?ids=["a","b"]— the ids parameter is a JSON array in the query string.- find_
page - One find page; the caller builds the query string (
cases_ops::find_query). - get
- patch_
status - Bulk status update:
PATCH /api/caseswith{cases: [{id, version, status}]}. The response is the array of updated cases.