diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 5c13062c25..508b9e4f75 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -71,7 +71,7 @@ actions: application/json: examples: getFeaturesResponseExample1: - $ref: "../../specification/features/get_features/FeaturesApiResponseExample1.json" + $ref: "../../specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml" - target: "$.paths['/_features/_reset']['post']" description: "Add examples for reset features operation" update: @@ -81,7 +81,7 @@ actions: application/json: examples: resetFeaturesResponseExample1: - $ref: "../../specification/features/reset_features/ResetFeaturesResponseExample1.json" + $ref: "../../specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml" - target: "$.components['requestBodies']['cluster.allocation_explain']" description: "Add examples for cluster allocation explain operation" update: @@ -89,7 +89,7 @@ actions: application/json: examples: clusterAllocationExplainRequestExample1: - $ref: "../../specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json" + $ref: "../../specification/cluster/allocation_explain/examples/request/clusterAllocationExplainRequestExample1.yaml" - target: "$.components['responses']['cluster.health#200']" description: "Add examples for cluster health operation" update: @@ -97,7 +97,7 @@ actions: application/json: examples: clusterHealthResponseExample1: - $ref: "../../specification/cluster/health/clusterHealthResponseExample1.json" + $ref: "../../specification/cluster/health/examples/response/clusterHealthResponseExample1.yaml" - target: "$.paths['/_cluster/settings']['put']" description: "Add examples for cluster update settings operation" update: @@ -106,7 +106,7 @@ actions: application/json: examples: clusterPutSettingsRequestExample1: - $ref: "../../specification/cluster/put_settings/clusterPutSettingsRequestExample1.json" + $ref: "../../specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml" - target: "$.paths['/_cluster/reroute']['post']" description: "Add examples for cluster reroute operation" update: @@ -115,7 +115,7 @@ actions: application/json: examples: clusterRerouteRequestExample1: - $ref: "../../specification/cluster/reroute/clusterRerouteRequestExample1.json" + $ref: "../../specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml" - target: "$.components['requestBodies']['nodes.reload_secure_settings']" description: "Add examples for nodes reload secure settings operation" update: @@ -123,7 +123,7 @@ actions: application/json: examples: clusterNodesReloadSecureSettingsRequestExample1: - $ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json" + $ref: "../../specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml" - target: "$.components['responses']['nodes.reload_secure_settings#200']" description: "Add response examples for nodes reload secure settings operation" update: @@ -131,7 +131,7 @@ actions: application/json: examples: clusterNodesReloadSecureSettingsResponseExample1: - $ref: "../../specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json" + $ref: "../../specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml" - target: "$.paths['/_tasks']['get']" description: "Add examples for task management operation" update: @@ -141,7 +141,7 @@ actions: application/json: examples: getTasksResponseExample1: - $ref: "../../specification/tasks/get/getTasksResponseExample1.json" + $ref: "../../specification/tasks/get/examples/response/GetTaskResponseExample1.yaml" - target: "$.components['responses']['nodes.info#200']" description: "Add response examples for nodes info" update: @@ -159,7 +159,7 @@ actions: application/json: examples: deleteLifecycleResponseExample1: - $ref: "../../specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json" + $ref: "../../specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml" - target: "$.paths['/_ilm/policy/{policy}']['put']" description: "Add examples for create a lifecycle operation" update: @@ -168,14 +168,14 @@ actions: application/json: examples: putLifecycleRequestExample1: - $ref: "../../specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json" + $ref: "../../specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml" responses: 200: content: application/json: examples: putLifecycleResponseExample1: - $ref: "../../specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json" + $ref: "../../specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml" - target: "$.components['responses']['ilm.get_lifecycle#200']" description: "Add examples for get lifecycle policy operation" update: @@ -183,7 +183,7 @@ actions: application/json: examples: getLifecycleResponseExample1: - $ref: "../../specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json" + $ref: "../../specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml" - target: "$.paths['/_ilm/migrate_to_data_tiers']['post']" description: "Add examples for migrate to data tiers routing operation" update: @@ -192,14 +192,14 @@ actions: application/json: examples: migrateToDataTiersRequestExample1: - $ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json" + $ref: "../../specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml" responses: 200: content: application/json: examples: migrateToDataTiersResponseExample1: - $ref: "../../specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json" + $ref: "../../specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml" - target: "$.paths['/_ilm/move/{index}']['post']" description: "Add examples for move to lifecycle step operation" update: @@ -208,14 +208,16 @@ actions: application/json: examples: moveToStepRequestExample1: - $ref: "../../specification/ilm/move_to_step/MoveToStepRequestExample1.json" + $ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml" + moveToStepRequestExample2: + $ref: "../../specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml" responses: 200: content: application/json: examples: moveToStepResponseExample1: - $ref: "../../specification/ilm/move_to_step/MoveToStepResponseExample1.json" + $ref: "../../specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml" - target: "$.paths['/_ilm/start']['post']" description: "Add examples for start index lifecycle management operation" update: @@ -225,7 +227,7 @@ actions: application/json: examples: startILMResponseExample1: - $ref: "../../specification/ilm/start/StartILMResponseExample1.json" + $ref: "../../specification/ilm/start/examples/response/StartILMResponseExample1.yaml" - target: "$.paths['/_ilm/stop']['post']" description: "Add examples for stop index lifecycle management operation" update: @@ -235,7 +237,7 @@ actions: application/json: examples: stopILMResponseExample1: - $ref: "../../specification/ilm/stop/stopILMResponseExample1.json" + $ref: "../../specification/ilm/stop/examples/response/StopILMResponseExample1.yaml" - target: "$.paths['/_ilm/status']['get']" description: "Add examples for get index lifecycle management status operation" update: @@ -245,7 +247,7 @@ actions: application/json: examples: getILMStatusResponseExample1: - $ref: "../../specification/ilm/get_status/GetILMStatusResponseExample1.json" + $ref: "../../specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml" - target: "$.paths['/{index}/_ilm/explain']['get']" description: "Add examples for explain lifecycle operation" update: @@ -255,7 +257,7 @@ actions: application/json: examples: explainLifecycleResponseExample1: - $ref: "../../specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json" + $ref: "../../specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml" - target: "$.paths['/{index}/_ilm/remove']['post']" description: "Add examples for remove policy from index operation" update: @@ -265,7 +267,7 @@ actions: application/json: examples: removePolicyResponseExample1: - $ref: "../../specification/ilm/remove_policy/RemovePolicyResponseExample1.json" + $ref: "../../specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml" - target: "$.components['requestBodies']['indices.clone']" description: "Add examples for clone index request" update: @@ -283,7 +285,7 @@ actions: application/json: examples: indicesCloseResponseExample1: - $ref: "../../specification/indices/close/indicesCloseResponseExample1.yaml" + $ref: "../../specification/indices/close/examples/response/CloseIndexResponseExample1.yaml" - target: "$.components['responses']['indices.data_streams_stats#200']" description: "Add example for data stream stats response" update: diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index d6695cc261..8c125fa223 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -1077,7 +1077,7 @@ actions: application/json: examples: asyncSearchSubmitRequestExample1: - $ref: "../../specification/async_search/submit/AsyncSearchSubmitRequestExample1.json" + $ref: "../../specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml" - target: "$.components['responses']['async_search.submit#200']" description: "Add example for asynch search submit response" update: @@ -1085,7 +1085,7 @@ actions: application/json: examples: asyncSearchSubmitResponseExample1: - $ref: "../../specification/async_search/submit/AsyncSearchSubmitResponseExample1.json" + $ref: "../../specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml" - target: "$.paths['/_transform/{transform_id}']['put']" description: "Add examples for create transform operation" update: @@ -1094,16 +1094,16 @@ actions: application/json: examples: createTransformRequestExample1: - $ref: "../../specification/transform/put_transform/PutTransformRequestExample1.json" + $ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml" createTransformRequestExample2: - $ref: "../../specification/transform/put_transform/PutTransformRequestExample2.json" + $ref: "../../specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml" responses: 200: content: application/json: examples: createTransformResponseExample1: - $ref: "../../specification/transform/put_transform/PutTransformResponseExample1.json" + $ref: "../../specification/transform/put_transform/examples/response/PutTransformResponseExample1.yaml" - target: "$.components['requestBodies']['transform.preview_transform']" description: "Add examples for preview transform operation" update: @@ -1111,7 +1111,7 @@ actions: application/json: examples: previewTransformRequestExample1: - $ref: "../../specification/transform/preview_transform/PreviewTransformRequestExample1.json" + $ref: "../../specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml" - target: "$.components['responses']['transform.preview_transform#200']" description: "Add examples for preview transform operation" update: @@ -1119,7 +1119,7 @@ actions: application/json: examples: previewTransformResponseExample1: - $ref: "../../specification/transform/preview_transform/PreviewTransformResponseExample1.json" + $ref: "../../specification/transform/preview_transform/examples/response/PreviewTransformResponseExample1.yaml" - target: "$.paths['/_transform/{transform_id}/_update']['post']" description: "Add examples for update transform operation" update: @@ -1128,14 +1128,14 @@ actions: application/json: examples: updateTransformRequestExample1: - $ref: "../../specification/transform/update_transform/UpdateTransformRequestExample1.json" + $ref: "../../specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml" responses: 200: content: application/json: examples: updateTransformResponseExample1: - $ref: "../../specification/transform/update_transform/UpdateTransformResponseExample1.json" + $ref: "../../specification/transform/update_transform/examples/response/UpdateTransformResponseExample1.yaml" - target: "$.paths['/_eql/search/status/{id}']['get']" description: "Add examples for get async EQL status operation" update: @@ -1145,7 +1145,7 @@ actions: application/json: examples: eqlGetStatusResponseExample1: - $ref: "../../specification/eql/get_status/EqlGetStatusResponseExample1.json" + $ref: "../../specification/eql/get_status/examples/response/EqlGetStatusResponseExample1.yaml" - target: "$.components['requestBodies']['eql.search']" description: "Add examples for EQL search operation" update: @@ -1153,9 +1153,9 @@ actions: application/json: examples: eqlSearchRequestExample1: - $ref: "../../specification/eql/search/EqlSearchRequestExample1.json" + $ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample1.yaml" eqlSearchRequestExample2: - $ref: "../../specification/eql/search/EqlSearchRequestExample2.json" + $ref: "../../specification/eql/search/examples/request/EqlSearchRequestExample2.yaml" - target: "$.components['reponses']['eql.search#200']" description: "Add examples for EQL search operation" update: @@ -1163,7 +1163,7 @@ actions: application/json: examples: eqlSearchResponseExample2: - $ref: "../../specification/eql/search/EqlSearchResponseExample2.json" + $ref: "../../specification/eql/search/examples/response/EqlSearchResponseExample2.yaml" - target: "$.paths['/_query']['post']" description: "Add examples for ES|QL query operation" update: @@ -1172,7 +1172,7 @@ actions: application/json: examples: esqlQueryRequestExample1: - $ref: "../../specification/esql/query/EsqlQueryApiRequestExample1.json" + $ref: "../../specification/esql/query/examples/request/QueryRequestExample1.yaml" - target: "$.components['requestBodies']['graph.explore']" description: "Add example for graph explore request" update: @@ -1180,7 +1180,7 @@ actions: application/json: examples: graphExploreRequestExample1: - $ref: "../../specification/graph/explore/graphExploreRequestExample1.json" + $ref: "../../specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml" - target: "$.paths['/{index}/_block/{block}']['put']" description: "Add examples for add index block operation" update: @@ -1334,7 +1334,7 @@ actions: application/json: examples: indicesResolveResponseExample1: - $ref: "../../specification/indices/resolve_index/ResolveIndexResponseExample1.yaml" + $ref: "../../specification/indices/resolve_index/examples/response/ResolveIndexResponseExample1.yaml" - target: "$.components['requestBodies']['indices.rollover']" description: "Add example for rollover index request" update: diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 0eaead9c08..368f0ecae6 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -10336,9 +10336,11 @@ "type": "boolean" }, "removed_legacy_template": { + "description": "The name of the legacy index template that was deleted.\nThis information is missing if no legacy index templates were deleted.", "type": "string" }, "migrated_ilm_policies": { + "description": "The ILM policies that were updated.", "type": "array", "items": { "type": "string" @@ -10348,18 +10350,21 @@ "$ref": "#/components/schemas/_types:Indices" }, "migrated_legacy_templates": { + "description": "The legacy index templates that were updated to not contain custom routing settings for the provided data attribute.", "type": "array", "items": { "type": "string" } }, "migrated_composable_templates": { + "description": "The composable index templates that were updated to not contain custom routing settings for the provided data attribute.", "type": "array", "items": { "type": "string" } }, "migrated_component_templates": { + "description": "The component templates that were updated to not contain custom routing settings for the provided data attribute.", "type": "array", "items": { "type": "string" @@ -69051,9 +69056,11 @@ "type": "object", "properties": { "action": { + "description": "The optional action to which the index will be moved.", "type": "string" }, "name": { + "description": "The optional step name to which the index will be moved.", "type": "string" }, "phase": { diff --git a/output/schema/schema.json b/output/schema/schema.json index ae3e1981dc..7a480ceced 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -122761,6 +122761,7 @@ } }, { + "description": "Arbitrary metadata that is not automatically generated or used by Elasticsearch.", "name": "_meta", "required": false, "type": { @@ -122772,7 +122773,7 @@ } } ], - "specLocation": "ilm/_types/Policy.ts#L23-L26" + "specLocation": "ilm/_types/Policy.ts#L23-L29" }, { "kind": "interface", @@ -123900,6 +123901,7 @@ } }, { + "description": "The name of the legacy index template that was deleted.\nThis information is missing if no legacy index templates were deleted.", "name": "removed_legacy_template", "required": true, "type": { @@ -123911,6 +123913,7 @@ } }, { + "description": "The ILM policies that were updated.", "name": "migrated_ilm_policies", "required": true, "type": { @@ -123925,6 +123928,7 @@ } }, { + "description": "The indices that were migrated to tier preference routing.", "name": "migrated_indices", "required": true, "type": { @@ -123936,6 +123940,7 @@ } }, { + "description": "The legacy index templates that were updated to not contain custom routing settings for the provided data attribute.", "name": "migrated_legacy_templates", "required": true, "type": { @@ -123950,6 +123955,7 @@ } }, { + "description": "The composable index templates that were updated to not contain custom routing settings for the provided data attribute.", "name": "migrated_composable_templates", "required": true, "type": { @@ -123964,6 +123970,7 @@ } }, { + "description": "The component templates that were updated to not contain custom routing settings for the provided data attribute.", "name": "migrated_component_templates", "required": true, "type": { @@ -123983,7 +123990,7 @@ "name": "Response", "namespace": "ilm.migrate_to_data_tiers" }, - "specLocation": "ilm/migrate_to_data_tiers/Response.ts#L22-L32" + "specLocation": "ilm/migrate_to_data_tiers/Response.ts#L22-L51" }, { "kind": "request", @@ -123994,6 +124001,7 @@ "kind": "properties", "properties": [ { + "description": "The step that the index is expected to be in.", "name": "current_step", "required": true, "type": { @@ -124005,6 +124013,7 @@ } }, { + "description": "The step that you want to run.", "name": "next_step", "required": true, "type": { @@ -124043,7 +124052,7 @@ } ], "query": [], - "specLocation": "ilm/move_to_step/MoveToStepRequest.ts#L24-L51" + "specLocation": "ilm/move_to_step/MoveToStepRequest.ts#L24-L57" }, { "kind": "response", @@ -124071,6 +124080,7 @@ }, "properties": [ { + "description": "The optional action to which the index will be moved.", "name": "action", "required": false, "type": { @@ -124082,6 +124092,7 @@ } }, { + "description": "The optional step name to which the index will be moved.", "name": "name", "required": false, "type": { @@ -124104,7 +124115,7 @@ } } ], - "specLocation": "ilm/move_to_step/types.ts#L20-L25" + "specLocation": "ilm/move_to_step/types.ts#L20-L31" }, { "kind": "request", @@ -166000,6 +166011,7 @@ "kind": "properties", "properties": [ { + "description": "Evaluation results for a classification analysis.\nIt outputs a prediction that identifies to which of the classes each document belongs.", "name": "classification", "required": false, "type": { @@ -166011,6 +166023,7 @@ } }, { + "description": "Evaluation results for an outlier detection analysis.\nIt outputs the probability that each document is an outlier.", "name": "outlier_detection", "required": false, "type": { @@ -166022,6 +166035,7 @@ } }, { + "description": "Evaluation results for a regression analysis which outputs a prediction of values.", "name": "regression", "required": false, "type": { @@ -166038,7 +166052,7 @@ "name": "Response", "namespace": "ml.evaluate_data_frame" }, - "specLocation": "ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L33" + "specLocation": "ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L44" }, { "kind": "request", diff --git a/specification/async_search/submit/AsyncSearchSubmitRequestExample1.json b/specification/async_search/submit/AsyncSearchSubmitRequestExample1.json deleted file mode 100644 index 56f3aa1345..0000000000 --- a/specification/async_search/submit/AsyncSearchSubmitRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Performs a search request asynchronously.", - "method_request": "POST /sales*/_async_search?size=0", - "description": "Accepts the same parameters and request body as the search API.", - "type": "request", - "value": "{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" -} diff --git a/specification/async_search/submit/AsyncSearchSubmitResponseExample1.json b/specification/async_search/submit/AsyncSearchSubmitResponseExample1.json deleted file mode 100644 index 4cf7a5cdf9..0000000000 --- a/specification/async_search/submit/AsyncSearchSubmitResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when performing search asynchronously.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true,\n \"is_running\" : true,\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562,\n \"successful\" : 3,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483,\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}" -} diff --git a/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml b/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml new file mode 100644 index 0000000000..b5b46e91da --- /dev/null +++ b/specification/async_search/submit/examples/request/AsyncSearchSubmitRequestExample1.yaml @@ -0,0 +1,7 @@ +# summary: "Performs a search request asynchronously." +# method_request: "POST /sales*/_async_search?size=0" +description: > + Perform a search request asynchronously with `POST /sales*/_async_search?size=0`. + It accepts the same parameters and request body as the search API. +# type: "request", +value: "{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}" diff --git a/specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml b/specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml new file mode 100644 index 0000000000..0ca2e7f080 --- /dev/null +++ b/specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml @@ -0,0 +1,5 @@ +# summary: +description: A successful response when performing search asynchronously. +# type: "response" +# response_code: 200 +value: "{\n \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n \"is_partial\" : true,\n \"is_running\" : true,\n \"start_time_in_millis\" : 1583945890986,\n \"expiration_time_in_millis\" : 1584377890986,\n \"response\" : {\n \"took\" : 1122,\n \"timed_out\" : false,\n \"num_reduce_phases\" : 0,\n \"_shards\" : {\n \"total\" : 562,\n \"successful\" : 3,\n \"skipped\" : 0,\n \"failed\" : 0\n },\n \"hits\" : {\n \"total\" : {\n \"value\" : 157483,\n \"relation\" : \"gte\"\n },\n \"max_score\" : null,\n \"hits\" : [ ]\n }\n }\n}" diff --git a/specification/ccr/follow/ccrApisFollowPutFollowRequestExample1.json b/specification/ccr/follow/ccrApisFollowPutFollowRequestExample1.json deleted file mode 100644 index 7613b9f28d..0000000000 --- a/specification/ccr/follow/ccrApisFollowPutFollowRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Creates a follower index.", - "method_request": "PUT //_ccr/follow?wait_for_active_shards=1", - "description": "The API method and path for this request: `PUT //_ccr/follow?wait_for_active_shards=1`.", - "type": "request", - "value": "{\n \"remote_cluster\" : \"\",\n \"leader_index\" : \"\"\n}" -} diff --git a/specification/ccr/follow/ccrApisFollowPutFollowRequestExample3.json b/specification/ccr/follow/ccrApisFollowPutFollowRequestExample3.json deleted file mode 100644 index 8cac34f924..0000000000 --- a/specification/ccr/follow/ccrApisFollowPutFollowRequestExample3.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Creates a follower index named `follower_index`.", - "method_request": "PUT /follower_index/_ccr/follow?wait_for_active_shards=1", - "description": "The API method and path for this reqest: `PUT /follower_index/_ccr/follow?wait_for_active_shards=1`.", - "type": "request", - "value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" -} diff --git a/specification/ccr/follow/ccrApisFollowPutFollowResponseExample1.json b/specification/ccr/follow/ccrApisFollowPutFollowResponseExample1.json deleted file mode 100644 index 06baeb34f4..0000000000 --- a/specification/ccr/follow/ccrApisFollowPutFollowResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for creating a follower index.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}" -} diff --git a/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml b/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml new file mode 100644 index 0000000000..992edd47b5 --- /dev/null +++ b/specification/ccr/follow/examples/request/CreateFollowIndexRequestExample1.yaml @@ -0,0 +1,5 @@ +# summary: "Create a follower index named `follower_index`." +# method_request: "PUT /follower_index/_ccr/follow?wait_for_active_shards=1" +description: Run `PUT /follower_index/_ccr/follow?wait_for_active_shards=1`." +# type: "request" +value: "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" diff --git a/specification/ccr/follow/examples/response/CreateFollowIndexResponseExample1.yaml b/specification/ccr/follow/examples/response/CreateFollowIndexResponseExample1.yaml new file mode 100644 index 0000000000..7016d4b67c --- /dev/null +++ b/specification/ccr/follow/examples/response/CreateFollowIndexResponseExample1.yaml @@ -0,0 +1,7 @@ +{ + 'summary': 'A successful response for creating a follower index.', + 'description': '', + 'type': 'response', + 'response_code': 200, + 'value': "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}" +} diff --git a/specification/ccr/forget_follower/ccrApisFollowPostForgetFollowerRequestExample1.json b/specification/ccr/forget_follower/ccrApisFollowPostForgetFollowerRequestExample1.json deleted file mode 100644 index cb0b853ff3..0000000000 --- a/specification/ccr/forget_follower/ccrApisFollowPostForgetFollowerRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Removes the follower retention leases from the leader index.", - "method_request": "POST //_ccr/forget_follower", - "description": "The API method and path for this request: `POST //_ccr/forget_follower`.", - "type": "request", - "value": "{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}" -} diff --git a/specification/ccr/forget_follower/ccrApisFollowPostForgetFollowerResponseExample1.json b/specification/ccr/forget_follower/ccrApisFollowPostForgetFollowerResponseExample1.json deleted file mode 100644 index 4c89f6b8f4..0000000000 --- a/specification/ccr/forget_follower/ccrApisFollowPostForgetFollowerResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for removing the follower retention leases from the leader index.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}" -} diff --git a/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml b/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml new file mode 100644 index 0000000000..6a6d1b53ff --- /dev/null +++ b/specification/ccr/forget_follower/examples/request/ForgetFollowerIndexRequestExample1.yaml @@ -0,0 +1,5 @@ +# summary: "Removes the follower retention leases from the leader index." +# method_request: "POST //_ccr/forget_follower", +description: Run `POST //_ccr/forget_follower`. +# type: "request" +value: "{\n \"follower_cluster\" : \"\",\n \"follower_index\" : \"\",\n \"follower_index_uuid\" : \"\",\n \"leader_remote_cluster\" : \"\"\n}" diff --git a/specification/ccr/forget_follower/examples/response/ForgetFollowerIndexResponseExample1.yaml b/specification/ccr/forget_follower/examples/response/ForgetFollowerIndexResponseExample1.yaml new file mode 100644 index 0000000000..32900b9b21 --- /dev/null +++ b/specification/ccr/forget_follower/examples/response/ForgetFollowerIndexResponseExample1.yaml @@ -0,0 +1,6 @@ +summary: +description: > + A successful response for removing the follower retention leases from the leader index. +# type: "response" +# response_code: 200 +value: "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}" diff --git a/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternRequestExample1.json b/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternRequestExample1.json deleted file mode 100644 index 80d58fa70e..0000000000 --- a/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Creates an auto-follow pattern.", - "method_request": "PUT /_ccr/auto_follow/", - "description": "The API method and path for this request: `PUT /_ccr/auto_follow/`", - "type": "request", - "value": "{\n \"remote_cluster\" : \"\",\n \"leader_index_patterns\" :\n [\n \"\"\n ],\n \"leader_index_exclusion_patterns\":\n [\n \"\"\n ],\n \"follow_index_pattern\" : \"\"\n}" -} diff --git a/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternRequestExample2.json b/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternRequestExample2.json deleted file mode 100644 index 68fb1674e0..0000000000 --- a/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternRequestExample2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Creates an auto-follow pattern named `my_auto_follow_pattern`.", - "method_request": "PUT /_ccr/auto_follow/my_auto_follow_pattern", - "description": "The API method and path for this request: `PUT /_ccr/auto_follow/my_auto_follow_pattern`.", - "type": "request", - "value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" -} diff --git a/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternResponseExample1.json b/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternResponseExample1.json deleted file mode 100644 index f0acf3ed26..0000000000 --- a/specification/ccr/put_auto_follow_pattern/ccrApisAutoFollowPutAutoFollowPatternResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for creating an auto-follow pattern.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\" : true\n}" -} diff --git a/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml b/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml new file mode 100644 index 0000000000..8b04e28f7c --- /dev/null +++ b/specification/ccr/put_auto_follow_pattern/examples/request/PutAutoFollowPatternRequestExample1.yaml @@ -0,0 +1,6 @@ +# summary: "" +# method_request: "PUT /_ccr/auto_follow/my_auto_follow_pattern" +description: > + Run `PUT /_ccr/auto_follow/my_auto_follow_pattern` to creates an auto-follow pattern. +# type: "request" +value: "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" diff --git a/specification/ccr/put_auto_follow_pattern/examples/response/PutAutoFollowPatternResponseExample1.yaml b/specification/ccr/put_auto_follow_pattern/examples/response/PutAutoFollowPatternResponseExample1.yaml new file mode 100644 index 0000000000..2a61a48461 --- /dev/null +++ b/specification/ccr/put_auto_follow_pattern/examples/response/PutAutoFollowPatternResponseExample1.yaml @@ -0,0 +1,6 @@ +# summary: '' +description: A successful response for creating an auto-follow pattern. +# type: response +# response_code: 200 +value: + acknowledged": true diff --git a/specification/ccr/resume_follow/ccrApisFollowPostResumeFollowRequestExample2.json b/specification/ccr/resume_follow/ccrApisFollowPostResumeFollowRequestExample2.json deleted file mode 100644 index c883b4a27d..0000000000 --- a/specification/ccr/resume_follow/ccrApisFollowPostResumeFollowRequestExample2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Resumes a follower index.", - "method_request": "POST /follower_index/_ccr/resume_follow", - "description": "The API method and path for this request: `POST /follower_index/_ccr/resume_follow`.", - "type": "request", - "value": "{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}" -} diff --git a/specification/ccr/resume_follow/ccrApisFollowPostResumeFollowResponseExample1.json b/specification/ccr/resume_follow/ccrApisFollowPostResumeFollowResponseExample1.json deleted file mode 100644 index b882c531b4..0000000000 --- a/specification/ccr/resume_follow/ccrApisFollowPostResumeFollowResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for resuming a folower index.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\" : true\n}" -} diff --git a/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml b/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml new file mode 100644 index 0000000000..be76ec61bb --- /dev/null +++ b/specification/ccr/resume_follow/examples/request/ResumeFollowIndexRequestExample1.yaml @@ -0,0 +1,17 @@ +# summary: +# method_request: POST /follower_index/_ccr/resume_follow +description: Run `POST /follower_index/_ccr/resume_follow` to resume the follower index. +# type: request +value: |- + { + "max_read_request_operation_count" : 1024, + "max_outstanding_read_requests" : 16, + "max_read_request_size" : "1024k", + "max_write_request_operation_count" : 32768, + "max_write_request_size" : "16k", + "max_outstanding_write_requests" : 8, + "max_write_buffer_count" : 512, + "max_write_buffer_size" : "512k", + "max_retry_delay" : "10s", + "read_poll_timeout" : "30s" + } diff --git a/specification/ccr/resume_follow/examples/response/ResumeFollowIndexResponseExample1.yaml b/specification/ccr/resume_follow/examples/response/ResumeFollowIndexResponseExample1.yaml new file mode 100644 index 0000000000..e98590c4a9 --- /dev/null +++ b/specification/ccr/resume_follow/examples/response/ResumeFollowIndexResponseExample1.yaml @@ -0,0 +1,8 @@ +# summary: +description: A successful response from resuming a folower index. +# type: response +# response_code: 200 +value: |- + { + "acknowledged" : true + } diff --git a/specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json b/specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json deleted file mode 100644 index 028ed4e818..0000000000 --- a/specification/cluster/allocation_explain/clusterAllocationExplainRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Provides an explanation for a shard’s current allocation.", - "method_request": "GET _cluster/allocation/explain", - "description": "", - "type": "request", - "value": "{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}" -} diff --git a/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml b/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml new file mode 100644 index 0000000000..005d9261b3 --- /dev/null +++ b/specification/cluster/allocation_explain/examples/request/ClusterAllocationExplainRequestExample1.yaml @@ -0,0 +1,11 @@ +# summary: +# method_request: GET _cluster/allocation/explain +description: Run `GET _cluster/allocation/explain` to get an explanation for a shard's current allocation. +# type: request +value: |- + { + "index": "my-index-000001", + "shard": 0, + "primary": false, + "current_node": "my-node" + } diff --git a/specification/cluster/health/clusterHealthResponseExample1.json b/specification/cluster/health/clusterHealthResponseExample1.json deleted file mode 100644 index fbf688b042..0000000000 --- a/specification/cluster/health/clusterHealthResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when requesting the health status of a cluster.", - "description": "This is the API response in case of a quiet single node cluster with a single index with one shard and one replica.", - "type": "response", - "response_code": 200, - "value": "{\n \"cluster_name\" : \"testcluster\",\n \"status\" : \"yellow\",\n \"timed_out\" : false,\n \"number_of_nodes\" : 1,\n \"number_of_data_nodes\" : 1,\n \"active_primary_shards\" : 1,\n \"active_shards\" : 1,\n \"relocating_shards\" : 0,\n \"initializing_shards\" : 0,\n \"unassigned_shards\" : 1,\n \"delayed_unassigned_shards\": 0,\n \"number_of_pending_tasks\" : 0,\n \"number_of_in_flight_fetch\": 0,\n \"task_max_waiting_in_queue_millis\": 0,\n \"active_shards_percent_as_number\": 50.0\n}" -} diff --git a/specification/cluster/health/examples/response/ClusterHealthResponseExample1.yaml b/specification/cluster/health/examples/response/ClusterHealthResponseExample1.yaml new file mode 100644 index 0000000000..53304058fd --- /dev/null +++ b/specification/cluster/health/examples/response/ClusterHealthResponseExample1.yaml @@ -0,0 +1,24 @@ +# summary: +description: > + A successful response from `GET _cluster/health`. + It is the health status of a quiet single node cluster with a single index with one shard and one replica. +type: response +response_code: 200 +value: |- + { + "cluster_name" : "testcluster", + "status" : "yellow", + "timed_out" : false, + "number_of_nodes" : 1, + "number_of_data_nodes" : 1, + "active_primary_shards" : 1, + "active_shards" : 1, + "relocating_shards" : 0, + "initializing_shards" : 0, + "unassigned_shards" : 1, + "delayed_unassigned_shards": 0, + "number_of_pending_tasks" : 0, + "number_of_in_flight_fetch": 0, + "task_max_waiting_in_queue_millis": 0, + "active_shards_percent_as_number": 50.0 + } diff --git a/specification/cluster/put_settings/clusterPutSettingsRequestExample1.json b/specification/cluster/put_settings/clusterPutSettingsRequestExample1.json deleted file mode 100644 index 45cba7ab50..0000000000 --- a/specification/cluster/put_settings/clusterPutSettingsRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Configures dynamic cluster settings.", - "method_request": "PUT /_cluster/settings", - "description": "An example of a persistent update.", - "type": "request", - "value": "{\n \"persistent\" : {\n \"indices.recovery.max_bytes_per_sec\" : \"50mb\"\n }\n}" -} diff --git a/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml b/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml new file mode 100644 index 0000000000..996b2597d9 --- /dev/null +++ b/specification/cluster/put_settings/examples/request/ClusterPutSettingsRequestExample1.yaml @@ -0,0 +1,10 @@ +# summary: +# method_request: PUT /_cluster/settings +description: An example of a persistent update. +# type: request +value: |- + { + "persistent" : { + "indices.recovery.max_bytes_per_sec" : "50mb" + } + } diff --git a/specification/cluster/reroute/clusterRerouteRequestExample1.json b/specification/cluster/reroute/clusterRerouteRequestExample1.json deleted file mode 100644 index a5210c6f83..0000000000 --- a/specification/cluster/reroute/clusterRerouteRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Changes the allocation of shards in a cluster.", - "method_request": "POST /_cluster/reroute?metric=none", - "description": "", - "type": "request", - "value": "{\n \"commands\": [\n {\n \"move\": {\n \"index\": \"test\", \"shard\": 0,\n \"from_node\": \"node1\", \"to_node\": \"node2\"\n }\n },\n {\n \"allocate_replica\": {\n \"index\": \"test\", \"shard\": 1,\n \"node\": \"node3\"\n }\n }\n ]\n}" -} diff --git a/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml b/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml new file mode 100644 index 0000000000..08eea8274c --- /dev/null +++ b/specification/cluster/reroute/examples/request/ClusterRerouteRequestExample1.yaml @@ -0,0 +1,21 @@ +# summary: +# method_request: POST /_cluster/reroute?metric=none +description: Run `POST /_cluster/reroute?metric=none` to changes the allocation of shards in a cluster. +# type: request +value: |- + { + "commands": [ + { + "move": { + "index": "test", "shard": 0, + "from_node": "node1", "to_node": "node2" + } + }, + { + "allocate_replica": { + "index": "test", "shard": 1, + "node": "node3" + } + } + ] + } diff --git a/specification/eql/get_status/EqlGetStatusResponseExample1.json b/specification/eql/get_status/EqlGetStatusResponseExample1.json deleted file mode 100644 index fba73dce2e..0000000000 --- a/specification/eql/get_status/EqlGetStatusResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for getting status information for an async EQL search.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"id\" : \"FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=\",\n \"is_running\" : true,\n \"is_partial\" : true,\n \"start_time_in_millis\" : 1611690235000,\n \"expiration_time_in_millis\" : 1611690295000\n\n}" -} diff --git a/specification/eql/get_status/examples/response/EqlGetStatusResponseExample1.yaml b/specification/eql/get_status/examples/response/EqlGetStatusResponseExample1.yaml new file mode 100644 index 0000000000..67945dff99 --- /dev/null +++ b/specification/eql/get_status/examples/response/EqlGetStatusResponseExample1.yaml @@ -0,0 +1,12 @@ +# summary: +description: A successful response for getting status information for an async EQL search. +# type: response +# response_code: 200 +value: >- + { + "id": "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=", + "is_running" : true, + "is_partial" : true, + "start_time_in_millis" : 1611690235000, + "expiration_time_in_millis" : 1611690295000 + } diff --git a/specification/eql/search/EqlSearchRequestExample1.json b/specification/eql/search/EqlSearchRequestExample1.json deleted file mode 100644 index c70b89e3da..0000000000 --- a/specification/eql/search/EqlSearchRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Returns search results for an EQL query.", - "method_request": "GET /my-data-stream/_eql/search", - "description": "", - "type": "request", - "value": "{\n \"query\": \"\"\"\n process where process.name == \"regsvr32.exe\"\n \"\"\"\n}" -} diff --git a/specification/eql/search/EqlSearchRequestExample2.json b/specification/eql/search/EqlSearchRequestExample2.json deleted file mode 100644 index cdc83203bf..0000000000 --- a/specification/eql/search/EqlSearchRequestExample2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Returns search results for an EQL query", - "method_request": "GET /my-data-stream/_eql/search", - "description": "", - "type": "request", - "value": "{\n \"query\": \"\"\"\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n \"\"\"\n}" -} diff --git a/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml b/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml new file mode 100644 index 0000000000..557a9f603b --- /dev/null +++ b/specification/eql/search/examples/request/EqlSearchRequestExample1.yaml @@ -0,0 +1,11 @@ +summary: Basic query +# method_request: GET /my-data-stream/_eql/search +description: > + Run `GET /my-data-stream/_eql/search` to search for events that have a `process.name` of `cmd.exe` and a `process.pid` other than `2013`. +# type: request +value: |- + { + "query": """ + process where (process.name == "cmd.exe" and process.pid != 2013) + """ + } diff --git a/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml b/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml new file mode 100644 index 0000000000..58d93d0070 --- /dev/null +++ b/specification/eql/search/examples/request/EqlSearchRequestExample2.yaml @@ -0,0 +1,16 @@ +summary: Sequence query +# method_request: GET /my-data-stream/_eql/search +description: > + Run `GET /my-data-stream/_eql/search` to search for a sequence of events. + The sequence starts with an event with an `event.category` of `file`, a `file.name` of `cmd.exe`, and a `process.pid` other than `2013`. + It is followed by an event with an `event.category` of `process` and a `process.executable` that contains the substring `regsvr32`. + These events must also share the same `process.pid` value. +# type: request +value: |- + { + "query": """ + sequence by process.pid + [ file where file.name == "cmd.exe" and process.pid != 2013 ] + [ process where stringContains(process.executable, "regsvr32") ] + """ + } diff --git a/specification/eql/search/EqlSearchResponseExample2.json b/specification/eql/search/examples/response/EqlSearchResponseExample2.yaml similarity index 89% rename from specification/eql/search/EqlSearchResponseExample2.json rename to specification/eql/search/examples/response/EqlSearchResponseExample2.yaml index e35c6b3b1c..e589898464 100644 --- a/specification/eql/search/EqlSearchResponseExample2.json +++ b/specification/eql/search/examples/response/EqlSearchResponseExample2.yaml @@ -1,7 +1,7 @@ { - "summary": "A successful response for performing search with an EQL query.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n 2012\n ],\n \"events\": [\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"AtOJ4UjUBAAx3XR5kcCM\",\n \"_source\": {\n \"@timestamp\": \"2099-12-06T11:04:07.000Z\",\n \"event\": {\n \"category\": \"file\",\n \"id\": \"dGCHwoeS\",\n \"sequence\": 2\n },\n \"file\": {\n \"accessed\": \"2099-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"cmd.exe\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n }\n },\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"OQmfCaduce8zoHT93o4H\",\n \"_source\": {\n \"@timestamp\": \"2099-12-07T11:07:09.000Z\",\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 4\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"regsvr32.exe\",\n \"command_line\": \"regsvr32.exe /s /u /i:https://...RegSvr32.sct scrobj.dll\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n }\n }\n ]\n }\n ]\n }\n}" + 'summary': 'A successful response for performing search with an EQL query.', + 'description': '', + 'type': 'response', + 'response_code': 200, + 'value': "{\n \"is_partial\": false,\n \"is_running\": false,\n \"took\": 6,\n \"timed_out\": false,\n \"hits\": {\n \"total\": {\n \"value\": 1,\n \"relation\": \"eq\"\n },\n \"sequences\": [\n {\n \"join_keys\": [\n 2012\n ],\n \"events\": [\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"AtOJ4UjUBAAx3XR5kcCM\",\n \"_source\": {\n \"@timestamp\": \"2099-12-06T11:04:07.000Z\",\n \"event\": {\n \"category\": \"file\",\n \"id\": \"dGCHwoeS\",\n \"sequence\": 2\n },\n \"file\": {\n \"accessed\": \"2099-12-07T11:07:08.000Z\",\n \"name\": \"cmd.exe\",\n \"path\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\n \"type\": \"file\",\n \"size\": 16384\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"cmd.exe\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\"\n }\n }\n },\n {\n \"_index\": \".ds-my-data-stream-2099.12.07-000001\",\n \"_id\": \"OQmfCaduce8zoHT93o4H\",\n \"_source\": {\n \"@timestamp\": \"2099-12-07T11:07:09.000Z\",\n \"event\": {\n \"category\": \"process\",\n \"id\": \"aR3NWVOs\",\n \"sequence\": 4\n },\n \"process\": {\n \"pid\": 2012,\n \"name\": \"regsvr32.exe\",\n \"command_line\": \"regsvr32.exe /s /u /i:https://...RegSvr32.sct scrobj.dll\",\n \"executable\": \"C:\\\\Windows\\\\System32\\\\regsvr32.exe\"\n }\n }\n }\n ]\n }\n ]\n }\n}" } diff --git a/specification/esql/query/EsqlQueryApiRequestExample1.json b/specification/esql/query/EsqlQueryApiRequestExample1.json deleted file mode 100644 index 40668e4211..0000000000 --- a/specification/esql/query/EsqlQueryApiRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Returns results for an ES|QL query.", - "method_request": "POST /_query", - "description": "", - "type": "request", - "value": "{\n \"query\": \"\"\"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\"\n}" -} diff --git a/specification/esql/query/examples/request/QueryRequestExample1.yaml b/specification/esql/query/examples/request/QueryRequestExample1.yaml new file mode 100644 index 0000000000..e6167f7175 --- /dev/null +++ b/specification/esql/query/examples/request/QueryRequestExample1.yaml @@ -0,0 +1,14 @@ +# summary: +# method_request: POST /_query +description: Run `POST /_query` to get results for an ES|QL query. +# type: request +value: |- + { + "query": """ + FROM library + | EVAL year = DATE_TRUNC(1 YEARS, release_date) + | STATS MAX(page_count) BY year + | SORT year + | LIMIT 5 + """ + } diff --git a/specification/features/get_features/FeaturesApiResponseExample1.json b/specification/features/get_features/FeaturesApiResponseExample1.json deleted file mode 100644 index 74d1988e48..0000000000 --- a/specification/features/get_features/FeaturesApiResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for retrieving a list of feature states that can be included when taking a snapshot.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"features\": [\n {\n \"name\": \"tasks\",\n \"description\": \"Manages task results\"\n },\n {\n \"name\": \"kibana\",\n \"description\": \"Manages Kibana configuration and reports\"\n }\n ]\n}" -} diff --git a/specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml b/specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml new file mode 100644 index 0000000000..ec118dc803 --- /dev/null +++ b/specification/features/get_features/examples/response/GetFeaturesResponseExample1.yaml @@ -0,0 +1,17 @@ +# summary: +description: A successful response for retrieving a list of feature states that can be included when taking a snapshot. +# type: response +# response_code: 200 +value: |- + { + "features": [ + { + "name": "tasks", + "description": "Manages task results" + }, + { + "name": "kibana", + "description": "Manages Kibana configuration and reports" + } + ] + } diff --git a/specification/features/reset_features/ResetFeaturesResponseExample1.json b/specification/features/reset_features/ResetFeaturesResponseExample1.json deleted file mode 100644 index cb4a805e69..0000000000 --- a/specification/features/reset_features/ResetFeaturesResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response for clearing state information stored in system indices by Elasticsearch features.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"features\" : [\n {\n \"feature_name\" : \"security\",\n \"status\" : \"SUCCESS\"\n },\n {\n \"feature_name\" : \"tasks\",\n \"status\" : \"SUCCESS\"\n }\n ]\n}" -} diff --git a/specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml b/specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml new file mode 100644 index 0000000000..626365ae8a --- /dev/null +++ b/specification/features/reset_features/examples/response/ResetFeaturesResponseExample1.yaml @@ -0,0 +1,17 @@ +# summary: +description: A successful response for clearing state information stored in system indices by Elasticsearch features. +# type: response +# response_code: 200 +value: |- + { + "features" : [ + { + "feature_name" : "security", + "status" : "SUCCESS" + }, + { + "feature_name" : "tasks", + "status" : "SUCCESS" + } + ] + } diff --git a/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml b/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml new file mode 100644 index 0000000000..415f92ebd8 --- /dev/null +++ b/specification/graph/explore/examples/request/GraphExploreRequestExample1.yaml @@ -0,0 +1,28 @@ +# summary: +# method_request: POST clicklogs/_graph/explore +description: > + Run `POST clicklogs/_graph/explore` for a basic exploration + An initial graph explore query typically begins with a query to identify strongly related terms. + Seed the exploration with a query. This example is searching `clicklogs` for people who searched for the term `midi`.Identify the vertices to include in the graph. This example is looking for product codes that are significantly associated with searches for `midi`. + Find the connections. This example is looking for other search terms that led people to click on the products that are associated with searches for `midi`. +# type: request +value: |- + { + "query": { + "match": { + "query.raw": "midi" + } + }, + "vertices": [ + { + "field": "product" + } + ], + "connections": { + "vertices": [ + { + "field": "query.raw" + } + ] + } + } diff --git a/specification/graph/explore/graphExploreRequestExample1.json b/specification/graph/explore/graphExploreRequestExample1.json deleted file mode 100644 index 2d0a7f7632..0000000000 --- a/specification/graph/explore/graphExploreRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "An initial graph explore query to identify strongly related terms.", - "method_request": "POST clicklogs/_graph/explore", - "description": "", - "type": "request", - "value": "{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}" -} diff --git a/specification/ilm/_types/Policy.ts b/specification/ilm/_types/Policy.ts index b3a000fddb..565d055bb2 100644 --- a/specification/ilm/_types/Policy.ts +++ b/specification/ilm/_types/Policy.ts @@ -22,5 +22,8 @@ import { Phases } from './Phase' export class Policy { phases: Phases + /** + * Arbitrary metadata that is not automatically generated or used by Elasticsearch. + */ _meta?: Metadata } diff --git a/specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json b/specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json deleted file mode 100644 index e1475de8c1..0000000000 --- a/specification/ilm/delete_lifecycle/DeleteLifecycleResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when deleting a lifecycle policy.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\": true\n}" -} diff --git a/specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml b/specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..ef833dfe38 --- /dev/null +++ b/specification/ilm/delete_lifecycle/examples/response/DeleteLifecycleResponseExample1.yaml @@ -0,0 +1,8 @@ +# summary: +description: A successful response when deleting a lifecycle policy. +# type: response +# response_code: 200 +value: |- + { + "acknowledged": true + } diff --git a/specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json b/specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json deleted file mode 100644 index 88df4c82b3..0000000000 --- a/specification/ilm/explain_lifecycle/ExplainLifecycleResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when retrieving the current ILM status for an index.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"indices\": {\n \"my-index-000001\": {\n \"index\": \"my-index-000001\",\n \"index_creation_date_millis\": 1538475653281,\n \"index_creation_date\": \"2018-10-15T13:45:21.981Z\",\n \"time_since_index_creation\": \"15s\",\n \"managed\": true,\n \"policy\": \"my_policy\",\n \"lifecycle_date_millis\": 1538475653281,\n \"lifecycle_date\": \"2018-10-15T13:45:21.981Z\",\n \"age\": \"15s\",\n \"phase\": \"new\",\n \"phase_time_millis\": 1538475653317,\n \"phase_time\": \"2018-10-15T13:45:22.577Z\",\n \"action\": \"complete\"\n \"action_time_millis\": 1538475653317,\n \"action_time\": \"2018-10-15T13:45:22.577Z\",\n \"step\": \"complete\",\n \"step_time_millis\": 1538475653317,\n \"step_time\": \"2018-10-15T13:45:22.577Z\"\n }\n }\n}" -} diff --git a/specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml b/specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..35d8a21b97 --- /dev/null +++ b/specification/ilm/explain_lifecycle/examples/response/ExplainLifecycleResponseExample1.yaml @@ -0,0 +1,29 @@ +# summary: +description: A successful response when retrieving the current ILM status for an index. +# type: response +# response_code: 200 +value: |- + { + "indices": { + "my-index-000001": { + "index": "my-index-000001", + "index_creation_date_millis": 1538475653281, + "index_creation_date": "2018-10-15T13:45:21.981Z", + "time_since_index_creation": "15s", + "managed": true, + "policy": "my_policy", + "lifecycle_date_millis": 1538475653281, + "lifecycle_date": "2018-10-15T13:45:21.981Z", + "age": "15s", + "phase": "new", + "phase_time_millis": 1538475653317, + "phase_time": "2018-10-15T13:45:22.577Z", + "action": "complete" + "action_time_millis": 1538475653317, + "action_time": "2018-10-15T13:45:22.577Z", + "step": "complete", + "step_time_millis": 1538475653317, + "step_time": "2018-10-15T13:45:22.577Z" + } + } + } diff --git a/specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json b/specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json deleted file mode 100644 index a532955ccd..0000000000 --- a/specification/ilm/get_lifecycle/GetLifecycleResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when retrieving a lifecycle policy.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"my_policy\": {\n \"version\": 1,\n \"modified_date\": 82392349,\n \"policy\": {\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {\n \"delete_searchable_snapshot\": true\n }\n }\n }\n }\n },\n \"in_use_by\" : {\n \"indices\" : [],\n \"data_streams\" : [],\n \"composable_templates\" : []\n }\n }\n}" -} diff --git a/specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml b/specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..b4938d0ed0 --- /dev/null +++ b/specification/ilm/get_lifecycle/examples/response/GetLifecycleResponseExample1.yaml @@ -0,0 +1,36 @@ +# summary: +description: A successful response when retrieving a lifecycle policy. +# type: response +# response_code: 200 +value: |- + { + "my_policy": { + "version": 1, + "modified_date": 82392349, + "policy": { + "phases": { + "warm": { + "min_age": "10d", + "actions": { + "forcemerge": { + "max_num_segments": 1 + } + } + }, + "delete": { + "min_age": "30d", + "actions": { + "delete": { + "delete_searchable_snapshot": true + } + } + } + } + }, + "in_use_by" : { + "indices" : [], + "data_streams" : [], + "composable_templates" : [] + } + } + } diff --git a/specification/ilm/get_status/GetILMStatusResponseExample1.json b/specification/ilm/get_status/GetILMStatusResponseExample1.json deleted file mode 100644 index 6625442df4..0000000000 --- a/specification/ilm/get_status/GetILMStatusResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when retrieving the current ILM status.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"operation_mode\": \"RUNNING\"\n}" -} diff --git a/specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml b/specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml new file mode 100644 index 0000000000..11cb6e1877 --- /dev/null +++ b/specification/ilm/get_status/examples/response/GetILMStatusResponseExample1.yaml @@ -0,0 +1,8 @@ +# summary: +description: A successful response when retrieving the current ILM status. +# type: response +# response_code: 200 +value: |- + { + "operation_mode": "RUNNING" + } diff --git a/specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json b/specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json deleted file mode 100644 index d9c927ccbc..0000000000 --- a/specification/ilm/migrate_to_data_tiers/MigrateToDataTiersRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Migrates indices, ILM policies, and templates from using custom node attributes to using data tiers.", - "method_request": "POST /_ilm/migrate_to_data_tiers", - "description": "The example migrates the indices, ILM policies, legacy templates, composable, and component templates away from defining custom allocation filtering using the custom_attribute_name node attribute, and deletes the legacy template with name global-template if it exists in the system.", - "type": "request", - "value": "{\n \"legacy_template_to_delete\": \"global-template\",\n \"node_attribute\": \"custom_attribute_name\"\n}" -} diff --git a/specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json b/specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json deleted file mode 100644 index 967358c543..0000000000 --- a/specification/ilm/migrate_to_data_tiers/MigrateToDataTiersResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when migrating indices, ILMs, and templates from custom node attributes to data tiers.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"dry_run\": false,\n \"removed_legacy_template\":\"global-template\",\n \"migrated_ilm_policies\":[\"policy_with_allocate_action\"],\n \"migrated_indices\":[\"warm-index-to-migrate-000001\"],\n \"migrated_legacy_templates\":[\"a-legacy-template\"],\n \"migrated_composable_templates\":[\"a-composable-template\"],\n \"migrated_component_templates\":[\"a-component-template\"]\n}" -} diff --git a/specification/ilm/migrate_to_data_tiers/Response.ts b/specification/ilm/migrate_to_data_tiers/Response.ts index 5fb556a568..310b3a04d0 100644 --- a/specification/ilm/migrate_to_data_tiers/Response.ts +++ b/specification/ilm/migrate_to_data_tiers/Response.ts @@ -22,11 +22,30 @@ import { Indices } from '@_types/common' export class Response { body: { dry_run: boolean + /** + * The name of the legacy index template that was deleted. + * This information is missing if no legacy index templates were deleted. + */ removed_legacy_template: string + /** + * The ILM policies that were updated. + */ migrated_ilm_policies: string[] + /** + * The indices that were migrated to tier preference routing. + */ migrated_indices: Indices + /** + * The legacy index templates that were updated to not contain custom routing settings for the provided data attribute. + */ migrated_legacy_templates: string[] + /** + * The composable index templates that were updated to not contain custom routing settings for the provided data attribute. + */ migrated_composable_templates: string[] + /** + * The component templates that were updated to not contain custom routing settings for the provided data attribute. + */ migrated_component_templates: string[] } } diff --git a/specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml b/specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml new file mode 100644 index 0000000000..bba220818a --- /dev/null +++ b/specification/ilm/migrate_to_data_tiers/examples/request/RequestExample1.yaml @@ -0,0 +1,11 @@ +# summary: 'Migrates indices, ILM policies, and templates from using custom node attributes to using data tiers.' +# method_request: POST /_ilm/migrate_to_data_tiers +description: > + Run `POST /_ilm/migrate_to_data_tiers` to migrate the indices, ILM policies, legacy templates, composable, and component templates away from defining custom allocation filtering using the `custom_attribute_name` node attribute. + It also deletes the legacy template with name `global-template` if it exists in the system. +# type: request +value: |- + { + "legacy_template_to_delete": "global-template", + "node_attribute": "custom_attribute_name" + } diff --git a/specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml b/specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml new file mode 100644 index 0000000000..97f3c6acdc --- /dev/null +++ b/specification/ilm/migrate_to_data_tiers/examples/response/ResponseExample1.yaml @@ -0,0 +1,15 @@ +# summary: +description: > + A successful response when migrating indices, ILMs, and templates from custom node attributes to data tiers. +# type: response +# response_code: 200 +value: |- + { + "dry_run": false, + "removed_legacy_template":"global-template", + "migrated_ilm_policies":["policy_with_allocate_action"], + "migrated_indices":["warm-index-to-migrate-000001"], + "migrated_legacy_templates":["a-legacy-template"], + "migrated_composable_templates":["a-composable-template"], + "migrated_component_templates":["a-component-template"] + } diff --git a/specification/ilm/move_to_step/MoveToStepRequest.ts b/specification/ilm/move_to_step/MoveToStepRequest.ts index 6c29091798..b3922f98e2 100644 --- a/specification/ilm/move_to_step/MoveToStepRequest.ts +++ b/specification/ilm/move_to_step/MoveToStepRequest.ts @@ -45,7 +45,13 @@ export interface Request extends RequestBase { index: IndexName } body: { + /** + * The step that the index is expected to be in. + */ current_step: StepKey + /** + * The step that you want to run. + */ next_step: StepKey } } diff --git a/specification/ilm/move_to_step/MoveToStepRequestExample1.json b/specification/ilm/move_to_step/MoveToStepRequestExample1.json deleted file mode 100644 index 62c1f2cf57..0000000000 --- a/specification/ilm/move_to_step/MoveToStepRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Triggers execution of a specific step in a lifecycle policy.", - "method_request": "POST _ilm/move/my-index-000001", - "description": "", - "type": "request", - "value": "{\n \"current_step\": {\n \"phase\": \"new\",\n \"action\": \"complete\",\n \"name\": \"complete\"\n },\n \"next_step\": {\n \"phase\": \"warm\",\n \"action\": \"forcemerge\",\n \"name\": \"forcemerge\"\n }\n}" -} diff --git a/specification/ilm/move_to_step/MoveToStepResponseExample1.json b/specification/ilm/move_to_step/MoveToStepResponseExample1.json deleted file mode 100644 index 917e9b0d6b..0000000000 --- a/specification/ilm/move_to_step/MoveToStepResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when triggering execution of a specific step in a lifecycle policy.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\": true\n}" -} diff --git a/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml new file mode 100644 index 0000000000..feab8ad65c --- /dev/null +++ b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample1.yaml @@ -0,0 +1,18 @@ +summary: Move to forcemerge step +# method_request: POST _ilm/move/my-index-000001 +description: > + Run `POST _ilm/move/my-index-000001` to move `my-index-000001` from the initial step to the `forcemerge` step. +# type: request +value: |- + { + "current_step": { + "phase": "new", + "action": "complete", + "name": "complete" + }, + "next_step": { + "phase": "warm", + "action": "forcemerge", + "name": "forcemerge" + } + } diff --git a/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml new file mode 100644 index 0000000000..cb9341e1c5 --- /dev/null +++ b/specification/ilm/move_to_step/examples/request/MoveToStepRequestExample2.yaml @@ -0,0 +1,16 @@ +summary: Move to warm step +# method_request: POST _ilm/move/my-index-000001 +description: > + Run `POST _ilm/move/my-index-000001` to move `my-index-000001` from the end of hot phase into the start of warm. +# type: request +value: |- + { + "current_step": { + "phase": "hot", + "action": "complete", + "name": "complete" + }, + "next_step": { + "phase": "warm" + } + } diff --git a/specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml b/specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml new file mode 100644 index 0000000000..b4e2a7776f --- /dev/null +++ b/specification/ilm/move_to_step/examples/response/MoveToStepResponseExample1.yaml @@ -0,0 +1,9 @@ +# summary: +description: > + A successful response when running a specific step in a lifecycle policy. +# type: response +# response_code: 200 +value: |- + { + "acknowledged": true + } diff --git a/specification/ilm/move_to_step/types.ts b/specification/ilm/move_to_step/types.ts index f15c0df8fd..7182c4f8fd 100644 --- a/specification/ilm/move_to_step/types.ts +++ b/specification/ilm/move_to_step/types.ts @@ -19,7 +19,13 @@ export class StepKey { // action and name are optional in case they are used in next_step + /** + * The optional action to which the index will be moved. + */ action?: string + /** + * The optional step name to which the index will be moved. + */ name?: string phase: string } diff --git a/specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json b/specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json deleted file mode 100644 index 02a9c357cc..0000000000 --- a/specification/ilm/put_lifecycle/PutLifecycleRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Creates a lifecycle policy.", - "method_request": "PUT _ilm/policy/my_policy", - "description": "", - "type": "request", - "value": "{\n \"policy\": {\n \"_meta\": {\n \"description\": \"used for nginx log\",\n \"project\": {\n \"name\": \"myProject\",\n \"department\": \"myDepartment\"\n }\n },\n \"phases\": {\n \"warm\": {\n \"min_age\": \"10d\",\n \"actions\": {\n \"forcemerge\": {\n \"max_num_segments\": 1\n }\n }\n },\n \"delete\": {\n \"min_age\": \"30d\",\n \"actions\": {\n \"delete\": {}\n }\n }\n }\n }\n}" -} diff --git a/specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json b/specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json deleted file mode 100644 index 2814c68c17..0000000000 --- a/specification/ilm/put_lifecycle/PutLifecycleResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when creating a new lifecycle policy.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\": true\n}" -} diff --git a/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml b/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml new file mode 100644 index 0000000000..025a101808 --- /dev/null +++ b/specification/ilm/put_lifecycle/examples/request/PutLifecycleRequestExample1.yaml @@ -0,0 +1,33 @@ +# summary: +# method_request: PUT _ilm/policy/my_policy +description: > + Run `PUT _ilm/policy/my_policy` to create a new policy with arbitrary metadata. +# type: request +value: |- + { + "policy": { + "_meta": { + "description": "used for nginx log", + "project": { + "name": "myProject", + "department": "myDepartment" + } + }, + "phases": { + "warm": { + "min_age": "10d", + "actions": { + "forcemerge": { + "max_num_segments": 1 + } + } + }, + "delete": { + "min_age": "30d", + "actions": { + "delete": {} + } + } + } + } + } diff --git a/specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml b/specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml new file mode 100644 index 0000000000..44465ac3a6 --- /dev/null +++ b/specification/ilm/put_lifecycle/examples/response/PutLifecycleResponseExample1.yaml @@ -0,0 +1,8 @@ +# summary: +description: A successful response when creating a new lifecycle policy. +# type: response +# response_code: 200 +value: |- + { + "acknowledged": true + } diff --git a/specification/ilm/remove_policy/RemovePolicyResponseExample1.json b/specification/ilm/remove_policy/RemovePolicyResponseExample1.json deleted file mode 100644 index 233c103bd9..0000000000 --- a/specification/ilm/remove_policy/RemovePolicyResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when removing a lifecycle policy from an index.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"has_failures\" : false,\n \"failed_indexes\" : []\n}" -} diff --git a/specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml b/specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml new file mode 100644 index 0000000000..148a0680eb --- /dev/null +++ b/specification/ilm/remove_policy/examples/response/RemovePolicyResponseExample1.yaml @@ -0,0 +1,9 @@ +# summary: +description: A successful response when removing a lifecycle policy from an index. +# type: response +# response_code: 200 +value: |- + { + "has_failures" : false, + "failed_indexes" : [] + } diff --git a/specification/ilm/start/StartILMResponseExample1.json b/specification/ilm/start/StartILMResponseExample1.json deleted file mode 100644 index 78c44e5db1..0000000000 --- a/specification/ilm/start/StartILMResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when stating the ILM plugin.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\": true\n}" -} diff --git a/specification/ilm/start/examples/response/StartILMResponseExample1.yaml b/specification/ilm/start/examples/response/StartILMResponseExample1.yaml new file mode 100644 index 0000000000..153aaf2582 --- /dev/null +++ b/specification/ilm/start/examples/response/StartILMResponseExample1.yaml @@ -0,0 +1,8 @@ +# summary: +description: A successful response when stating the ILM plugin. +# type: response +# response_code: 200 +value: |- + { + "acknowledged": true + } diff --git a/specification/ilm/stop/StopILMResponseExample1.json b/specification/ilm/stop/StopILMResponseExample1.json deleted file mode 100644 index eda703fcd7..0000000000 --- a/specification/ilm/stop/StopILMResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when stopping the ILM plugin.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"acknowledged\": true\n}" -} diff --git a/specification/ilm/stop/examples/response/StopILMResponseExample1.yaml b/specification/ilm/stop/examples/response/StopILMResponseExample1.yaml new file mode 100644 index 0000000000..6cdb10c16a --- /dev/null +++ b/specification/ilm/stop/examples/response/StopILMResponseExample1.yaml @@ -0,0 +1,8 @@ +# summary: +description: A successful response when stopping the ILM plugin. +# type: response +# response_code: 200 +value: |- + { + "acknowledged": true + } diff --git a/specification/indices/close/CloseIndexResponseExample1.yaml b/specification/indices/close/examples/response/CloseIndexResponseExample1.yaml similarity index 100% rename from specification/indices/close/CloseIndexResponseExample1.yaml rename to specification/indices/close/examples/response/CloseIndexResponseExample1.yaml diff --git a/specification/indices/resolve_index/ResolveIndexResponseExample1.yaml b/specification/indices/resolve_index/examples/response/ResolveIndexResponseExample1.yaml similarity index 100% rename from specification/indices/resolve_index/ResolveIndexResponseExample1.yaml rename to specification/indices/resolve_index/examples/response/ResolveIndexResponseExample1.yaml diff --git a/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequestExample1.json b/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequestExample1.json deleted file mode 100644 index 588cd79c5e..0000000000 --- a/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequestExample1.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "summary": "A request of estimating model memory limit based on the analysis configuration details provided in the body.", - "method_request": "POST _ml/anomaly_detectors/_estimate_model_memory", - "description": "", - "type": "request", - "value": { - "analysis_config": { - "bucket_span": "5m", - "detectors": [ - { - "function": "sum", - "field_name": "bytes", - "by_field_name": "status", - "partition_field_name": "app" - } - ], - "influencers": ["source_ip", "dest_ip"] - }, - "overall_cardinality": { - "status": 10, - "app": 50 - }, - "max_bucket_cardinality": { - "source_ip": 300, - "dest_ip": 30 - } - } -} diff --git a/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponseExample1.json b/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponseExample1.json deleted file mode 100644 index 0014b45bf3..0000000000 --- a/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponseExample1.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "summary": "A successful response when estimating sufficent memory for a model.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "model_memory_estimate": "21mb" - } -} diff --git a/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml b/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml new file mode 100644 index 0000000000..18d621aa4a --- /dev/null +++ b/specification/ml/estimate_model_memory/examples/request/MlEstimateModelMemoryRequestExample1.yaml @@ -0,0 +1,21 @@ +# summary: +# method_request: POST _ml/anomaly_detectors/_estimate_model_memory +description: Run `POST _ml/anomaly_detectors/_estimate_model_memory` to estimate the model memory limit based on the analysis configuration details provided in the request body. +# type: request +value: + analysis_config: + bucket_span: 5m + detectors: + - function: sum + field_name: bytes + by_field_name: status + partition_field_name: app + influencers: + - source_ip + - dest_ip + overall_cardinality: + status: 10 + app: 50 + max_bucket_cardinality: + source_ip: 300 + dest_ip: 30 diff --git a/specification/ml/estimate_model_memory/examples/response/MlEstimateModelMemoryResponseExample1.yaml b/specification/ml/estimate_model_memory/examples/response/MlEstimateModelMemoryResponseExample1.yaml new file mode 100644 index 0000000000..cad8f96906 --- /dev/null +++ b/specification/ml/estimate_model_memory/examples/response/MlEstimateModelMemoryResponseExample1.yaml @@ -0,0 +1,6 @@ +# summary: +description: A successful response from `POST _ml/anomaly_detectors/_estimate_model_memory`. +type: response +response_code: 200 +value: + model_memory_estimate: 21mb diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestClassificationExample1.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestClassificationExample1.json deleted file mode 100644 index f2800e1372..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestClassificationExample1.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "summary": "A request for evaluating a classification job for an annotated index.", - "method_request": "POST _ml/data_frame/_evaluate", - "description": "The `actual_field` contains the ground truth for classification. The `predicted_field` contains the predicted value calculated by the classification analysis.", - "type": "request", - "value": { - "index": "animal_classification", - "evaluation": { - "classification": { - "actual_field": "animal_class", - "predicted_field": "ml.animal_class_prediction", - "metrics": { - "multiclass_confusion_matrix": {} - } - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestClassificationExample2.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestClassificationExample2.json deleted file mode 100644 index 7a6455fc32..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestClassificationExample2.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "summary": "A request for evaluating a classification job with AUC ROC metrics for an annotated index.", - "method_request": "POST _ml/data_frame/_evaluate", - "description": "The `class_name` specifies the class name that is treated as positive during the evaluation, all the other classes are treated as negative.", - "type": "request", - "value": { - "index": "animal_classification", - "evaluation": { - "classification": { - "actual_field": "animal_class", - "metrics": { - "auc_roc": { - "class_name": "dog" - } - } - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestOutlierExample.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestOutlierExample.json deleted file mode 100644 index 70ba2895bb..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestOutlierExample.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "summary": "A request for evaluating an outlier detection job for an annotated index.", - "method_request": "POST _ml/data_frame/_evaluate", - "description": "", - "type": "request", - "value": { - "index": "my_analytics_dest_index", - "evaluation": { - "outlier_detection": { - "actual_field": "is_outlier", - "predicted_probability_field": "ml.outlier_score" - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestRegressionExample1.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestRegressionExample1.json deleted file mode 100644 index bc00ae3b94..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestRegressionExample1.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "summary": "A request for evaluating the testing error of a regression job for an annotated index.", - "method_request": "POST _ml/data_frame/_evaluate", - "description": "The term query in the body limits evaluation to be performed on the test split only. The `actual_field` contains the ground truth for house prices. The `predicted_field` contains the house price calculated by the regression analysis.", - "type": "request", - "value": { - "index": "house_price_predictions", - "query": { - "bool": { - "filter": [ - { - "term": { - "ml.is_training": false - } - } - ] - } - }, - "evaluation": { - "regression": { - "actual_field": "price", - "predicted_field": "ml.price_prediction", - "metrics": { - "r_squared": {}, - "mse": {}, - "msle": { - "offset": 10 - }, - "huber": { - "delta": 1.5 - } - } - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestRegressionExample2.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestRegressionExample2.json deleted file mode 100644 index 6d3b3e23b1..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequestRegressionExample2.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "summary": "A request for evaluating the training error of a regression job for an annotated index.", - "method_request": "POST _ml/data_frame/_evaluate", - "description": "The term query in the body limits evaluation to be performed on the training split only. The `actual_field` contains the ground truth for house prices. The `predicted_field` contains the house price calculated by the regression analysis.", - "type": "request", - "value": { - "index": "house_price_predictions", - "query": { - "term": { - "ml.is_training": { - "value": true - } - } - }, - "evaluation": { - "regression": { - "actual_field": "price", - "predicted_field": "ml.price_prediction", - "metrics": { - "r_squared": {}, - "mse": {}, - "msle": {}, - "huber": {} - } - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts index d8653047cc..ac379cefab 100644 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts +++ b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts @@ -26,8 +26,19 @@ import { /** @variants container */ export class Response { body: { + /** + * Evaluation results for a classification analysis. + * It outputs a prediction that identifies to which of the classes each document belongs. + */ classification?: DataframeClassificationSummary + /** + * Evaluation results for an outlier detection analysis. + * It outputs the probability that each document is an outlier. + */ outlier_detection?: DataframeOutlierDetectionSummary + /** + * Evaluation results for a regression analysis which outputs a prediction of values. + */ regression?: DataframeRegressionSummary } } diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseClassificationExample1.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseClassificationExample1.json deleted file mode 100644 index 6d7af67df6..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseClassificationExample1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "summary": "A succesful response for evaluating a classification analysis job for an annotated index.", - "description": "The `actual_class` contains the name of the class the analysis tried to predict. The `actual_class_doc_count` is the number of documents in the index belonging to the `actual_class`. The `predicted_classes` object contains the list of the predicted classes and the number of predictions associated with the class.", - "type": "response", - "response_code": 200, - "value": { - "classification": { - "multiclass_confusion_matrix": { - "confusion_matrix": [ - { - "actual_class": "cat", - "actual_class_doc_count": 12, - "predicted_classes": [ - { - "predicted_class": "cat", - "count": 12 - }, - { - "predicted_class": "dog", - "count": 0 - } - ], - "other_predicted_class_doc_count": 0 - }, - { - "actual_class": "dog", - "actual_class_doc_count": 11, - "predicted_classes": [ - { - "predicted_class": "dog", - "count": 7 - }, - { - "predicted_class": "cat", - "count": 4 - } - ], - "other_predicted_class_doc_count": 0 - } - ], - "other_actual_class_count": 0 - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseClassificationExample2.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseClassificationExample2.json deleted file mode 100644 index e6028069a2..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseClassificationExample2.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "summary": "A succesful response for evaluating a classification analysis job with the AUC ROC metrics for an annotated index.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "classification": { - "auc_roc": { - "value": 0.8941788639536681 - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseOutlierExample.json b/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseOutlierExample.json deleted file mode 100644 index 7ccab7602c..0000000000 --- a/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponseOutlierExample.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "summary": "A successful response when evaluating an outlier detection job.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "outlier_detection": { - "auc_roc": { - "value": 0.92584757746414444 - }, - "confusion_matrix": { - "0.25": { - "tp": 5, - "fp": 9, - "tn": 204, - "fn": 5 - }, - "0.5": { - "tp": 1, - "fp": 5, - "tn": 208, - "fn": 9 - }, - "0.75": { - "tp": 0, - "fp": 4, - "tn": 209, - "fn": 10 - } - }, - "precision": { - "0.25": 0.35714285714285715, - "0.5": 0.16666666666666666, - "0.75": 0 - }, - "recall": { - "0.25": 0.5, - "0.5": 0.1, - "0.75": 0 - } - } - } -} diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestClassificationExample1.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestClassificationExample1.yaml new file mode 100644 index 0000000000..d81981d26f --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestClassificationExample1.yaml @@ -0,0 +1,15 @@ +summary: Classification example 1 +# method_request: POST _ml/data_frame/_evaluate +description: > + Run `POST _ml/data_frame/_evaluate` to evaluate a a classification job for an annotated index. + The `actual_field` contains the ground truth for classification. + The `predicted_field` contains the predicted value calculated by the classification analysis. +type: request +value: + index: animal_classification + evaluation: + classification: + actual_field: animal_class + predicted_field: ml.animal_class_prediction + metrics: + multiclass_confusion_matrix: {} diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestClassificationExample2.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestClassificationExample2.yaml new file mode 100644 index 0000000000..a218efcbb2 --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestClassificationExample2.yaml @@ -0,0 +1,15 @@ +summary: Classification example 2 +# method_request: POST _ml/data_frame/_evaluate +description: > + Run `POST _ml/data_frame/_evaluate` to evaluate a classification job with AUC ROC metrics for an annotated index. + The `actual_field` contains the ground truth value for the actual animal classification. This is required in order to evaluate results. + The `class_name` specifies the class name that is treated as positive during the evaluation, all the other classes are treated as negative. +# type: request +value: + index: animal_classification + evaluation: + classification: + actual_field: animal_class + metrics: + auc_roc: + class_name: dog diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestOutlierExample.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestOutlierExample.yaml new file mode 100644 index 0000000000..d769f5fbb0 --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestOutlierExample.yaml @@ -0,0 +1,11 @@ +summary: Outlier detection +# method_request: POST _ml/data_frame/_evaluate +description: > + Run `POST _ml/data_frame/_evaluate` to evaluate an outlier detection job for an annotated index. +# type: request +value: + index: my_analytics_dest_index + evaluation: + outlier_detection: + actual_field: is_outlier + predicted_probability_field: ml.outlier_score diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestRegressionExample1.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestRegressionExample1.yaml new file mode 100644 index 0000000000..5e5a29f9af --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestRegressionExample1.yaml @@ -0,0 +1,26 @@ +summary: Regression example 1 +# method_request: POST _ml/data_frame/_evaluate +description: > + Run `POST _ml/data_frame/_evaluate` to evaluate the testing error of a regression job for an annotated index. + The term query in the body limits evaluation to be performed on the test split only. + The `actual_field` contains the ground truth for house prices. + The `predicted_field` contains the house price calculated by the regression analysis. +type: request +value: + index: house_price_predictions + query: + bool: + filter: + - term: + ml.is_training: false + evaluation: + regression: + actual_field: price + predicted_field: ml.price_prediction + metrics: + r_squared: {} + mse: {} + msle: + offset: 10 + huber: + delta: 1.5 diff --git a/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestRegressionExample2.yaml b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestRegressionExample2.yaml new file mode 100644 index 0000000000..a220f93c03 --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/request/MlEvaluateDataFrameRequestRegressionExample2.yaml @@ -0,0 +1,23 @@ +summary: Regression example 2 +# method_request: POST _ml/data_frame/_evaluate +description: > + Run `POST _ml/data_frame/_evaluate` to evaluate the training error of a regression job for an annotated index. + The term query in the body limits evaluation to be performed on the training split only. + The `actual_field` contains the ground truth for house prices. + The `predicted_field` contains the house price calculated by the regression analysis. +type: request +value: + index: house_price_predictions + query: + term: + ml.is_training: + value: true + evaluation: + regression: + actual_field: price + predicted_field: ml.price_prediction + metrics: + r_squared: {} + mse: {} + msle: {} + huber: {} diff --git a/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseClassificationExample1.yaml b/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseClassificationExample1.yaml new file mode 100644 index 0000000000..f6a8617597 --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseClassificationExample1.yaml @@ -0,0 +1,29 @@ +summary: Classification example 1 +description: > + A succesful response from `POST _ml/data_frame/_evaluate` to evaluate a classification analysis job for an annotated index. + The `actual_class` contains the name of the class the analysis tried to predict. + The `actual_class_doc_count` is the number of documents in the index belonging to the `actual_class`. + The `predicted_classes` object contains the list of the predicted classes and the number of predictions associated with the class. +# type: response +# response_code: 200 +value: + classification: + multiclass_confusion_matrix: + confusion_matrix: + - actual_class: cat + actual_class_doc_count: 12 + predicted_classes: + - predicted_class: cat + count: 12 + - predicted_class: dog + count: 0 + other_predicted_class_doc_count: 0 + - actual_class: dog + actual_class_doc_count: 11 + predicted_classes: + - predicted_class: dog + count: 7 + - predicted_class: cat + count: 4 + other_predicted_class_doc_count: 0 + other_actual_class_count: 0 diff --git a/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseClassificationExample2.yaml b/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseClassificationExample2.yaml new file mode 100644 index 0000000000..9099b3f9d0 --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseClassificationExample2.yaml @@ -0,0 +1,9 @@ +summary: Classification example 2 +description: > + A succesful response from `POST _ml/data_frame/_evaluate` to evaluate a classification analysis job with the AUC ROC metrics for an annotated index. +# type: response +# response_code: 200 +value: + classification: + auc_roc: + value: 0.8941788639536681 diff --git a/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseOutlierExample.yaml b/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseOutlierExample.yaml new file mode 100644 index 0000000000..7f1d54cfd9 --- /dev/null +++ b/specification/ml/evaluate_data_frame/examples/response/MlEvaluateDataFrameResponseOutlierExample.yaml @@ -0,0 +1,32 @@ +summary: Outlier detection +description: A successful response from `POST _ml/data_frame/_evaluate` to evaluate an outlier detection job. +# type: response +# response_code: 200 +value: + outlier_detection: + auc_roc: + value: 0.9258475774641445 + confusion_matrix: + '0.25': + tp: 5 + fp: 9 + tn: 204 + fn: 5 + '0.5': + tp: 1 + fp: 5 + tn: 208 + fn: 9 + '0.75': + tp: 0 + fp: 4 + tn: 209 + fn: 10 + precision: + '0.25': 0.35714285714285715 + '0.5': 0.16666666666666666 + '0.75': 0 + recall: + '0.25': 0.5 + '0.5': 0.1 + '0.75': 0 diff --git a/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequestExample1.json b/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequestExample1.json deleted file mode 100644 index 52bc96434e..0000000000 --- a/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequestExample1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "summary": "A request for explaining a data frame analytics job configuration.", - "method_request": "POST _ml/data_frame/analytics/_explain", - "description": "", - "type": "request", - "value": { - "source": { - "index": "houses_sold_last_10_yrs" - }, - "analysis": { - "regression": { - "dependent_variable": "price" - } - } - } -} diff --git a/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponseExample1.json b/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponseExample1.json deleted file mode 100644 index c328bea3f2..0000000000 --- a/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponseExample1.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "summary": "A succesful response for explaining a data frame analytics job configuration.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "field_selection": [ - { - "field": "number_of_bedrooms", - "mappings_types": ["integer"], - "is_included": true, - "is_required": false, - "feature_type": "numerical" - }, - { - "field": "postcode", - "mappings_types": ["text"], - "is_included": false, - "is_required": false, - "reason": "[postcode.keyword] is preferred because it is aggregatable" - }, - { - "field": "postcode.keyword", - "mappings_types": ["keyword"], - "is_included": true, - "is_required": false, - "feature_type": "categorical" - }, - { - "field": "price", - "mappings_types": ["float"], - "is_included": true, - "is_required": true, - "feature_type": "numerical" - } - ], - "memory_estimation": { - "expected_memory_without_disk": "128MB", - "expected_memory_with_disk": "32MB" - } - } -} diff --git a/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml b/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml new file mode 100644 index 0000000000..3901a3a6c3 --- /dev/null +++ b/specification/ml/explain_data_frame_analytics/examples/request/MlExplainDataFrameAnalyticsRequestExample1.yaml @@ -0,0 +1,10 @@ +# summary: +# method_request: POST _ml/data_frame/analytics/_explain +description: Run `POST _ml/data_frame/analytics/_explain` to explain a data frame analytics job configuration. +# type: request +value: + source: + index: houses_sold_last_10_yrs + analysis: + regression: + dependent_variable: price diff --git a/specification/ml/explain_data_frame_analytics/examples/response/MlExplainDataFrameAnalyticsResponseExample1.yaml b/specification/ml/explain_data_frame_analytics/examples/response/MlExplainDataFrameAnalyticsResponseExample1.yaml new file mode 100644 index 0000000000..e1414358e3 --- /dev/null +++ b/specification/ml/explain_data_frame_analytics/examples/response/MlExplainDataFrameAnalyticsResponseExample1.yaml @@ -0,0 +1,33 @@ +# summary: +description: A succesful response for explaining a data frame analytics job configuration. +# type: response +# response_code: 200 +value: + field_selection: + - field: number_of_bedrooms + mappings_types: + - integer + is_included: true + is_required: false + feature_type: numerical + - field: postcode + mappings_types: + - text + is_included: false + is_required: false + reason: '[postcode.keyword] is preferred because it is aggregatable' + - field: postcode.keyword + mappings_types: + - keyword + is_included: true + is_required: false + feature_type: categorical + - field: price + mappings_types: + - float + is_included: true + is_required: true + feature_type: numerical + memory_estimation: + expected_memory_without_disk: 128MB + expected_memory_with_disk: 32MB diff --git a/specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json b/specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json deleted file mode 100644 index 07744936fa..0000000000 --- a/specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsRequestExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "Reloads the keystore on nodes in the cluster.", - "method_request": "POST _nodes/reload_secure_settings", - "description": "", - "type": "request", - "value": "{\n \"secure_settings_password\":\"keystore-password\"\n}" -} diff --git a/specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json b/specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json deleted file mode 100644 index 935831d6ac..0000000000 --- a/specification/nodes/reload_secure_settings/clusterNodesReloadSecureSettingsResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when reloading keystore on nodes in your cluster.", - "description": "", - "type": "response", - "response_code": 200, - "value": "{\n \"_nodes\": {\n \"total\": 1,\n \"successful\": 1,\n \"failed\": 0\n },\n \"cluster_name\": \"my_cluster\",\n \"nodes\": {\n \"pQHNt5rXTTWNvUgOrdynKg\": {\n \"name\": \"node-0\"\n }\n }\n}" -} diff --git a/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml b/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml new file mode 100644 index 0000000000..933effe770 --- /dev/null +++ b/specification/nodes/reload_secure_settings/examples/request/ReloadSecureSettingsRequestExample1.yaml @@ -0,0 +1,8 @@ +# summary: +# method_request: POST _nodes/reload_secure_settings +description: Run `POST _nodes/reload_secure_settings` to reload the keystore on nodes in the cluster. +# type: request +value: |- + { + "secure_settings_password": "keystore-password" + } diff --git a/specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml b/specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml new file mode 100644 index 0000000000..31c4387588 --- /dev/null +++ b/specification/nodes/reload_secure_settings/examples/response/ReloadSecureSettingsResponseExample1.yaml @@ -0,0 +1,18 @@ +# summary: +description: A successful response when reloading keystore on nodes in your cluster. +# type: response +# response_code: 200 +value: |- + { + "_nodes": { + "total": 1, + "successful": 1, + "failed": 0 + }, + "cluster_name": "my_cluster", + "nodes": { + "pQHNt5rXTTWNvUgOrdynKg": { + "name": "node-0" + } + } + } diff --git a/specification/tasks/get/examples/response/GetTaskResponseExample1.yaml b/specification/tasks/get/examples/response/GetTaskResponseExample1.yaml new file mode 100644 index 0000000000..3ec1af7e97 --- /dev/null +++ b/specification/tasks/get/examples/response/GetTaskResponseExample1.yaml @@ -0,0 +1,36 @@ +# summary: +description: A successful response when requesting information about the tasks currently executing in the cluster. +# type: response +# response_code: '' +value: |- + { + "nodes" : { + "oTUltX4IQMOUUVeiohTt8A" : { + "name" : "H5dfFeA", + "transport_address" : "127.0.0.1:9300", + "host" : "127.0.0.1", + "ip" : "127.0.0.1:9300", + "tasks" : { + "oTUltX4IQMOUUVeiohTt8A:124" : { + "node" : "oTUltX4IQMOUUVeiohTt8A", + "id" : 124, + "type" : "direct", + "action" : "cluster:monitor/tasks/lists[n]", + "start_time_in_millis" : 1458585884904, + "running_time_in_nanos" : 47402, + "cancellable" : false, + "parent_task_id" : "oTUltX4IQMOUUVeiohTt8A:123" + }, + "oTUltX4IQMOUUVeiohTt8A:123" : { + "node" : "oTUltX4IQMOUUVeiohTt8A", + "id" : 123, + "type" : "transport", + "action" : "cluster:monitor/tasks/lists", + "start_time_in_millis" : 1458585884904, + "running_time_in_nanos" : 236042, + "cancellable" : false + } + } + } + } + } diff --git a/specification/tasks/get/getTasksResponseExample1.json b/specification/tasks/get/getTasksResponseExample1.json deleted file mode 100644 index 437bf2ab50..0000000000 --- a/specification/tasks/get/getTasksResponseExample1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "summary": "A successful response when requesting information about the tasks currently executing in the cluster.", - "description": "", - "type": "response", - "response_code": "", - "value": "{\n \"nodes\" : {\n \"oTUltX4IQMOUUVeiohTt8A\" : {\n \"name\" : \"H5dfFeA\",\n \"transport_address\" : \"127.0.0.1:9300\",\n \"host\" : \"127.0.0.1\",\n \"ip\" : \"127.0.0.1:9300\",\n \"tasks\" : {\n \"oTUltX4IQMOUUVeiohTt8A:124\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 124,\n \"type\" : \"direct\",\n \"action\" : \"cluster:monitor/tasks/lists[n]\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 47402,\n \"cancellable\" : false,\n \"parent_task_id\" : \"oTUltX4IQMOUUVeiohTt8A:123\"\n },\n \"oTUltX4IQMOUUVeiohTt8A:123\" : {\n \"node\" : \"oTUltX4IQMOUUVeiohTt8A\",\n \"id\" : 123,\n \"type\" : \"transport\",\n \"action\" : \"cluster:monitor/tasks/lists\",\n \"start_time_in_millis\" : 1458585884904,\n \"running_time_in_nanos\" : 236042,\n \"cancellable\" : false\n }\n }\n }\n }\n}" -} diff --git a/specification/transform/preview_transform/PreviewTransformRequestExample1.json b/specification/transform/preview_transform/PreviewTransformRequestExample1.json deleted file mode 100644 index a18c9e7faf..0000000000 --- a/specification/transform/preview_transform/PreviewTransformRequestExample1.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "summary": "A request to preview a transform that uses the pivot method.", - "method_request": "POST _transform/_preview", - "description": "", - "type": "request", - "value": { - "source": { - "index": "kibana_sample_data_ecommerce" - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - } - } -} diff --git a/specification/transform/preview_transform/PreviewTransformResponseExample1.json b/specification/transform/preview_transform/PreviewTransformResponseExample1.json deleted file mode 100644 index f8d8cec8ea..0000000000 --- a/specification/transform/preview_transform/PreviewTransformResponseExample1.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "summary": "A successful response contains a preview a transform that uses the pivot method.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "preview": [ - { - "max_price": 171, - "customer_id": "10" - }, - { - "max_price": 233, - "customer_id": "11" - }, - { - "max_price": 200, - "customer_id": "12" - }, - { - "max_price": 301, - "customer_id": "13" - }, - { - "max_price": 176, - "customer_id": "14" - }, - { - "max_price": 2250, - "customer_id": "15" - }, - { - "max_price": 170, - "customer_id": "16" - }, - { - "max_price": 243, - "customer_id": "17" - }, - { - "max_price": 154, - "customer_id": "18" - }, - { - "max_price": 393, - "customer_id": "19" - }, - { - "max_price": 165, - "customer_id": "20" - }, - { - "max_price": 115, - "customer_id": "21" - }, - { - "max_price": 192, - "customer_id": "22" - }, - { - "max_price": 169, - "customer_id": "23" - }, - { - "max_price": 230, - "customer_id": "24" - }, - { - "max_price": 278, - "customer_id": "25" - }, - { - "max_price": 200, - "customer_id": "26" - }, - { - "max_price": 344, - "customer_id": "27" - }, - { - "max_price": 175, - "customer_id": "28" - }, - { - "max_price": 177, - "customer_id": "29" - }, - { - "max_price": 190, - "customer_id": "30" - }, - { - "max_price": 190, - "customer_id": "31" - }, - { - "max_price": 205, - "customer_id": "32" - }, - { - "max_price": 215, - "customer_id": "33" - }, - { - "max_price": 270, - "customer_id": "34" - }, - { - "max_price": 184, - "customer_id": "36" - }, - { - "max_price": 222, - "customer_id": "37" - }, - { - "max_price": 370, - "customer_id": "38" - }, - { - "max_price": 240, - "customer_id": "39" - }, - { - "max_price": 230, - "customer_id": "4" - }, - { - "max_price": 229, - "customer_id": "41" - }, - { - "max_price": 190, - "customer_id": "42" - }, - { - "max_price": 150, - "customer_id": "43" - }, - { - "max_price": 175, - "customer_id": "44" - }, - { - "max_price": 190, - "customer_id": "45" - }, - { - "max_price": 150, - "customer_id": "46" - }, - { - "max_price": 310, - "customer_id": "48" - }, - { - "max_price": 223, - "customer_id": "49" - }, - { - "max_price": 283, - "customer_id": "5" - }, - { - "max_price": 185, - "customer_id": "50" - }, - { - "max_price": 190, - "customer_id": "51" - }, - { - "max_price": 333, - "customer_id": "52" - }, - { - "max_price": 165, - "customer_id": "6" - }, - { - "max_price": 144, - "customer_id": "7" - }, - { - "max_price": 198, - "customer_id": "8" - }, - { - "max_price": 210, - "customer_id": "9" - } - ], - "generated_dest_index": { - "mappings": { - "_meta": { - "_transform": { - "transform": "transform-preview", - "version": { - "created": "10.0.0" - }, - "creation_date_in_millis": 1712948905889 - }, - "created_by": "transform" - }, - "properties": { - "max_price": { - "type": "half_float" - }, - "customer_id": { - "type": "keyword" - } - } - }, - "settings": { - "index": { - "number_of_shards": "1", - "auto_expand_replicas": "0-1" - } - }, - "aliases": {} - } - } -} diff --git a/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml b/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml new file mode 100644 index 0000000000..ff9d768c11 --- /dev/null +++ b/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.yaml @@ -0,0 +1,17 @@ +# summary: +# method_request: POST _transform/_preview +description: Run `POST _transform/_preview` to preview a transform that uses the pivot method. +# type: request +value: + source: + index: kibana_sample_data_ecommerce + pivot: + group_by: + customer_id: + terms: + field: customer_id + missing_bucket: true + aggregations: + max_price: + max: + field: taxful_total_price diff --git a/specification/transform/preview_transform/examples/response/PreviewTransformResponseExample1.yaml b/specification/transform/preview_transform/examples/response/PreviewTransformResponseExample1.yaml new file mode 100644 index 0000000000..dcac5dda85 --- /dev/null +++ b/specification/transform/preview_transform/examples/response/PreviewTransformResponseExample1.yaml @@ -0,0 +1,117 @@ +# summary: +description: An abbreviated response from `POST _transform/_preview` that contains a preview a transform that uses the pivot method. +# type: response +# response_code: 200 +value: + preview: + - max_price: 171 + customer_id: '10' + - max_price: 233 + customer_id: '11' + - max_price: 200 + customer_id: '12' + - max_price: 301 + customer_id: '13' + - max_price: 176 + customer_id: '14' + - max_price: 2250 + customer_id: '15' + - max_price: 170 + customer_id: '16' + - max_price: 243 + customer_id: '17' + - max_price: 154 + customer_id: '18' + - max_price: 393 + customer_id: '19' + - max_price: 165 + customer_id: '20' + - max_price: 115 + customer_id: '21' + - max_price: 192 + customer_id: '22' + - max_price: 169 + customer_id: '23' + - max_price: 230 + customer_id: '24' + - max_price: 278 + customer_id: '25' + - max_price: 200 + customer_id: '26' + - max_price: 344 + customer_id: '27' + - max_price: 175 + customer_id: '28' + - max_price: 177 + customer_id: '29' + - max_price: 190 + customer_id: '30' + - max_price: 190 + customer_id: '31' + - max_price: 205 + customer_id: '32' + - max_price: 215 + customer_id: '33' + - max_price: 270 + customer_id: '34' + - max_price: 184 + customer_id: '36' + - max_price: 222 + customer_id: '37' + - max_price: 370 + customer_id: '38' + - max_price: 240 + customer_id: '39' + - max_price: 230 + customer_id: '4' + - max_price: 229 + customer_id: '41' + - max_price: 190 + customer_id: '42' + - max_price: 150 + customer_id: '43' + - max_price: 175 + customer_id: '44' + - max_price: 190 + customer_id: '45' + - max_price: 150 + customer_id: '46' + - max_price: 310 + customer_id: '48' + - max_price: 223 + customer_id: '49' + - max_price: 283 + customer_id: '5' + - max_price: 185 + customer_id: '50' + - max_price: 190 + customer_id: '51' + - max_price: 333 + customer_id: '52' + - max_price: 165 + customer_id: '6' + - max_price: 144 + customer_id: '7' + - max_price: 198 + customer_id: '8' + - max_price: 210 + customer_id: '9' + generated_dest_index: + mappings: + _meta: + _transform: + transform: transform-preview + version: + created: 10.0.0 + creation_date_in_millis: 1712948905889 + created_by: transform + properties: + max_price: + type: half_float + customer_id: + type: keyword + settings: + index: + number_of_shards: '1' + auto_expand_replicas: 0-1 + aliases: {} diff --git a/specification/transform/put_transform/PutTransformRequestExample1.json b/specification/transform/put_transform/PutTransformRequestExample1.json deleted file mode 100644 index cad31233a0..0000000000 --- a/specification/transform/put_transform/PutTransformRequestExample1.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "summary": "A request to create a transform that uses the pivot method.", - "method_request": "PUT _transform/ecommerce_transform1", - "description": "", - "type": "request", - "value": { - "source": { - "index": "kibana_sample_data_ecommerce", - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - "description": "Maximum priced ecommerce data by customer_id in Asia", - "dest": { - "index": "kibana_sample_data_ecommerce_transform1", - "pipeline": "add_timestamp_pipeline" - }, - "frequency": "5m", - "sync": { - "time": { - "field": "order_date", - "delay": "60s" - } - }, - "retention_policy": { - "time": { - "field": "order_date", - "max_age": "30d" - } - } - } -} diff --git a/specification/transform/put_transform/PutTransformRequestExample2.json b/specification/transform/put_transform/PutTransformRequestExample2.json deleted file mode 100644 index 62c24069c0..0000000000 --- a/specification/transform/put_transform/PutTransformRequestExample2.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "summary": "A request to create a transform that uses the latest method.", - "method_request": "PUT _transform/ecommerce_transform2", - "description": "", - "type": "request", - "value": { - "source": { - "index": "kibana_sample_data_ecommerce" - }, - "latest": { - "unique_key": ["customer_id"], - "sort": "order_date" - }, - "description": "Latest order for each customer", - "dest": { - "index": "kibana_sample_data_ecommerce_transform2" - }, - "frequency": "5m", - "sync": { - "time": { - "field": "order_date", - "delay": "60s" - } - } - } -} diff --git a/specification/transform/put_transform/PutTransformResponseExample1.json b/specification/transform/put_transform/PutTransformResponseExample1.json deleted file mode 100644 index e8dd3c6f17..0000000000 --- a/specification/transform/put_transform/PutTransformResponseExample1.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "summary": "A successful response when creating a transform.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "acknowledged": true - } -} diff --git a/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml b/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml new file mode 100644 index 0000000000..b6f5fe0ead --- /dev/null +++ b/specification/transform/put_transform/examples/request/PutTransformRequestExample1.yaml @@ -0,0 +1,34 @@ +summary: A pivot transform +# method_request: PUT _transform/ecommerce_transform1 +description: Run `PUT _transform/ecommerce_transform1` to create a transform that uses the pivot method. +# type: request +value: + source: + index: kibana_sample_data_ecommerce + query: + term: + geoip.continent_name: + value: Asia + pivot: + group_by: + customer_id: + terms: + field: customer_id + missing_bucket: true + aggregations: + max_price: + max: + field: taxful_total_price + description: Maximum priced ecommerce data by customer_id in Asia + dest: + index: kibana_sample_data_ecommerce_transform1 + pipeline: add_timestamp_pipeline + frequency: 5m + sync: + time: + field: order_date + delay: 60s + retention_policy: + time: + field: order_date + max_age: 30d diff --git a/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml b/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml new file mode 100644 index 0000000000..8819b1cfdd --- /dev/null +++ b/specification/transform/put_transform/examples/request/PutTransformRequestExample2.yaml @@ -0,0 +1,19 @@ +summary: A latest transform +# method_request: PUT _transform/ecommerce_transform2 +description: Run `PUT _transform/ecommerce_transform2` to create a transform that uses the latest method. +# type: request +value: + source: + index: kibana_sample_data_ecommerce + latest: + unique_key: + - customer_id + sort: order_date + description: Latest order for each customer + dest: + index: kibana_sample_data_ecommerce_transform2 + frequency: 5m + sync: + time: + field: order_date + delay: 60s diff --git a/specification/transform/put_transform/examples/response/PutTransformResponseExample1.yaml b/specification/transform/put_transform/examples/response/PutTransformResponseExample1.yaml new file mode 100644 index 0000000000..cf2fcbd42e --- /dev/null +++ b/specification/transform/put_transform/examples/response/PutTransformResponseExample1.yaml @@ -0,0 +1,6 @@ +# summary: +description: A successful response when creating a transform. +# type: response +# response_code: 200 +value: + acknowledged: true diff --git a/specification/transform/update_transform/UpdateTransformRequestExample1.json b/specification/transform/update_transform/UpdateTransformRequestExample1.json deleted file mode 100644 index be4b83ad6b..0000000000 --- a/specification/transform/update_transform/UpdateTransformRequestExample1.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "summary": "A request to update a transform that uses the pivot method.", - "method_request": "POST _transform/simple-kibana-ecomm-pivot/_update", - "description": "", - "type": "request", - "value": { - "source": { - "index": "kibana_sample_data_ecommerce", - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - "description": "Maximum priced ecommerce data by customer_id in Asia", - "dest": { - "index": "kibana_sample_data_ecommerce_transform1", - "pipeline": "add_timestamp_pipeline" - }, - "frequency": "5m", - "sync": { - "time": { - "field": "order_date", - "delay": "60s" - } - }, - "retention_policy": { - "time": { - "field": "order_date", - "max_age": "30d" - } - } - } -} diff --git a/specification/transform/update_transform/UpdateTransformResponseExample1.json b/specification/transform/update_transform/UpdateTransformResponseExample1.json deleted file mode 100644 index ceca08592d..0000000000 --- a/specification/transform/update_transform/UpdateTransformResponseExample1.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "summary": "A successful response when creating a transform.", - "description": "", - "type": "response", - "response_code": 200, - "value": { - "id": "simple-kibana-ecomm-pivot", - "authorization": { - "roles": ["superuser"] - }, - "version": "10.0.0", - "create_time": 1712951576767, - "source": { - "index": ["kibana_sample_data_ecommerce"], - "query": { - "term": { - "geoip.continent_name": { - "value": "Asia" - } - } - } - }, - "dest": { - "index": "kibana_sample_data_ecommerce_transform_v2", - "pipeline": "add_timestamp_pipeline" - }, - "frequency": "15m", - "sync": { - "time": { - "field": "order_date", - "delay": "120s" - } - }, - "pivot": { - "group_by": { - "customer_id": { - "terms": { - "field": "customer_id", - "missing_bucket": true - } - } - }, - "aggregations": { - "max_price": { - "max": { - "field": "taxful_total_price" - } - } - } - }, - "description": "Maximum priced ecommerce data by customer_id in Asia", - "settings": {}, - "retention_policy": { - "time": { - "field": "order_date", - "max_age": "30d" - } - } - } -} diff --git a/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml b/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml new file mode 100644 index 0000000000..4fbe936749 --- /dev/null +++ b/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.yaml @@ -0,0 +1,34 @@ +# summary: +# method_request: POST _transform/simple-kibana-ecomm-pivot/_update +description: Run `POST _transform/simple-kibana-ecomm-pivot/_update` to update a transform that uses the pivot method. +# type: request +value: + source: + index: kibana_sample_data_ecommerce + query: + term: + geoip.continent_name: + value: Asia + pivot: + group_by: + customer_id: + terms: + field: customer_id + missing_bucket: true + aggregations: + max_price: + max: + field: taxful_total_price + description: Maximum priced ecommerce data by customer_id in Asia + dest: + index: kibana_sample_data_ecommerce_transform1 + pipeline: add_timestamp_pipeline + frequency: 5m + sync: + time: + field: order_date + delay: 60s + retention_policy: + time: + field: order_date + max_age: 30d diff --git a/specification/transform/update_transform/examples/response/UpdateTransformResponseExample1.yaml b/specification/transform/update_transform/examples/response/UpdateTransformResponseExample1.yaml new file mode 100644 index 0000000000..986e90ed11 --- /dev/null +++ b/specification/transform/update_transform/examples/response/UpdateTransformResponseExample1.yaml @@ -0,0 +1,42 @@ +# summary: +description: A successful response when creating a transform. +# type: response +# response_code: 200 +value: + id: simple-kibana-ecomm-pivot + authorization: + roles: + - superuser + version: 10.0.0 + create_time: 1712951576767 + source: + index: + - kibana_sample_data_ecommerce + query: + term: + geoip.continent_name: + value: Asia + dest: + index: kibana_sample_data_ecommerce_transform_v2 + pipeline: add_timestamp_pipeline + frequency: 15m + sync: + time: + field: order_date + delay: 120s + pivot: + group_by: + customer_id: + terms: + field: customer_id + missing_bucket: true + aggregations: + max_price: + max: + field: taxful_total_price + description: Maximum priced ecommerce data by customer_id in Asia + settings: {} + retention_policy: + time: + field: order_date + max_age: 30d