From 3437e8783dba6d06218a957e88a64d50b288a2f2 Mon Sep 17 00:00:00 2001 From: lcawl Date: Mon, 30 Dec 2024 15:25:54 -0800 Subject: [PATCH 1/8] [DOCS] Edit search application summaries --- .../delete/SearchApplicationsDeleteRequest.ts | 2 ++ .../search_application/get/SearchApplicationsGetRequest.ts | 1 + .../search_application/list/SearchApplicationsListRequest.ts | 4 +++- .../search_application/put/SearchApplicationsPutRequest.ts | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/specification/search_application/delete/SearchApplicationsDeleteRequest.ts b/specification/search_application/delete/SearchApplicationsDeleteRequest.ts index c0ec929057..ecd7ee74a3 100644 --- a/specification/search_application/delete/SearchApplicationsDeleteRequest.ts +++ b/specification/search_application/delete/SearchApplicationsDeleteRequest.ts @@ -25,6 +25,8 @@ import { Name } from '@_types/common' * @rest_spec_name search_application.delete * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public + * @cluster_privileges manage_search_application + * @index_privileges manage */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/search_application/get/SearchApplicationsGetRequest.ts b/specification/search_application/get/SearchApplicationsGetRequest.ts index f9a7ed3378..272d7b2371 100644 --- a/specification/search_application/get/SearchApplicationsGetRequest.ts +++ b/specification/search_application/get/SearchApplicationsGetRequest.ts @@ -24,6 +24,7 @@ import { Name } from '@_types/common' * @rest_spec_name search_application.get * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public + * @cluster_privileges manage_search_application */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/search_application/list/SearchApplicationsListRequest.ts b/specification/search_application/list/SearchApplicationsListRequest.ts index c7ace9689c..62d2d234df 100644 --- a/specification/search_application/list/SearchApplicationsListRequest.ts +++ b/specification/search_application/list/SearchApplicationsListRequest.ts @@ -20,10 +20,12 @@ import { RequestBase } from '@_types/Base' import { integer } from '@_types/Numeric' /** - * Returns the existing search applications. + * Get search applications. + * Get information about search applications. * @rest_spec_name search_application.list * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public + * @cluster_privileges manage_search_application */ export interface Request extends RequestBase { query_parameters: { diff --git a/specification/search_application/put/SearchApplicationsPutRequest.ts b/specification/search_application/put/SearchApplicationsPutRequest.ts index b5d66e6f50..7a85cd65bd 100644 --- a/specification/search_application/put/SearchApplicationsPutRequest.ts +++ b/specification/search_application/put/SearchApplicationsPutRequest.ts @@ -25,6 +25,8 @@ import { SearchApplicationParameters } from '../_types/SearchApplicationParamete * @rest_spec_name search_application.put * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public + * @cluster_privileges manage_search_application + * @index_privileges manage */ export interface Request extends RequestBase { path_parts: { From 552c1d4421ef22ff2e7a9a0caeb7f443ee95f520 Mon Sep 17 00:00:00 2001 From: lcawl Date: Mon, 30 Dec 2024 19:17:36 -0800 Subject: [PATCH 2/8] Add manage_search_application cluster privilege --- compiler/src/model/utils.ts | 2 +- output/openapi/elasticsearch-openapi.json | 3 +- .../elasticsearch-serverless-openapi.json | 3 +- output/schema/schema.json | 38 ++++++++++++++++--- 4 files changed, 37 insertions(+), 9 deletions(-) diff --git a/compiler/src/model/utils.ts b/compiler/src/model/utils.ts index 9f4d3e669e..a3e1e32cba 100644 --- a/compiler/src/model/utils.ts +++ b/compiler/src/model/utils.ts @@ -668,7 +668,7 @@ export function hoistRequestAnnotations ( const privileges = [ 'all', 'cancel_task', 'create_snapshot', 'grant_api_key', 'manage', 'manage_api_key', 'manage_ccr', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_inference', 'manage_ingest_pipelines', 'manage_logstash_pipelines', - 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', + 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'read_ccr', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client' diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 3f2bbbe3dd..3aa1c9a34c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -27112,7 +27112,8 @@ "tags": [ "search_application" ], - "summary": "Returns the existing search applications", + "summary": "Get search applications", + "description": "Get information about search applications.", "operationId": "search-application-list", "parameters": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 0ac9673a67..72c00c3eab 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -16375,7 +16375,8 @@ "tags": [ "search_application" ], - "summary": "Returns the existing search applications", + "summary": "Get search applications", + "description": "Get information about search applications.", "operationId": "search-application-list", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index e94235fd62..a524bfcfcd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -14738,6 +14738,14 @@ "description": "Delete a search application.\nRemove a search application and its associated alias. Indices attached to the search application are not removed.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html", "name": "search_application.delete", + "privileges": { + "cluster": [ + "manage_search_application" + ], + "index": [ + "manage" + ] + }, "request": { "name": "Request", "namespace": "search_application.delete" @@ -14809,6 +14817,11 @@ "description": "Get search application details.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html", "name": "search_application.get", + "privileges": { + "cluster": [ + "manage_search_application" + ] + }, "request": { "name": "Request", "namespace": "search_application.get" @@ -14883,9 +14896,14 @@ "stability": "beta" } }, - "description": "Returns the existing search applications.", + "description": "Get search applications.\nGet information about search applications.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html", "name": "search_application.list", + "privileges": { + "cluster": [ + "manage_search_application" + ] + }, "request": { "name": "Request", "namespace": "search_application.list" @@ -14949,6 +14967,14 @@ "description": "Create or update a search application.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html", "name": "search_application.put", + "privileges": { + "cluster": [ + "manage_search_application" + ], + "index": [ + "manage" + ] + }, "request": { "name": "Request", "namespace": "search_application.put" @@ -188497,7 +188523,7 @@ } ], "query": [], - "specLocation": "search_application/delete/SearchApplicationsDeleteRequest.ts#L22-L36" + "specLocation": "search_application/delete/SearchApplicationsDeleteRequest.ts#L22-L38" }, { "kind": "response", @@ -188605,7 +188631,7 @@ } ], "query": [], - "specLocation": "search_application/get/SearchApplicationsGetRequest.ts#L22-L35" + "specLocation": "search_application/get/SearchApplicationsGetRequest.ts#L22-L36" }, { "kind": "response", @@ -188701,7 +188727,7 @@ "body": { "kind": "no_body" }, - "description": "Returns the existing search applications.", + "description": "Get search applications.\nGet information about search applications.", "inherits": { "type": { "name": "RequestBase", @@ -188752,7 +188778,7 @@ } } ], - "specLocation": "search_application/list/SearchApplicationsListRequest.ts#L22-L44" + "specLocation": "search_application/list/SearchApplicationsListRequest.ts#L22-L46" }, { "kind": "response", @@ -188848,7 +188874,7 @@ } } ], - "specLocation": "search_application/put/SearchApplicationsPutRequest.ts#L23-L48" + "specLocation": "search_application/put/SearchApplicationsPutRequest.ts#L23-L50" }, { "kind": "response", From 1f2c3ca489179e5e7c9b556788709e7ad7a3df5e Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 2 Jan 2025 18:46:32 -0800 Subject: [PATCH 3/8] Add example for get behavioral analytics collections --- docs/overlays/elasticsearch-shared-overlays.yaml | 9 +++++++++ .../list/SearchApplicationsListResponseExample1.yaml | 10 ++++++++++ ...scalingApisPutAutoscalingPolicyRequestExample1.yaml | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 specification/search_application/list/SearchApplicationsListResponseExample1.yaml create mode 100644 specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index b992e056ca..7ef45176e7 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -1351,3 +1351,12 @@ actions: examples: indicesRolloverResponseExample1: $ref: "../../specification/indices/rollover/indicesRolloverResponseExample1.yaml" +## Examples for behavioral analytics + - target: "$.components['responses']['search_application.get_behavioral_analytics#200']" + description: "Add example for get behavioral analytics collections response" + update: + content: + application/json: + examples: + searchApplicationsListResponseExample1: + $ref: "../../specification/search_application/list/SearchApplicationsListResponseExample1.yaml" diff --git a/specification/search_application/list/SearchApplicationsListResponseExample1.yaml b/specification/search_application/list/SearchApplicationsListResponseExample1.yaml new file mode 100644 index 0000000000..9bc34526ba --- /dev/null +++ b/specification/search_application/list/SearchApplicationsListResponseExample1.yaml @@ -0,0 +1,10 @@ +# summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112 +description: A successful response from `GET _application/analytics/my*` +# type: response +# response_code: '' +value: + "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \ + \ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \ + \ }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \ + \ \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n \ + \ }\n }\n}" diff --git a/specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml b/specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml new file mode 100644 index 0000000000..097d04b7b7 --- /dev/null +++ b/specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml @@ -0,0 +1,5 @@ +summary: autoscaling/apis/put-autoscaling-policy.asciidoc:16 +method_request: PUT /_autoscaling/policy/ +description: '' +type: request +value: "{\n \"roles\": [],\n \"deciders\": {\n \"fixed\": {\n }\n }\n}" From ba6f6959044881172b7b6087c3446b192cbc16a1 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 2 Jan 2025 19:36:36 -0800 Subject: [PATCH 4/8] More --- .../elasticsearch-shared-overlays.yaml | 20 +++++++++++++++++++ .../SearchApplicationGetResponseExample1.yaml | 13 ++++++++++++ ...earchApplicationsListResponseExample2.yaml | 8 ++++++++ .../SearchApplicationPutRequestExample1.yaml | 17 ++++++++++++++++ ...archApplicationsSearchRequestExample1.yaml | 8 ++++++++ ...rchApplicationsSearchResponseExample1.yaml | 8 ++++++++ ...rchApplicationsSearchResponseExample2.yaml | 9 +++++++++ 7 files changed, 83 insertions(+) create mode 100644 specification/search_application/get/SearchApplicationGetResponseExample1.yaml create mode 100644 specification/search_application/list/SearchApplicationsListResponseExample2.yaml create mode 100644 specification/search_application/put/SearchApplicationPutRequestExample1.yaml create mode 100644 specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml create mode 100644 specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml create mode 100644 specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 7ef45176e7..7179349b2c 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -1360,3 +1360,23 @@ actions: examples: searchApplicationsListResponseExample1: $ref: "../../specification/search_application/list/SearchApplicationsListResponseExample1.yaml" +## Examples for search applications + - target: "$.paths['/_application/search_application/{name}']['get']" + description: "Add examples for get search application details operation" + update: + responses: + 200: + content: + application/json: + examples: + getSearchApplicationRequestExample1: + $ref: "../../specification/search_application/get/SearchApplicationGetResponseExample1.yaml" + - target: "$.paths['/_application/search_application/{name}']['put']" + description: "Add examples for create search application operation" + update: + requestBody: + content: + application/json: + examples: + putSearchApplicationRequestExample1: + $ref: "../../specification/search_application/put/SearchApplicationPutRequestExample1.yaml" diff --git a/specification/search_application/get/SearchApplicationGetResponseExample1.yaml b/specification/search_application/get/SearchApplicationGetResponseExample1.yaml new file mode 100644 index 0000000000..cbe7331721 --- /dev/null +++ b/specification/search_application/get/SearchApplicationGetResponseExample1.yaml @@ -0,0 +1,13 @@ +# summary: search-application/apis/get-search-application.asciidoc:95 +description: A sucessful response from `GET _application/search_application/my-app/`. +# type: response +# response_code: '' +value: + "{\n \"name\": \"my-app\",\n \"indices\": [ \"index1\", \"index2\" ],\n \ + \ \"updated_at_millis\": 1682105622204,\n \"template\": {\n \"script\": {\n\ + \ \"source\": {\n \"query\": {\n \"query_string\": {\n \ + \ \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\ + \n }\n }\n },\n \"lang\": \"mustache\",\n \"options\"\ + : {\n \"content_type\": \"application/json;charset=utf-8\"\n },\n \ + \ \"params\": {\n \"query_string\": \"*\",\n \"default_field\"\ + : \"*\"\n }\n }\n }\n}" diff --git a/specification/search_application/list/SearchApplicationsListResponseExample2.yaml b/specification/search_application/list/SearchApplicationsListResponseExample2.yaml new file mode 100644 index 0000000000..bcbf133bf1 --- /dev/null +++ b/specification/search_application/list/SearchApplicationsListResponseExample2.yaml @@ -0,0 +1,8 @@ +summary: search-application/apis/list-search-applications.asciidoc:108 +description: '' +type: response +response_code: '' +value: + "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n\ + \ \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\"\ + ,\n \"updated_at_millis\": 1691501823939\n }\n ]\n}" diff --git a/specification/search_application/put/SearchApplicationPutRequestExample1.yaml b/specification/search_application/put/SearchApplicationPutRequestExample1.yaml new file mode 100644 index 0000000000..e6e94788ce --- /dev/null +++ b/specification/search_application/put/SearchApplicationPutRequestExample1.yaml @@ -0,0 +1,17 @@ +# summary: search-application/apis/put-search-application.asciidoc:148 +# method_request: PUT _application/search_application/my-app +description: > + Run `PUT _application/search_application/my-app` to create or update a search application called `my-app`. When the dictionary parameter is specified, the search application search API will perform the following parameter validation: it accepts only the `query_string` and `default_field` parameters; it verifies that `query_string` and `default_field` are both strings; it accepts `default_field` only if it takes the values title or description. If the parameters are not valid, the search application search API will return an error. +# type: request +value: + "{\n \"indices\": [ \"index1\", \"index2\" ],\n \"template\": {\n \"script\"\ + : {\n \"source\": {\n \"query\": {\n \"query_string\": {\n\ + \ \"query\": \"{{query_string}}\",\n \"default_field\": \"\ + {{default_field}}\"\n }\n }\n },\n \"params\": {\n \ + \ \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n\ + \ \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \ + \ \"type\": \"string\"\n },\n \"default_field\": {\n \ + \ \"type\": \"string\",\n \"enum\": [\n \"title\",\n \ + \ \"description\"\n ]\n },\n \"additionalProperties\"\ + : false\n },\n \"required\": [\n \"query_string\"\n ]\n \ + \ }\n }\n}" diff --git a/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml b/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml new file mode 100644 index 0000000000..35a4a6ea42 --- /dev/null +++ b/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml @@ -0,0 +1,8 @@ +summary: search-application/apis/search-application-search.asciidoc:125 +method_request: POST _application/search_application/my-app/_search +description: '' +type: request +value: + "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\"\ + : [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\"\ + , \"boost\": 1}\n ]\n }\n}" diff --git a/specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml b/specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml new file mode 100644 index 0000000000..fa6f6252da --- /dev/null +++ b/specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml @@ -0,0 +1,8 @@ +summary: search-application/apis/search-application-search.asciidoc:141 +description: '' +type: response +response_code: '' +value: + "{\n \"from\": 0,\n \"size\": 10,\n \"query\": {\n \"multi_match\": {\n\ + \ \"query\": \"my first query\",\n \"fields\": [\n \"description^1.0\"\ + ,\n \"title^5.0\"\n ]\n }\n },\n \"explain\": false\n}" diff --git a/specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml b/specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml new file mode 100644 index 0000000000..6075626529 --- /dev/null +++ b/specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml @@ -0,0 +1,9 @@ +summary: search-application/apis/search-application-search.asciidoc:166 +description: '' +type: response +response_code: '' +value: + "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\"\ + : 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"\ + hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n \ + \ },\n \"max_score\": 0.8630463,\n \"hits\": ...\n }\n}" From c6814ea750b67478e3c3ccf258618d38067acc13 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 2 Jan 2025 20:17:59 -0800 Subject: [PATCH 5/8] Add examples --- .../elasticsearch-shared-overlays.yaml | 24 ++++++++++++++++--- ...ehavioralAnalyticsGetResponseExample1.yaml | 10 ++++++++ ...earchApplicationsListResponseExample1.yaml | 12 ++++------ ...earchApplicationsListResponseExample2.yaml | 8 ------- ...isPutAutoscalingPolicyRequestExample1.yaml | 5 ---- ...archApplicationsSearchRequestExample1.yaml | 8 +++---- ...rchApplicationsSearchResponseExample1.yaml | 8 ------- ...rchApplicationsSearchResponseExample2.yaml | 9 ------- 8 files changed, 40 insertions(+), 44 deletions(-) create mode 100644 specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml delete mode 100644 specification/search_application/list/SearchApplicationsListResponseExample2.yaml delete mode 100644 specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml delete mode 100644 specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml delete mode 100644 specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 7179349b2c..ee6c6e1aa7 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -1358,9 +1358,19 @@ actions: content: application/json: examples: - searchApplicationsListResponseExample1: - $ref: "../../specification/search_application/list/SearchApplicationsListResponseExample1.yaml" + getBehavioralAnalyticsCollectionsResponseExample1: + $ref: "../../specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml" ## Examples for search applications + - target: "$.paths['/_application/search_application']['get']" + description: "Add examples for get search applications operation" + update: + responses: + 200: + content: + application/json: + examples: + getSearchApplicationsResponseExample1: + $ref: "../../specification/search_application/list/SearchApplicationsListResponseExample1.yaml" - target: "$.paths['/_application/search_application/{name}']['get']" description: "Add examples for get search application details operation" update: @@ -1369,7 +1379,7 @@ actions: content: application/json: examples: - getSearchApplicationRequestExample1: + getSearchApplicationResponseExample1: $ref: "../../specification/search_application/get/SearchApplicationGetResponseExample1.yaml" - target: "$.paths['/_application/search_application/{name}']['put']" description: "Add examples for create search application operation" @@ -1380,3 +1390,11 @@ actions: examples: putSearchApplicationRequestExample1: $ref: "../../specification/search_application/put/SearchApplicationPutRequestExample1.yaml" + - target: "$.components['requestBodies']['search_application.search']" + description: "Add example for search application search request" + update: + content: + application/json: + examples: + searchApplicationSearchRequestExample1: + $ref: "../../specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml" diff --git a/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml b/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml new file mode 100644 index 0000000000..9bc34526ba --- /dev/null +++ b/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml @@ -0,0 +1,10 @@ +# summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112 +description: A successful response from `GET _application/analytics/my*` +# type: response +# response_code: '' +value: + "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \ + \ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \ + \ }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \ + \ \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n \ + \ }\n }\n}" diff --git a/specification/search_application/list/SearchApplicationsListResponseExample1.yaml b/specification/search_application/list/SearchApplicationsListResponseExample1.yaml index 9bc34526ba..e687370004 100644 --- a/specification/search_application/list/SearchApplicationsListResponseExample1.yaml +++ b/specification/search_application/list/SearchApplicationsListResponseExample1.yaml @@ -1,10 +1,8 @@ -# summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112 -description: A successful response from `GET _application/analytics/my*` +# summary: search-application/apis/list-search-applications.asciidoc:108 +description: A succesful response from `GET _application/search_application?from=0&size=3&q=app*` returns the first three search applications whose names start with `app`. # type: response # response_code: '' value: - "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \ - \ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \ - \ }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \ - \ \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n \ - \ }\n }\n}" + "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n\ + \ \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\"\ + ,\n \"updated_at_millis\": 1691501823939\n }\n ]\n}" diff --git a/specification/search_application/list/SearchApplicationsListResponseExample2.yaml b/specification/search_application/list/SearchApplicationsListResponseExample2.yaml deleted file mode 100644 index bcbf133bf1..0000000000 --- a/specification/search_application/list/SearchApplicationsListResponseExample2.yaml +++ /dev/null @@ -1,8 +0,0 @@ -summary: search-application/apis/list-search-applications.asciidoc:108 -description: '' -type: response -response_code: '' -value: - "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n\ - \ \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\"\ - ,\n \"updated_at_millis\": 1691501823939\n }\n ]\n}" diff --git a/specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml b/specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml deleted file mode 100644 index 097d04b7b7..0000000000 --- a/specification/search_application/put_behavioral_analytics/autoscalingApisPutAutoscalingPolicyRequestExample1.yaml +++ /dev/null @@ -1,5 +0,0 @@ -summary: autoscaling/apis/put-autoscaling-policy.asciidoc:16 -method_request: PUT /_autoscaling/policy/ -description: '' -type: request -value: "{\n \"roles\": [],\n \"deciders\": {\n \"fixed\": {\n }\n }\n}" diff --git a/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml b/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml index 35a4a6ea42..2951f511e6 100644 --- a/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml +++ b/specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml @@ -1,7 +1,7 @@ -summary: search-application/apis/search-application-search.asciidoc:125 -method_request: POST _application/search_application/my-app/_search -description: '' -type: request +# summary: search-application/apis/search-application-search.asciidoc:125 +# method_request: POST _application/search_application/my-app/_search +description: Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template. +# type: request value: "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\"\ : [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\"\ diff --git a/specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml b/specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml deleted file mode 100644 index fa6f6252da..0000000000 --- a/specification/search_application/search/SearchApplicationsSearchResponseExample1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -summary: search-application/apis/search-application-search.asciidoc:141 -description: '' -type: response -response_code: '' -value: - "{\n \"from\": 0,\n \"size\": 10,\n \"query\": {\n \"multi_match\": {\n\ - \ \"query\": \"my first query\",\n \"fields\": [\n \"description^1.0\"\ - ,\n \"title^5.0\"\n ]\n }\n },\n \"explain\": false\n}" diff --git a/specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml b/specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml deleted file mode 100644 index 6075626529..0000000000 --- a/specification/search_application/search/SearchApplicationsSearchResponseExample2.yaml +++ /dev/null @@ -1,9 +0,0 @@ -summary: search-application/apis/search-application-search.asciidoc:166 -description: '' -type: response -response_code: '' -value: - "{\n \"took\": 5,\n \"timed_out\": false,\n \"_shards\": {\n \"total\"\ - : 1,\n \"successful\": 1,\n \"skipped\": 0,\n \"failed\": 0\n },\n \"\ - hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n \ - \ },\n \"max_score\": 0.8630463,\n \"hits\": ...\n }\n}" From 4795fc3b07f89b3d13a80a47877214c91ac9f35c Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 3 Jan 2025 07:43:20 -0800 Subject: [PATCH 6/8] Update specification/search_application/get/SearchApplicationGetResponseExample1.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: István Zoltán Szabó --- .../get/SearchApplicationGetResponseExample1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/search_application/get/SearchApplicationGetResponseExample1.yaml b/specification/search_application/get/SearchApplicationGetResponseExample1.yaml index cbe7331721..da6b1463ce 100644 --- a/specification/search_application/get/SearchApplicationGetResponseExample1.yaml +++ b/specification/search_application/get/SearchApplicationGetResponseExample1.yaml @@ -1,7 +1,7 @@ # summary: search-application/apis/get-search-application.asciidoc:95 description: A sucessful response from `GET _application/search_application/my-app/`. # type: response -# response_code: '' +# response_code: 200 value: "{\n \"name\": \"my-app\",\n \"indices\": [ \"index1\", \"index2\" ],\n \ \ \"updated_at_millis\": 1682105622204,\n \"template\": {\n \"script\": {\n\ From 727073d74812a6559d3a9c26b020187b8510e20b Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 3 Jan 2025 07:43:28 -0800 Subject: [PATCH 7/8] Update specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: István Zoltán Szabó --- .../BehavioralAnalyticsGetResponseExample1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml b/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml index 9bc34526ba..824701b1ab 100644 --- a/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml +++ b/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml @@ -1,7 +1,7 @@ # summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112 description: A successful response from `GET _application/analytics/my*` # type: response -# response_code: '' +# response_code: 200 value: "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \ \ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \ From 6a6327f665a362a66d1172874391fb91d97b0918 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 3 Jan 2025 07:43:37 -0800 Subject: [PATCH 8/8] Update specification/search_application/list/SearchApplicationsListResponseExample1.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: István Zoltán Szabó --- .../list/SearchApplicationsListResponseExample1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/search_application/list/SearchApplicationsListResponseExample1.yaml b/specification/search_application/list/SearchApplicationsListResponseExample1.yaml index e687370004..f9d79d87fe 100644 --- a/specification/search_application/list/SearchApplicationsListResponseExample1.yaml +++ b/specification/search_application/list/SearchApplicationsListResponseExample1.yaml @@ -1,7 +1,7 @@ # summary: search-application/apis/list-search-applications.asciidoc:108 description: A succesful response from `GET _application/search_application?from=0&size=3&q=app*` returns the first three search applications whose names start with `app`. # type: response -# response_code: '' +# response_code: 200 value: "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n\ \ \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\"\