获取案例 API
编辑获取案例 API编辑
返回有关案例的信息。
有关最新的 API 详细信息,请参阅开放 API 规范。
先决条件编辑
您必须拥有 Kibana 功能权限中“管理”、“可观察性”或“安全”部分中**案例**功能的读取
权限,具体取决于您要查找的案例的所有者
。
查询参数编辑
-
includeComments
- (可选,布尔值)确定是否返回案例评论。默认为
true
。 [8.1.0] 已在 8.1.0 中弃用。includeComments
查询参数已弃用,并将在未来的版本中删除。
响应代码编辑
-
200
- 表示调用成功。
示例编辑
返回案例 ID 31cdada0-02c1-11ed-85f2-4f7c222ca2fa
GET api/cases/31cdada0-02c1-11ed-85f2-4f7c222ca2fa
API 返回一个包含检索到的案例的 JSON 对象。例如
{ "id":"31cdada0-02c1-11ed-85f2-4f7c222ca2fa", "version":"WzM2LDFd", "comments":[{ "id":"2134c1d0-02c2-11ed-85f2-4f7c222ca2fa", "version":"WzM3LDFd", "type":"user", "owner":"cases", "comment":"A new comment", "created_at":"2022-07-13T15:40:32.335Z", "created_by":{"email":null,"full_name":null,"username":"elastic"}, "pushed_at":null, "pushed_by":null, "updated_at":null, "updated_by":null }], "totalComment":1, "totalAlerts":0, "title":"Case title 1", "tags":["tag 1"], "settings":{"syncAlerts":true}, "owner":"cases", "description":"A case description", "duration":null, "severity":"low", "closed_at":null, "closed_by":null, "created_at":"2022-07-13T15:33:50.604Z", "created_by":{"username":"elastic","email":null,"full_name":null}, "status":"open", "updated_at":"2022-07-13T15:40:32.335Z", "updated_by":{"full_name":null,"email":null,"username":"elastic"}, "assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}], "connector":{"id":"none","name":"none","type":".none","fields":null}, "external_service":null }