Skip to content

Commit bcc563f

Browse files
committed
Add post analytics collection event example
1 parent dbcbe5a commit bcc563f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,16 @@ actions:
392392
examples:
393393
indicesLegacyPutTemplateRequestExample1:
394394
$ref: "../../specification/indices/put_template/indicesPutTemplateRequestExample1.yaml"
395+
## Examples for behavioral analytics
396+
- target: "$.paths['/_application/analytics/{collection_name}/event/{event_type}']['post']"
397+
description: "Add examples for post analytics collection event operation"
398+
update:
399+
requestBody:
400+
content:
401+
application/json:
402+
examples:
403+
postBehavioralAnalyticsEventRequestExample1:
404+
$ref: "../../specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequestExample1.yaml"
395405
## Examples for licensing
396406
- target: "$.paths['/_license/basic_status']['get']"
397407
description: "Add example for get basic status response"
@@ -461,4 +471,3 @@ actions:
461471
$ref: "../../specification/search_application/render_query/SearchApplicationsRenderQueryRequestExample1.yaml"
462472
renderSearchApplicationQueryResponseExample1:
463473
$ref: "../../specification/search_application/render_query/SearchApplicationsRenderQueryResponseExample1.yaml"
464-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# summary: behavioral-analytics/apis/post-analytics-collection-event.asciidoc:69
2+
# method_request: POST _application/analytics/my_analytics_collection/event/search_click
3+
description: Run `POST _application/analytics/my_analytics_collection/event/search_click` to send a `search_click` event to an analytics collection called `my_analytics_collection`.
4+
# type: request
5+
value:
6+
"{\n \"session\": {\n \"id\": \"1797ca95-91c9-4e2e-b1bd-9c38e6f386a9\"\n\
7+
\ },\n \"user\": {\n \"id\": \"5f26f01a-bbee-4202-9298-81261067abbd\"\n },\n\
8+
\ \"search\":{\n \"query\": \"search term\",\n \"results\": {\n \"items\"\
9+
: [\n {\n \"document\": {\n \"id\": \"123\",\n \
10+
\ \"index\": \"products\"\n }\n }\n ],\n \"total_results\"\
11+
: 10\n },\n \"sort\": {\n \"name\": \"relevance\"\n },\n \"search_application\"\
12+
: \"website\"\n },\n \"document\":{\n \"id\": \"123\",\n \"index\": \"products\"\
13+
\n }\n}"

0 commit comments

Comments
 (0)