kibana-cases
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKibana Cases
Kibana Cases
Create, search, update, and enrich Elastic cases across Security, Observability, and Stack Management. You have full
read and write access — never claim read-only access. Cases can be assigned to users, linked to alerts and events,
enriched with observables, and pushed to external incident-management systems via connectors.
<!-- begin-partial: preamble -->在 Security、Observability 和 Stack Management 中创建、搜索、更新和丰富 Elastic 案件。你拥有完整的读和写访问权限——绝不能声称只有只读访问权限。案件可以分配给用户、关联告警和事件、使用可观测项进行丰富,并通过 推送到外部事件管理系统。
<!-- begin-partial: preamble -->connectorEnvironment Configuration
环境配置
This skill executes Elasticsearch operations through the CLI. If the
CLI is not installed, tell the user what it is needed for. Do
not guess credentials, call the HTTP API directly, or attempt other workarounds.
elasticelasticThis skill references operations in HTTP-shorthand form (e.g., , , ,
, ). The Operations table at the end of this document
maps each shorthand to the equivalent CLI command — always use the CLI rather than calling the HTTP API
directly.
<!-- end-partial: preamble -->GET /GET /_cat/indicesGET /{index}/_mappingGET /{index}/_settings/index.modePOST /_queryelastic此 skill 通过 CLI 执行 Elasticsearch 操作。如果未安装 CLI,告知用户需要安装它。不要猜测凭据、直接调用 HTTP API 或尝试其他变通方法。
elasticelastic此 skill 以 HTTP 简写形式引用操作(例如,、、、、)。文档末尾的操作表将每种简写映射到等效的 CLI 命令——始终使用 CLI,而不是直接调用 HTTP API。
<!-- end-partial: preamble -->GET /GET /_cat/indicesGET /{index}/_mappingGET /{index}/_settings/index.modePOST /_queryelasticSolution context — highest-priority rule
解决方案上下文——最高优先级规则
Cases are partitioned across (Security), (Observability), and (Stack
Management). A user works in exactly one. Operating in the wrong solution — or fanning out across all three — is always
a bug.
securitySolutionobservabilitycasesBefore any cases operation, the solution must be set, sourced ONLY from the user naming it in plain language
("in Security", "obs cases", "Stack Management", etc.) in the current or an earlier message. Topic-keyword inference
does not count. If the owner is unset, your only valid action is to ask, verbatim:
owner"Which Elastic app is this in — Security, Observability, or Stack Management?"
Once set: pass it as on every create and as the filter on every ; treat it as fixed unless the
user explicitly switches. Never:
ownerowner_find- Call (or any read) with multiple
_findvalues to "cover all three" — this is the most common failure.owner - Silently fall back to another owner on empty results — say "No matching cases in " and stop.
<Solution> - Skip this for case-id operations — an id resolves a record, but the solution context still confirms intent.
Examples:
- "find the case about the failing payment service" → ask first.
- "investigating a Suricata alert in Security — find related cases" → (named directly).
securitySolution - (turn 2, Security established on turn 1) "show me the open ones" → reuse, don't re-ask.
- "close case abc-123" with no prior context → ask first.
案件分布在 (Security)、(Observability)和 (Stack Management)三个解决方案中。用户只会在其中一个解决方案中工作。在错误的解决方案中操作——或者同时覆盖全部三个解决方案——始终属于错误。
securitySolutionobservabilitycases执行任何案件操作前,必须设置解决方案的 ,且只能依据用户在当前或此前消息中以自然语言明确指定的解决方案来设置(例如,“在 Security 中”“obs cases”“Stack Management”等)。根据主题关键词推断不算明确指定。如果 尚未设置,唯一有效的操作是逐字询问:
ownerowner“这是哪个 Elastic 应用——Security、Observability 还是 Stack Management?”
设置后:在每次创建操作中将 作为 传入,并在每次 操作中将 作为 过滤器传入;将其视为固定值,除非用户明确切换。绝不能:
ownerowner_findownerowner- 使用多个 值调用
owner(或任何读取操作)来“覆盖全部三个”——这是最常见的错误。_find - 在结果为空时悄悄回退到另一个 ——应说明“
owner中没有匹配的案件”并停止。<Solution> - 对按案件 ID 执行的操作跳过此步骤——ID 可以解析记录,但解决方案上下文仍用于确认意图。
示例:
- “查找有关 payment service 故障的案件” → 先询问。
- “正在 Security 中调查 Suricata 告警——查找相关案件” → (已明确指定)。
securitySolution - (第 2 轮,第 1 轮已确定 Security)“显示打开的案件” → 复用上下文,不要再次询问。
- “关闭案件 abc-123”,此前没有上下文 → 先询问。
Solution profiles
解决方案概况
| Solution | Typical triggers | Observables (IOCs) | |
|---|---|---|---|
| SIEM detection rules, threat hunts, manual triage | Primary use case — proactively track IPs, domains, file hashes, URLs | active attack in progress |
| APM errors, SLO violations, metric/log anomalies | Rarely relevant — do not proactively suggest | complete service outage |
| General-purpose, no domain assumptions | Rarely relevant | — |
Domain notes: flows → → . are user profile UIDs, not usernames.
is one of , , , .
statusopenin-progressclosedassigneesseveritylowmediumhighcritical| 解决方案 | 典型触发场景 | 可观测项(IOCs) | |
|---|---|---|---|
| SIEM 检测规则、威胁狩猎、人工分诊 | 主要使用场景——主动跟踪 IP、域名、文件哈希和 URL | 主动攻击正在进行 |
| APM 错误、SLO 违规、指标或日志异常 | 很少相关——不要主动建议 | 服务完全中断 |
| 通用用途,无特定领域假设 | 很少相关 | — |
领域说明: 按 → → 的顺序流转。 是用户配置文件 UID,而不是用户名。 的可选值为 、、、。
statusopenin-progressclosedassigneesseveritylowmediumhighcriticalProcess
流程
-
Establish solution context, then classify the task. Confirm theper the rule above. Decide whether the user needs to create a case, find/list cases (read-only), get one case, comment on or attach alerts/events to a case, add observables, or update one or more cases. If the user only asks to show, list, or search, treat the request as read-only — do not create, comment, attach, or update anything.
owner -
Check for an existing case before creating one. When triaging, first search so you do not create duplicates. Callfiltered to the owner, or
GET kbn:/api/cases/_findto see whether a specific alert is already attached to a case.GET kbn:/api/cases/alerts/{alertId}- By text: searches title, description, and comments. Add
search=<hostname or keyword>to limit to active cases.status=open - By tag: is exact-match only — use it to correlate on a host, agent, or rule.
tags=<tag>
Report the exactcount and each matching case verbatim. Reuse an existing case when the same entity or rule is already tracked; otherwise continue to create.total - By text:
-
For create tasks, build the payload. Callwith
POST kbn:/api/cases,title,description,tags, the resolvedseverity, aowner(use theconnectorconnector unless the user asks to wire an external system), andnone(defaultsettings.syncAlerts). Confirm the create with the user before writing, then report the returned casetrueverbatim.idjson{ "title": "Malicious DLL sideloading on host1", "description": "Crypto clipper malware detected via DLL sideloading...", "tags": ["classification:malicious", "mitre:T1574.002"], "severity": "critical", "owner": "securitySolution", "connector": { "id": "none", "name": "none", "type": ".none", "fields": null }, "settings": { "syncAlerts": true } }To apply a case template, read the available templates from, then merge the template's fields (including anyGET kbn:/api/cases/configure) into the create payload.customFields -
Attach alerts and events. Attach each alert as ancomment via
alertwithPOST kbn:/api/cases/{caseId}/comments,type: "alert",alertId(the alert's data-stream index), theindex, and aownerobject.ruleandrule.idare required — passrule.namefor either when not known, or the request returns a 400. Attach one at a time and space repeated calls a few seconds apart to avoid rate limiting (HTTP 429).unknownjson{ "type": "alert", "alertId": "<alert_doc_id>", "index": ".ds-.alerts-security.alerts-default-2025.12.01-000013", "rule": { "id": "<rule_id>", "name": "Malicious Behavior Detection Alert" }, "owner": "securitySolution" } -
Add investigation notes. Record findings withusing
POST kbn:/api/cases/{caseId}/comments, atype: "user"string, and thecomment.owner -
Add observables (Security). For Security cases, proactively offer to track IOCs (IPs, domains, file hashes, URLs) with. Update or remove them with the matching
POST kbn:/api/cases/{caseId}/observables/PATCHobservable operations. Do not proactively suggest observables for Observability or Stack Management cases.DELETE -
For update tasks, read then patch — and batch. Cases use optimistic concurrency, so you must send the current. Call
versionto read the latestGET kbn:/api/cases/{caseId}, thenversionwith aPATCH kbn:/api/casesarray. Updating two or more cases in one request is a singlecaseswith multiple array entries — never multiple sequential updates. When changing tags, merge with existing tags unless the user asks to replace them. Confirm the update with the user before writing.PATCHjson{ "cases": [{ "id": "<case_id>", "version": "<case_version>", "status": "closed", "severity": "low" }] }On a version conflict, re-fetch the affected case and retry with the fresh. Assignee-only changes go through the sameversionwith anPATCHarray.assignees -
Report faithfully. Copy case ids, titles, tags, severities, and counts exactly as returned by the API. Do not abbreviate ids, truncate titles, invent details, or round numbers. When the API returns zero results, state that explicitly.
-
确定解决方案上下文,然后对任务进行分类。 按上述规则确认。判断用户是需要创建案件、查找/列出案件(只读)、获取单个案件、评论案件或将告警/事件附加到案件、添加可观测项,还是更新一个或多个案件。如果用户仅要求显示、列出或搜索,则将请求视为只读——不要创建、添加评论、附加或更新任何内容。
owner -
创建前检查是否已有案件。 进行分诊时,先搜索,避免创建重复案件。调用按过滤的
owner,或调用GET kbn:/api/cases/_find查看特定告警是否已经附加到案件。GET kbn:/api/cases/alerts/{alertId}- 按文本: 会搜索标题、描述和评论。添加
search=<hostname or keyword>可将结果限制为活动案件。status=open - 按标签: 仅支持精确匹配——可用于按主机、Agent 或规则进行关联。
tags=<tag>
逐字报告确切的计数和每个匹配案件。如果同一实体或规则已被跟踪,则复用现有案件;否则继续创建。total - 按文本:
-
对于创建任务,构建 payload。 调用,传入
POST kbn:/api/cases、title、description、tags、确定后的severity、owner(除非用户要求连接外部系统,否则使用connectorconnector)以及none(默认值为settings.syncAlerts)。写入前向用户确认创建操作,然后逐字报告返回的案件true。idjson{ "title": "Malicious DLL sideloading on host1", "description": "Crypto clipper malware detected via DLL sideloading...", "tags": ["classification:malicious", "mitre:T1574.002"], "severity": "critical", "owner": "securitySolution", "connector": { "id": "none", "name": "none", "type": ".none", "fields": null }, "settings": { "syncAlerts": true } }如需应用案件模板,请从读取可用模板,然后将模板字段(包括所有GET kbn:/api/cases/configure)合并到创建 payload 中。customFields -
附加告警和事件。 通过将每个告警作为
POST kbn:/api/cases/{caseId}/comments评论附加,并传入alert、type: "alert"、alertId(告警的数据流索引)、index和owner对象。rule和rule.id为必填项——如果未知,任何一项都传入rule.name,否则请求会返回 400。每次只附加一个告警,并将重复调用间隔几秒,以避免触发速率限制(HTTP 429)。unknownjson{ "type": "alert", "alertId": "<alert_doc_id>", "index": ".ds-.alerts-security.alerts-default-2025.12.01-000013", "rule": { "id": "<rule_id>", "name": "Malicious Behavior Detection Alert" }, "owner": "securitySolution" } -
添加调查备注。 使用,传入
POST kbn:/api/cases/{caseId}/comments、type: "user"字符串和comment,记录调查结果。owner -
添加可观测项(Security)。 对于 Security 案件,应主动提出使用跟踪 IOCs(IP、域名、文件哈希、URL)。使用对应的 observable
POST kbn:/api/cases/{caseId}/observables/PATCH操作更新或移除它们。对于 Observability 或 Stack Management 案件,不要主动建议添加可观测项。DELETE -
对于更新任务,先读取再 patch——并批量处理。 案件采用乐观并发控制,因此必须发送当前的。调用
version读取最新GET kbn:/api/cases/{caseId},然后调用version并传入PATCH kbn:/api/cases数组。在一次请求中更新两个或更多案件时,应使用包含多个数组条目的单次cases——绝不能连续执行多次更新。更改PATCH时,除非用户要求替换,否则应与现有标签合并。写入前向用户确认更新操作。tagsjson{ "cases": [{ "id": "<case_id>", "version": "<case_version>", "status": "closed", "severity": "low" }] }如果发生版本冲突,请重新获取受影响案件的最新,并使用新值重试。仅更改受理人的操作也通过同一个version完成,并使用PATCH数组。assignees -
如实报告。 逐字复制 API 返回的案件 ID、标题、标签、严重性和计数。不要缩写 ID、截断标题、编造详情或对数字进行取整。如果 API 返回零条结果,必须明确说明。
Reporting list and find results
报告列表和查找结果
- State the exact count from the JSON response (e.g., "There are 12 open cases total").
total - Present each case as a compact one-line entry: . Copy the exact title verbatim — do not rephrase, abbreviate, or summarize.
<title> | <severity> | <case_id_short> | <created_at> - If the user asked for N cases, present exactly N entries (or fewer if fewer exist). Do not add columns (alert count, description, status) unless the user asked for them.
- Omit fields that are null or missing. Do not add analysis or commentary after the list.
- 说明 JSON 响应中确切的 计数(例如,“共有 12 个打开的案件”)。
total - 将每个案件显示为紧凑的单行条目:。逐字复制确切标题——不要改写、缩写或概括。
<title> | <severity> | <case_id_short> | <created_at> - 如果用户要求 N 个案件,则恰好显示 N 个条目(如果现有案件不足,则显示实际数量)。除非用户明确要求,不要添加告警数量、描述、状态等列。
- 省略值为 null 或缺失的字段。不要在列表后添加分析或评论。
Comments and attachments
评论和附件
Cases read operations return metadata only — comments and attachments are never included. To analyze discussion or list
attached alerts, call and filter to for comments. Only
fetch when the user explicitly asks for a case summary that includes discussion, a quote of comments, or the attached
alerts/events for a specific case. Never preemptively fetch for cases in a list.
GET kbn:/api/cases/{caseId}/comments/_findtype === "user"对案件的读取操作仅返回元数据——绝不会包含评论和附件。要分析讨论内容或列出附加的告警,请调用 ,并筛选 以获取评论。只有当用户明确要求某个特定案件的摘要包含讨论内容、评论引用或附加的告警/事件时,才执行此操作。对于案件列表,绝不要主动获取这些数据。
GET kbn:/api/cases/{caseId}/comments/_findtype === "user"Examples
示例
Create a case after triage (Security)
分诊后创建案件(Security)
User: "In Security, create a case for the phishing alert I triaged with severity high."
- Owner is (named). Search first with
securitySolution(orGET kbn:/api/cases/_find) to avoid a duplicate.GET kbn:/api/cases/alerts/{alertId} - with
POST kbn:/api/cases, theowner: "securitySolution"connector, andnone.severity: "high" - Attach the alert with (
POST kbn:/api/cases/{caseId}/comments,type: "alert"/rule.idset).rule.name - Report the returned case verbatim.
id
用户:“在 Security 中,为我刚完成分诊的钓鱼告警创建一个严重性为 high 的案件。”
- 为
owner(已明确指定)。先搜索securitySolution(或GET kbn:/api/cases/_find),避免重复。GET kbn:/api/cases/alerts/{alertId} - 调用 ,传入
POST kbn:/api/cases、owner: "securitySolution"connector 和none。severity: "high" - 通过 附加告警(
POST kbn:/api/cases/{caseId}/comments,并设置type: "alert"/rule.id)。rule.name - 逐字报告返回的案件 。
id
Find open cases (read-only)
查找打开的案件(只读)
User: "Show me open Observability cases about the checkout service."
- Owner is (named).
observabilitywithGET kbn:/api/cases/_find,search=checkout,status=open,owner=observability,sortField=createdAt.sortOrder=desc - Report the exact and each title verbatim. Do not mutate anything.
total
用户:“显示与 checkout service 相关的 Observability 打开案件。”
- 为
owner(已明确指定)。调用observability,传入GET kbn:/api/cases/_find、search=checkout、status=open、owner=observability、sortField=createdAt。sortOrder=desc - 逐字报告确切的 和每个标题。不要修改任何数据。
total
Close several cases at once
一次关闭多个案件
User: "Close cases abc-123, def-456, and ghi-789."
- each case for its current
GET.version - One with all three entries (
PATCH kbn:/api/cases) — not three separate calls.status: "closed"
用户:“关闭案件 abc-123、def-456 和 ghi-789。”
- 对每个案件执行 ,获取当前
GET。version - 使用包含全部三个条目的单次 (
PATCH kbn:/api/cases)——不要执行三次单独调用。status: "closed"
Ambiguous — ask first
存在歧义——先询问
User: "Find the case about the failing payment service."
- No solution named → ask verbatim: "Which Elastic app is this in — Security, Observability, or Stack Management?"
用户:“查找有关 payment service 故障的案件。”
- 未指定解决方案 → 逐字询问:“这是哪个 Elastic 应用——Security、Observability 还是 Stack Management?”
Guidelines
准则
- Report only tool output — do not invent ids, hostnames, IPs, or details not present in the response.
- Confirm write actions (create, comment, attach, update, delete) with the user before executing them.
- The solution is fixed once established — never query or write across multiple owners in one request.
owner - with
_findmay return 500 errors on Serverless; prefersearchfiltering or a plain list there.tags - filtering is exact-match only — partial matches do not work.
tags - Attach alerts one at a time via the public comments endpoint; the bulk attachment endpoint is internal (see Operations).
- For non-default Kibana Spaces, prefix paths with .
kbn:/s/<space_id>/api/cases/...
- 仅报告工具输出——不要编造响应中不存在的 ID、主机名、IP 或其他详情。
- 执行写操作(创建、评论、附加、更新、删除)前,向用户确认。
- 一旦确定便保持固定——绝不能通过一次请求查询或写入多个
owner。owner - 在 Serverless 上,带有 的
search可能返回 500 错误;应优先使用_find过滤或不带搜索条件的普通列表。tags - 过滤仅支持精确匹配——不支持部分匹配。
tags - 通过公共 comments 端点逐个附加告警;批量附加端点属于内部端点(请参阅操作)。
- 对于非默认 Kibana Spaces,请在路径前添加 。
kbn:/s/<space_id>/api/cases/...
Common pitfalls
常见陷阱
- Missing solution context — creating or searching without a confirmed .
owner - Fanning out across owners — passing multiple values to "cover all three".
owner - Sequential updates — issuing N calls instead of one bulk
PATCHfor a multi-case change.PATCH - Stale version — without a fresh
PATCHreturns a version conflict.GET - Read-only violations — mutating cases when the user only asked to list or search.
- Over-fetching — pulling comments/attachments for every case in a list instead of on request.
- 缺少解决方案上下文——未确认 就创建或搜索。
owner - 跨多个 扩散操作——传入多个
owner值来“覆盖全部三个”。owner - 连续更新——执行 N 次 调用,而不是对多案件变更执行一次批量
PATCH。PATCH - 版本过期——未先执行新鲜的 就发出
GET,导致版本冲突。PATCH - 违反只读要求——用户仅要求列出或搜索时却修改案件。
- 过度获取——为列表中的每个案件获取评论或附件,而不是按需获取。
References
参考资料
- references/kibana-cases-api.md — Endpoints, request/response shapes, query params
- Kibana Cases API
- references/kibana-cases-api.md——端点、请求/响应结构和查询参数
- Kibana Cases API
Operations
操作
| HTTP API (shorthand) | |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| (no CLI binding — use HTTP shorthand) |
| (no CLI binding — use HTTP shorthand) |
| (no CLI binding — use HTTP shorthand) |
¹ exposes no filter flags in the current CLI release; for , , , , and
pagination, run with query params via the HTTP transport directly.
find-casesownerstatustagssearchGET kbn:/api/cases/_find² exposes no flag in the current CLI release; to target specific cases, run
via the HTTP transport directly.
delete-case--idsDELETE kbn:/api/cases?ids=<json-array>Internal-only endpoints (no public binding). Bulk get (), find-similar
(), and bulk attachment
() are internal — use the public per-item operations above
instead. Assignee changes and have no dedicated endpoints: set through
, and apply templates by merging output into the create payload.
POST /internal/cases/_bulk_getPOST /internal/cases/{caseId}/_similarPOST /internal/cases/{caseId}/attachments/_bulk_createcreate_from_templateassigneesPATCH /api/casesGET /api/cases/configure| HTTP API(简写形式) | |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| (无 CLI 绑定——使用 HTTP 简写形式) |
| (无 CLI 绑定——使用 HTTP 简写形式) |
| (无 CLI 绑定——使用 HTTP 简写形式) |
¹ 当前 CLI 版本中的 未提供过滤标志;如需按 、、、 过滤或进行分页,请通过 HTTP 传输直接运行带查询参数的 。
find-casesownerstatustagssearchGET kbn:/api/cases/_find² 当前 CLI 版本中的 未提供 标志;如需指定具体案件,请通过 HTTP 传输直接运行 。
delete-case--idsDELETE kbn:/api/cases?ids=<json-array>仅限内部使用的端点(无公共绑定)。 批量获取()、查找相似案件()和批量附加()属于内部端点——请改用上述逐项公共操作。受理人变更和 没有专用端点:通过 设置 ,并将 的输出合并到创建 payload 中以应用模板。
POST /internal/cases/_bulk_getPOST /internal/cases/{caseId}/_similarPOST /internal/cases/{caseId}/attachments/_bulk_createcreate_from_templatePATCH /api/casesassigneesGET /api/cases/configure