eql-search-api.asciidoc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[eql-search-api]]
  4. === EQL search API
  5. ++++
  6. <titleabbrev>EQL search</titleabbrev>
  7. ++++
  8. Returns search results for an <<eql,Event Query Language (EQL)>> query.
  9. EQL assumes each document in a data stream or index corresponds to an
  10. event.
  11. ////
  12. [source,console]
  13. ----
  14. DELETE /_data_stream/*
  15. DELETE /_index_template/*
  16. ----
  17. // TEARDOWN
  18. ////
  19. [source,console]
  20. ----
  21. GET /my-data-stream/_eql/search
  22. {
  23. "query": """
  24. process where process.name == "regsvr32.exe"
  25. """
  26. }
  27. ----
  28. // TEST[setup:sec_logs]
  29. [[eql-search-api-request]]
  30. ==== {api-request-title}
  31. `GET /<target>/_eql/search`
  32. `POST /<target>/_eql/search`
  33. [[eql-search-api-prereqs]]
  34. ==== {api-prereq-title}
  35. * If the {es} {security-features} are enabled, you must have the `read`
  36. <<privileges-list-indices,index privilege>> for the target data stream, index,
  37. or alias.
  38. * See <<eql-required-fields>>.
  39. * experimental:[] For cross-cluster search, the local and remote clusters must
  40. use the same {es} version. For security, see <<remote-clusters-security>>.
  41. [[eql-search-api-limitations]]
  42. ===== Limitations
  43. See <<eql-syntax-limitations,EQL limitations>>.
  44. [[eql-search-api-path-params]]
  45. ==== {api-path-parms-title}
  46. `<target>`::
  47. (Required, string) Comma-separated list of data streams, indices, or aliases
  48. used to limit the request. Supports wildcards (`*`). To search all data streams
  49. and indices, use `*` or `_all`.
  50. +
  51. experimental:[] To search a remote cluster, use the `<cluster>:<target>` syntax.
  52. See <<run-eql-search-across-clusters>>.
  53. [[eql-search-api-query-params]]
  54. ==== {api-query-parms-title}
  55. `allow_no_indices`::
  56. (Optional, Boolean)
  57. +
  58. NOTE: This parameter's behavior differs from the `allow_no_indices` parameter
  59. used in other <<multi-index,multi-target APIs>>.
  60. +
  61. If `false`, the request returns an error if any wildcard pattern, alias, or
  62. `_all` value targets only missing or closed indices. This behavior applies even
  63. if the request targets other open indices. For example, a request targeting
  64. `foo*,bar*` returns an error if an index starts with `foo` but no index starts
  65. with `bar`.
  66. +
  67. If `true`, only requests that exclusively target missing or closed indices
  68. return an error. For example, a request targeting `foo*,bar*` does not return an
  69. error if an index starts with `foo` but no index starts with `bar`. However, a
  70. request that targets only `bar*` still returns an error.
  71. +
  72. Defaults to `true`.
  73. `ccs_minimize_roundtrips`::
  74. (Optional, Boolean) If `true`, network round-trips between the local and the
  75. remote cluster are minimized when running cross-cluster search (CCS) requests.
  76. +
  77. This option is effective for requests that target data fully contained in one
  78. remote cluster; when data is spread across multiple clusters, the setting is
  79. ignored.
  80. +
  81. Defaults to `true`.
  82. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  83. +
  84. Defaults to `open`.
  85. `filter_path`::
  86. (Optional, string)
  87. Comma-separated list of filters for the API response. See
  88. <<common-options-response-filtering>>.
  89. `ignore_unavailable`::
  90. (Optional, Boolean) If `true`, missing or closed indices are not included in the
  91. response. Defaults to `true`.
  92. `keep_alive`::
  93. +
  94. --
  95. (Optional, <<time-units,time value>>)
  96. Period for which the search and its results are stored on the cluster. Defaults
  97. to `5d` (five days).
  98. When this period expires, the search and its results are deleted, even if the
  99. search is still ongoing.
  100. If the <<eql-search-api-keep-on-completion,`keep_on_completion`>> parameter is
  101. `false`, {es} only stores <<eql-search-async,async searches>> that do not
  102. complete within the period set by the
  103. <<eql-search-api-wait-for-completion-timeout,`wait_for_completion_timeout`>>
  104. parameter, regardless of this value.
  105. [IMPORTANT]
  106. ====
  107. You can also specify this value using the `keep_alive` request body parameter.
  108. If both parameters are specified, only the query parameter is used.
  109. ====
  110. --
  111. `keep_on_completion`::
  112. +
  113. --
  114. (Optional, Boolean)
  115. If `true`, the search and its results are stored on the cluster.
  116. If `false`, the search and its results are stored on the cluster only if the
  117. request does not complete during the period set by the
  118. <<eql-search-api-wait-for-completion-timeout,`wait_for_completion_timeout`>>
  119. parameter. Defaults to `false`.
  120. [IMPORTANT]
  121. ====
  122. You can also specify this value using the `keep_on_completion` request body
  123. parameter. If both parameters are specified, only the query parameter is used.
  124. ====
  125. --
  126. `wait_for_completion_timeout`::
  127. +
  128. --
  129. (Optional, <<time-units,time value>>)
  130. Timeout duration to wait for the request to finish. Defaults to no
  131. timeout, meaning the request waits for complete search results.
  132. If this parameter is specified and the request completes during this period,
  133. complete search results are returned.
  134. If the request does not complete during this period, the search becomes an
  135. <<eql-search-async,async search>>.
  136. [IMPORTANT]
  137. ====
  138. You can also specify this value using the `wait_for_completion_timeout` request
  139. body parameter. If both parameters are specified, only the query parameter is
  140. used.
  141. ====
  142. --
  143. [role="child_attributes"]
  144. [[eql-search-api-request-body]]
  145. ==== {api-request-body-title}
  146. `event_category_field`::
  147. (Required*, string)
  148. Field containing the event classification, such as `process`, `file`, or
  149. `network`.
  150. +
  151. Defaults to `event.category`, as defined in the {ecs-ref}/ecs-event.html[Elastic
  152. Common Schema (ECS)]. If a data stream or index does not contain the
  153. `event.category` field, this value is required.
  154. +
  155. The event category field must be mapped as a field type in the
  156. <<keyword,`keyword`>> family.
  157. `fetch_size`::
  158. (Optional, integer)
  159. Maximum number of events to search at a time for sequence queries. Defaults to
  160. `1000`.
  161. +
  162. This value must be greater than `2` but cannot exceed the value of the
  163. <<index-max-result-window,`index.max_result_window`>> setting, which defaults to
  164. `10000`.
  165. +
  166. Internally, a sequence query fetches and paginates sets of events to search for
  167. matches. This parameter controls the size of those sets. This parameter does not
  168. limit the total number of events searched or the number of matching events
  169. returned.
  170. +
  171. A greater `fetch_size` value often increases search speed but uses more memory.
  172. `fields`::
  173. (Optional, array of strings and objects)
  174. Array of wildcard (`*`) patterns. The response returns values for field names
  175. matching these patterns in the `fields` property of each hit.
  176. +
  177. You can specify items in the array as a string or object.
  178. +
  179. .Properties of `fields` objects
  180. [%collapsible%open]
  181. ====
  182. include::{es-repo-dir}/search/search.asciidoc[tag=fields-api-props]
  183. ====
  184. `filter`::
  185. (Optional, <<query-dsl,Query DSL object>>)
  186. Query, written in Query DSL, used to filter the events on which the EQL query
  187. runs.
  188. `keep_alive`::
  189. +
  190. --
  191. (Optional, <<time-units,time value>>)
  192. Period for which the search and its results are stored on the cluster. Defaults
  193. to `5d` (five days).
  194. When this period expires, the search and its results are deleted, even if the
  195. search is still ongoing.
  196. If the <<eql-search-api-keep-on-completion,`keep_on_completion`>> parameter is
  197. `false`, {es} only stores <<eql-search-async,async searches>> that do not
  198. complete within the period set by the
  199. <<eql-search-api-wait-for-completion-timeout,`wait_for_completion_timeout`>>
  200. parameter, regardless of this value.
  201. [IMPORTANT]
  202. ====
  203. You can also specify this value using the `keep_alive` query parameter.
  204. If both parameters are specified, only the query parameter is used.
  205. ====
  206. --
  207. [[eql-search-api-keep-on-completion]]
  208. `keep_on_completion`::
  209. +
  210. --
  211. (Optional, Boolean)
  212. If `true`, the search and its results are stored on the cluster.
  213. If `false`, the search and its results are stored on the cluster only if the
  214. request does not complete during the period set by the
  215. <<eql-search-api-wait-for-completion-timeout,`wait_for_completion_timeout`>>
  216. parameter. Defaults to `false`.
  217. [IMPORTANT]
  218. ====
  219. You can also specify this value using the `keep_on_completion` query parameter.
  220. If both parameters are specified, only the query parameter is used.
  221. ====
  222. --
  223. [[eql-search-api-request-query-param]]
  224. `query`::
  225. (Required, string)
  226. <<eql-syntax,EQL>> query you wish to run.
  227. `result_position`::
  228. (Optional, enum)
  229. Set of matching events or sequences to return.
  230. +
  231. .Valid values for `result_position`
  232. [%collapsible%open]
  233. ====
  234. `tail`::
  235. (Default)
  236. Return the most recent matches, similar to the {wikipedia}/Tail_(Unix)[Unix tail
  237. command].
  238. `head`::
  239. Return the earliest matches, similar to the {wikipedia}/Head_(Unix)[Unix head
  240. command].
  241. ====
  242. +
  243. NOTE: This parameter may change the set of returned hits. However, it does not
  244. change the sort order of hits in the response.
  245. include::{es-repo-dir}/search/search.asciidoc[tag=runtime-mappings-def]
  246. [[eql-search-api-params-size]]
  247. `size`::
  248. (Optional, integer or float)
  249. For <<eql-basic-syntax,basic queries>>, the maximum number of matching events to
  250. return.
  251. +
  252. For <<eql-sequences,sequence queries>>, the maximum number of matching sequences
  253. to return.
  254. +
  255. Defaults to `10`. This value must be greater than `0`.
  256. +
  257. NOTE: You cannot use <<eql-pipe-ref,pipes>>, such as `head` or `tail`, to exceed
  258. this value.
  259. [[eql-search-api-tiebreaker-field]]
  260. `tiebreaker_field`::
  261. (Optional, string)
  262. Field used to sort hits with the same
  263. <<eql-search-api-timestamp-field,timestamp>> in ascending order. See
  264. <<eql-search-specify-a-sort-tiebreaker>>.
  265. [[eql-search-api-timestamp-field]]
  266. `timestamp_field`::
  267. +
  268. --
  269. (Required*, string)
  270. Field containing event timestamp.
  271. Defaults to `@timestamp`, as defined in the
  272. {ecs-ref}/ecs-event.html[Elastic Common Schema (ECS)]. If a data stream or index
  273. does not contain the `@timestamp` field, this value is required.
  274. Events in the API response are sorted by this field's value, converted to
  275. milliseconds since the {wikipedia}/Unix_time[Unix epoch], in
  276. ascending order.
  277. The timestamp field should be mapped as a <<date,`date`>>. The
  278. <<date_nanos,`date_nanos`>> field type is not supported.
  279. --
  280. [[eql-search-api-wait-for-completion-timeout]]
  281. `wait_for_completion_timeout`::
  282. +
  283. --
  284. (Optional, <<time-units,time value>>)
  285. Timeout duration to wait for the request to finish. Defaults to no
  286. timeout, meaning the request waits for complete search results.
  287. If this parameter is specified and the request completes during this period,
  288. complete search results are returned.
  289. If the request does not complete during this period, the search becomes an
  290. <<eql-search-async,async search>>.
  291. [IMPORTANT]
  292. ====
  293. You can also specify this value using the `wait_for_completion_timeout` query
  294. parameter. If both parameters are specified, only the query parameter is used.
  295. ====
  296. --
  297. [role="child_attributes"]
  298. [[eql-search-api-response-body]]
  299. ==== {api-response-body-title}
  300. [[eql-search-api-response-body-search-id]]
  301. `id`::
  302. +
  303. --
  304. (string)
  305. Identifier for the search.
  306. This search ID is only provided if one of the following conditions is met:
  307. * A search request does not return complete results during the
  308. <<eql-search-api-wait-for-completion-timeout,`wait_for_completion_timeout`>>
  309. parameter's timeout period, becoming an <<eql-search-async,async search>>.
  310. * The search request's <<eql-search-api-keep-on-completion,`keep_on_completion`>>
  311. parameter is `true`.
  312. You can use this ID with the <<get-async-eql-search-api,get async EQL search
  313. API>> to get the current status and available results for the search or
  314. <<get-async-eql-status-api,get async EQL status API>> to get only
  315. the current status.
  316. --
  317. `is_partial`::
  318. (Boolean)
  319. If `true`, the response does not contain complete search results.
  320. `is_running`::
  321. +
  322. --
  323. (Boolean)
  324. If `true`, the search request is still executing.
  325. [IMPORTANT]
  326. ====
  327. If this parameter and the `is_partial` parameter are `true`, the search is an
  328. <<eql-search-async,ongoing async search>>. If the `keep_alive` period does not
  329. pass, the complete search results will be available when the search completes.
  330. If `is_partial` is `true` but `is_running` is `false`, the search returned
  331. partial results due to a failure. Only some shards returned results or the node
  332. coordinating the search failed.
  333. ====
  334. --
  335. `took`::
  336. +
  337. --
  338. (integer)
  339. Milliseconds it took {es} to execute the request.
  340. This value is calculated by measuring the time elapsed
  341. between receipt of a request on the coordinating node
  342. and the time at which the coordinating node is ready to send the response.
  343. Took time includes:
  344. * Communication time between the coordinating node and data nodes
  345. * Time the request spends in the `search` <<modules-threadpool,thread pool>>,
  346. queued for execution
  347. * Actual execution time
  348. Took time does *not* include:
  349. * Time needed to send the request to {es}
  350. * Time needed to serialize the JSON response
  351. * Time needed to send the response to a client
  352. --
  353. `timed_out`::
  354. (Boolean)
  355. If `true`, the request timed out before completion.
  356. `hits`::
  357. (object)
  358. Contains matching events and sequences. Also contains related metadata.
  359. +
  360. .Properties of `hits`
  361. [%collapsible%open]
  362. ====
  363. `total`::
  364. (object)
  365. Metadata about the number of matching events or sequences.
  366. +
  367. .Properties of `total`
  368. [%collapsible%open]
  369. =====
  370. `value`::
  371. (integer)
  372. For <<eql-basic-syntax,basic queries>>, the total number of matching events.
  373. +
  374. For <<eql-sequences,sequence queries>>, the total number of matching sequences.
  375. `relation`::
  376. +
  377. --
  378. (string)
  379. Indicates whether the number of events or sequences returned is accurate or a
  380. lower bound.
  381. Returned values are:
  382. `eq`::: Accurate
  383. `gte`::: Lower bound, including returned events or sequences
  384. --
  385. =====
  386. `sequences`::
  387. (array of objects)
  388. Contains event sequences matching the query. Each object represents a
  389. matching sequence. This parameter is only returned for EQL queries containing
  390. a <<eql-sequences,sequence>>.
  391. +
  392. .Properties of `sequences` objects
  393. [%collapsible%open]
  394. =====
  395. `join_keys`::
  396. (array of values)
  397. Shared field values used to constrain matches in the sequence. These are defined
  398. using the <<eql-sequences,`by` keyword>> in the EQL query syntax.
  399. `events`::
  400. (array of objects)
  401. Contains events matching the query. Each object represents a
  402. matching event.
  403. +
  404. .Properties of `events` objects
  405. [%collapsible%open]
  406. ======
  407. `_index`::
  408. (string)
  409. Name of the index containing the event.
  410. `_id`::
  411. (string)
  412. Unique identifier for the event.
  413. This ID is only unique within the index.
  414. `_source`::
  415. (object)
  416. Original JSON body passed for the event at index time.
  417. ======
  418. =====
  419. [[eql-search-api-response-events]]
  420. `events`::
  421. (array of objects)
  422. Contains events matching the query. Each object represents a
  423. matching event.
  424. +
  425. .Properties of `events` objects
  426. [%collapsible%open]
  427. =====
  428. `_index`::
  429. (string)
  430. Name of the index containing the event.
  431. `_id`::
  432. (string)
  433. (string)
  434. Unique identifier for the event.
  435. This ID is only unique within the index.
  436. `_source`::
  437. (object)
  438. Original JSON body passed for the event at index time.
  439. =====
  440. ====
  441. [[eql-search-api-example]]
  442. ==== {api-examples-title}
  443. [[eql-search-api-basic-query-ex]]
  444. ===== Basic query example
  445. The following EQL search request searches for events with an `event.category` of
  446. `process` that meet the following conditions:
  447. * A `process.name` of `cmd.exe`
  448. * An `process.pid` other than `2013`
  449. [source,console]
  450. ----
  451. GET /my-data-stream/_eql/search
  452. {
  453. "query": """
  454. process where (process.name == "cmd.exe" and process.pid != 2013)
  455. """
  456. }
  457. ----
  458. // TEST[setup:sec_logs]
  459. The API returns the following response. Matching events in the `hits.events`
  460. property are sorted by <<eql-search-api-timestamp-field,timestamp>>, converted
  461. to milliseconds since the {wikipedia}/Unix_time[Unix epoch],
  462. in ascending order.
  463. If two or more events share the same timestamp, the
  464. <<eql-search-api-tiebreaker-field,`tiebreaker_field`>> field is used to sort
  465. the events in ascending order.
  466. [source,console-result]
  467. ----
  468. {
  469. "is_partial": false,
  470. "is_running": false,
  471. "took": 6,
  472. "timed_out": false,
  473. "hits": {
  474. "total": {
  475. "value": 2,
  476. "relation": "eq"
  477. },
  478. "events": [
  479. {
  480. "_index": ".ds-my-data-stream-2099.12.07-000001",
  481. "_id": "babI3XMBI9IjHuIqU0S_",
  482. "_source": {
  483. "@timestamp": "2099-12-06T11:04:05.000Z",
  484. "event": {
  485. "category": "process",
  486. "id": "edwCRnyD",
  487. "sequence": 1
  488. },
  489. "process": {
  490. "pid": 2012,
  491. "name": "cmd.exe",
  492. "executable": "C:\\Windows\\System32\\cmd.exe"
  493. }
  494. }
  495. },
  496. {
  497. "_index": ".ds-my-data-stream-2099.12.07-000001",
  498. "_id": "b6bI3XMBI9IjHuIqU0S_",
  499. "_source": {
  500. "@timestamp": "2099-12-07T11:06:07.000Z",
  501. "event": {
  502. "category": "process",
  503. "id": "cMyt5SZ2",
  504. "sequence": 3
  505. },
  506. "process": {
  507. "pid": 2012,
  508. "name": "cmd.exe",
  509. "executable": "C:\\Windows\\System32\\cmd.exe"
  510. }
  511. }
  512. }
  513. ]
  514. }
  515. }
  516. ----
  517. // TESTRESPONSE[s/"took": 6/"took": $body.took/]
  518. // TESTRESPONSE[s/"_index": ".ds-my-data-stream-2099.12.07-000001"/"_index": $body.hits.events.0._index/]
  519. // TESTRESPONSE[s/"_id": "babI3XMBI9IjHuIqU0S_"/"_id": $body.hits.events.0._id/]
  520. // TESTRESPONSE[s/"_id": "b6bI3XMBI9IjHuIqU0S_"/"_id": $body.hits.events.1._id/]
  521. [[eql-search-api-sequence-ex]]
  522. ===== Sequence query example
  523. The following EQL search request matches a <<eql-sequences,sequence>> of events
  524. that:
  525. . Start with an event with:
  526. +
  527. --
  528. * An `event.category` of `file`
  529. * A `file.name` of `cmd.exe`
  530. * An `process.pid` other than `2013`
  531. --
  532. . Followed by an event with:
  533. +
  534. --
  535. * An `event.category` of `process`
  536. * A `process.executable` that contains the substring `regsvr32`
  537. --
  538. These events must also share the same `process.pid` value.
  539. [source,console]
  540. ----
  541. GET /my-data-stream/_eql/search
  542. {
  543. "query": """
  544. sequence by process.pid
  545. [ file where file.name == "cmd.exe" and process.pid != 2013 ]
  546. [ process where stringContains(process.executable, "regsvr32") ]
  547. """
  548. }
  549. ----
  550. // TEST[setup:sec_logs]
  551. The API returns the following response. Matching sequences are included in the
  552. `hits.sequences` property. The `hits.sequences.join_keys` property contains the
  553. shared `process.pid` value for each matching event.
  554. [source,console-result]
  555. ----
  556. {
  557. "is_partial": false,
  558. "is_running": false,
  559. "took": 6,
  560. "timed_out": false,
  561. "hits": {
  562. "total": {
  563. "value": 1,
  564. "relation": "eq"
  565. },
  566. "sequences": [
  567. {
  568. "join_keys": [
  569. 2012
  570. ],
  571. "events": [
  572. {
  573. "_index": ".ds-my-data-stream-2099.12.07-000001",
  574. "_id": "AtOJ4UjUBAAx3XR5kcCM",
  575. "_source": {
  576. "@timestamp": "2099-12-06T11:04:07.000Z",
  577. "event": {
  578. "category": "file",
  579. "id": "dGCHwoeS",
  580. "sequence": 2
  581. },
  582. "file": {
  583. "accessed": "2099-12-07T11:07:08.000Z",
  584. "name": "cmd.exe",
  585. "path": "C:\\Windows\\System32\\cmd.exe",
  586. "type": "file",
  587. "size": 16384
  588. },
  589. "process": {
  590. "pid": 2012,
  591. "name": "cmd.exe",
  592. "executable": "C:\\Windows\\System32\\cmd.exe"
  593. }
  594. }
  595. },
  596. {
  597. "_index": ".ds-my-data-stream-2099.12.07-000001",
  598. "_id": "OQmfCaduce8zoHT93o4H",
  599. "_source": {
  600. "@timestamp": "2099-12-07T11:07:09.000Z",
  601. "event": {
  602. "category": "process",
  603. "id": "aR3NWVOs",
  604. "sequence": 4
  605. },
  606. "process": {
  607. "pid": 2012,
  608. "name": "regsvr32.exe",
  609. "command_line": "regsvr32.exe /s /u /i:https://...RegSvr32.sct scrobj.dll",
  610. "executable": "C:\\Windows\\System32\\regsvr32.exe"
  611. }
  612. }
  613. }
  614. ]
  615. }
  616. ]
  617. }
  618. }
  619. ----
  620. // TESTRESPONSE[s/"took": 6/"took": $body.took/]
  621. // TESTRESPONSE[s/"_index": ".ds-my-data-stream-2099.12.07-000001"/"_index": $body.hits.sequences.0.events.0._index/]
  622. // TESTRESPONSE[s/"_id": "AtOJ4UjUBAAx3XR5kcCM"/"_id": $body.hits.sequences.0.events.0._id/]
  623. // TESTRESPONSE[s/"_id": "OQmfCaduce8zoHT93o4H"/"_id": $body.hits.sequences.0.events.1._id/]