From ca573b6dadaea7d75f6adb19411ffb6bb293baee Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 11 Apr 2024 10:08:17 -0700 Subject: [PATCH 1/5] Add examples for create transform --- .../MlPutTransformResponseExample1.json | 6 +++ .../MlPutTransformRequestExample1.json | 50 +++++++++++++++++++ .../MlPutTransformRequestExample2.json | 23 +++++++++ 3 files changed, 79 insertions(+) create mode 100644 specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json create mode 100644 specification/transform/put_transform/examples/request/MlPutTransformRequestExample1.json create mode 100644 specification/transform/put_transform/examples/request/MlPutTransformRequestExample2.json diff --git a/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json b/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json new file mode 100644 index 0000000000..2922a562ba --- /dev/null +++ b/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when creating a transform.", + "value": { + "acknowledged" : true + } +} diff --git a/specification/transform/put_transform/examples/request/MlPutTransformRequestExample1.json b/specification/transform/put_transform/examples/request/MlPutTransformRequestExample1.json new file mode 100644 index 0000000000..78ff6fe3fc --- /dev/null +++ b/specification/transform/put_transform/examples/request/MlPutTransformRequestExample1.json @@ -0,0 +1,50 @@ +{ + "summary": "A request to create a transform that uses the pivot method.", + "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/MlPutTransformRequestExample2.json b/specification/transform/put_transform/examples/request/MlPutTransformRequestExample2.json new file mode 100644 index 0000000000..7834bbd90b --- /dev/null +++ b/specification/transform/put_transform/examples/request/MlPutTransformRequestExample2.json @@ -0,0 +1,23 @@ +{ + "summary": "A request to create a transform that uses the latest method.", + "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" + } + } + } +} From 2a412e430d6e8510b129f05cf6ec82125170cd77 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 11 Apr 2024 10:16:05 -0700 Subject: [PATCH 2/5] Run style fix --- .../examples/200_response/MlPutTransformResponseExample1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json b/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json index 2922a562ba..b07c11b2c0 100644 --- a/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json +++ b/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json @@ -1,6 +1,6 @@ { "summary": "A successful response when creating a transform.", "value": { - "acknowledged" : true + "acknowledged": true } } From d8801f3952de97a8a1c76987b4dac5e721ec09aa Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 11 Apr 2024 12:49:37 -0700 Subject: [PATCH 3/5] Add more transform examples --- .../200_response/DeleteTransformResponseExample1.json | 6 ++++++ ...nseExample1.json => PutTransformResponseExample1.json} | 0 ...uestExample1.json => PutTransformRequestExample1.json} | 0 ...uestExample2.json => PutTransformRequestExample2.json} | 0 .../200_response/ResetTransformResponseExample1.json | 6 ++++++ .../200_response/ResetTransformResponseExample1.json | 6 ++++++ .../200_response/StartTransformResponseExample1.json | 6 ++++++ .../200_response/StopTransformResponseExample1.json | 6 ++++++ .../200_response/UpgradeTransformResponseExample1.json | 8 ++++++++ 9 files changed, 38 insertions(+) create mode 100644 specification/transform/delete_transform/examples/200_response/DeleteTransformResponseExample1.json rename specification/transform/put_transform/examples/200_response/{MlPutTransformResponseExample1.json => PutTransformResponseExample1.json} (100%) rename specification/transform/put_transform/examples/request/{MlPutTransformRequestExample1.json => PutTransformRequestExample1.json} (100%) rename specification/transform/put_transform/examples/request/{MlPutTransformRequestExample2.json => PutTransformRequestExample2.json} (100%) create mode 100644 specification/transform/reset_transform/examples/200_response/ResetTransformResponseExample1.json create mode 100644 specification/transform/schedule_now_transform/examples/200_response/ResetTransformResponseExample1.json create mode 100644 specification/transform/start_transform/examples/200_response/StartTransformResponseExample1.json create mode 100644 specification/transform/stop_transform/examples/200_response/StopTransformResponseExample1.json create mode 100644 specification/transform/upgrade_transforms/examples/200_response/UpgradeTransformResponseExample1.json diff --git a/specification/transform/delete_transform/examples/200_response/DeleteTransformResponseExample1.json b/specification/transform/delete_transform/examples/200_response/DeleteTransformResponseExample1.json new file mode 100644 index 0000000000..4d769228ea --- /dev/null +++ b/specification/transform/delete_transform/examples/200_response/DeleteTransformResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when the transform is deleted.", + "value": { + "acknowledged": true + } +} diff --git a/specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json b/specification/transform/put_transform/examples/200_response/PutTransformResponseExample1.json similarity index 100% rename from specification/transform/put_transform/examples/200_response/MlPutTransformResponseExample1.json rename to specification/transform/put_transform/examples/200_response/PutTransformResponseExample1.json diff --git a/specification/transform/put_transform/examples/request/MlPutTransformRequestExample1.json b/specification/transform/put_transform/examples/request/PutTransformRequestExample1.json similarity index 100% rename from specification/transform/put_transform/examples/request/MlPutTransformRequestExample1.json rename to specification/transform/put_transform/examples/request/PutTransformRequestExample1.json diff --git a/specification/transform/put_transform/examples/request/MlPutTransformRequestExample2.json b/specification/transform/put_transform/examples/request/PutTransformRequestExample2.json similarity index 100% rename from specification/transform/put_transform/examples/request/MlPutTransformRequestExample2.json rename to specification/transform/put_transform/examples/request/PutTransformRequestExample2.json diff --git a/specification/transform/reset_transform/examples/200_response/ResetTransformResponseExample1.json b/specification/transform/reset_transform/examples/200_response/ResetTransformResponseExample1.json new file mode 100644 index 0000000000..5782d24bc5 --- /dev/null +++ b/specification/transform/reset_transform/examples/200_response/ResetTransformResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when the transform is reset.", + "value": { + "acknowledged": true + } +} diff --git a/specification/transform/schedule_now_transform/examples/200_response/ResetTransformResponseExample1.json b/specification/transform/schedule_now_transform/examples/200_response/ResetTransformResponseExample1.json new file mode 100644 index 0000000000..f64f529373 --- /dev/null +++ b/specification/transform/schedule_now_transform/examples/200_response/ResetTransformResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when the transform is scheduled to run now.", + "value": { + "acknowledged": true + } +} diff --git a/specification/transform/start_transform/examples/200_response/StartTransformResponseExample1.json b/specification/transform/start_transform/examples/200_response/StartTransformResponseExample1.json new file mode 100644 index 0000000000..8e06dfeb6f --- /dev/null +++ b/specification/transform/start_transform/examples/200_response/StartTransformResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when a transform starts.", + "value": { + "acknowledged": true + } +} diff --git a/specification/transform/stop_transform/examples/200_response/StopTransformResponseExample1.json b/specification/transform/stop_transform/examples/200_response/StopTransformResponseExample1.json new file mode 100644 index 0000000000..15a8aa85c0 --- /dev/null +++ b/specification/transform/stop_transform/examples/200_response/StopTransformResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when a transform stops.", + "value": { + "acknowledged": true + } +} diff --git a/specification/transform/upgrade_transforms/examples/200_response/UpgradeTransformResponseExample1.json b/specification/transform/upgrade_transforms/examples/200_response/UpgradeTransformResponseExample1.json new file mode 100644 index 0000000000..4d6587a8c4 --- /dev/null +++ b/specification/transform/upgrade_transforms/examples/200_response/UpgradeTransformResponseExample1.json @@ -0,0 +1,8 @@ +{ + "summary": "A successful response contains a summary when all transforms are upgraded.", + "value": { + "needs_update": 0, + "updated": 2, + "no_action": 1 + } +} From a8e2fd5985902055b49093b0b5e97d33c77a8289 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 11 Apr 2024 12:58:45 -0700 Subject: [PATCH 4/5] Add examples for get transform and get transform stats --- .../GetTransformResponseExample1.json | 65 +++++++++++++++++++ .../GetTransformStatsResponseExample1.json | 49 ++++++++++++++ .../PreviewTransformRequestExample1.json | 25 +++++++ 3 files changed, 139 insertions(+) create mode 100644 specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json create mode 100644 specification/transform/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json create mode 100644 specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.json diff --git a/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json b/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json new file mode 100644 index 0000000000..5656f4e583 --- /dev/null +++ b/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json @@ -0,0 +1,65 @@ +{ + "summary": "A successful response that contains configuration information for a transform.", + "value": { + "count" : 1, + "transforms" : [ + { + "id" : "ecommerce_transform1", + "authorization" : { + "roles" : [ + "superuser" + ] + }, + "version" : "8.4.0", + "create_time" : 1656023416565, + "source" : { + "index" : [ + "kibana_sample_data_ecommerce" + ], + "query" : { + "term" : { + "geoip.continent_name" : { + "value" : "Asia" + } + } + } + }, + "dest" : { + "index" : "kibana_sample_data_ecommerce_transform1", + "pipeline" : "add_timestamp_pipeline" + }, + "frequency" : "5m", + "sync" : { + "time" : { + "field" : "order_date", + "delay" : "60s" + } + }, + "pivot" : { + "group_by" : { + "customer_id" : { + "terms" : { + "field" : "customer_id" + } + } + }, + "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/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json b/specification/transform/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json new file mode 100644 index 0000000000..24663a93cc --- /dev/null +++ b/specification/transform/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json @@ -0,0 +1,49 @@ +{ + "summary": "A successful response that contains usage information for a transform.", + "value": { + "count" : 1, + "transforms" : [ + { + "id" : "ecommerce-customer-transform", + "state" : "started", + "node" : { + "id" : "cpTIGMsVQ8Gqwqlxxxxxxx", + "name" : "my.home", + "ephemeral_id" : "5-L21nFsQxxxxxxxxxx-xx", + "transport_address" : "127.0.0.1:9300", + "attributes" : { } + }, + "stats" : { + "pages_processed" : 78, + "documents_processed" : 6027, + "documents_indexed" : 68, + "documents_deleted": 22, + "delete_time_in_ms": 214, + "trigger_count" : 168, + "index_time_in_ms" : 412, + "index_total" : 20, + "index_failures" : 0, + "search_time_in_ms" : 353, + "search_total" : 78, + "search_failures" : 0, + "processing_time_in_ms" : 8, + "processing_total" : 78, + "exponential_avg_checkpoint_duration_ms" : 97.30637923893185, + "exponential_avg_documents_indexed" : 2.2064915040974062, + "exponential_avg_documents_processed" : 179.89419945785045 + }, + "checkpointing" : { + "last" : { + "checkpoint" : 20, + "timestamp_millis" : 1585344558220, + "time_upper_bound_millis" : 1585344498220 + }, + "changes_last_detected_at" : 1585344558219 + }, + "health": { + "status": "green" + } + } + ] + } +} diff --git a/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.json b/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.json new file mode 100644 index 0000000000..8cb8d085e2 --- /dev/null +++ b/specification/transform/preview_transform/examples/request/PreviewTransformRequestExample1.json @@ -0,0 +1,25 @@ +{ + "summary": "A request to preview a transform that uses the pivot method.", + "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" + } + } + } + } + } +} From bcec0f3c8e611bca82ab9bd0d944e2ea77564fa9 Mon Sep 17 00:00:00 2001 From: lcawl Date: Fri, 12 Apr 2024 13:04:39 -0700 Subject: [PATCH 5/5] Add remaining examples, format --- .../GetTransformResponseExample1.json | 76 +++--- .../GetTransformStatsResponseExample1.json | 64 ++--- .../PreviewTransformResponseExample1.json | 220 ++++++++++++++++++ .../UpdateTransformResponseExample1.json | 57 +++++ .../UpdateTransformRequestExample1.json | 50 ++++ 5 files changed, 395 insertions(+), 72 deletions(-) create mode 100644 specification/transform/preview_transform/examples/200_response/PreviewTransformResponseExample1.json create mode 100644 specification/transform/update_transform/examples/200_response/UpdateTransformResponseExample1.json create mode 100644 specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.json diff --git a/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json b/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json index 5656f4e583..eb39831c0d 100644 --- a/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json +++ b/specification/transform/get_transform/examples/200_response/GetTransformResponseExample1.json @@ -1,62 +1,58 @@ { "summary": "A successful response that contains configuration information for a transform.", "value": { - "count" : 1, - "transforms" : [ + "count": 1, + "transforms": [ { - "id" : "ecommerce_transform1", - "authorization" : { - "roles" : [ - "superuser" - ] + "id": "ecommerce_transform1", + "authorization": { + "roles": ["superuser"] }, - "version" : "8.4.0", - "create_time" : 1656023416565, - "source" : { - "index" : [ - "kibana_sample_data_ecommerce" - ], - "query" : { - "term" : { - "geoip.continent_name" : { - "value" : "Asia" + "version": "8.4.0", + "create_time": 1656023416565, + "source": { + "index": ["kibana_sample_data_ecommerce"], + "query": { + "term": { + "geoip.continent_name": { + "value": "Asia" } } } }, - "dest" : { - "index" : "kibana_sample_data_ecommerce_transform1", - "pipeline" : "add_timestamp_pipeline" + "dest": { + "index": "kibana_sample_data_ecommerce_transform1", + "pipeline": "add_timestamp_pipeline" }, - "frequency" : "5m", - "sync" : { - "time" : { - "field" : "order_date", - "delay" : "60s" + "frequency": "5m", + "sync": { + "time": { + "field": "order_date", + "delay": "60s" } }, - "pivot" : { - "group_by" : { - "customer_id" : { - "terms" : { - "field" : "customer_id" + "pivot": { + "group_by": { + "customer_id": { + "terms": { + "field": "customer_id" } } }, - "aggregations" : { - "max_price" : { - "max" : { - "field" : "taxful_total_price" + "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" + "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/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json b/specification/transform/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json index 24663a93cc..9f9690a9f2 100644 --- a/specification/transform/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json +++ b/specification/transform/get_transform_stats/examples/200_response/GetTransformStatsResponseExample1.json @@ -1,44 +1,44 @@ { "summary": "A successful response that contains usage information for a transform.", "value": { - "count" : 1, - "transforms" : [ + "count": 1, + "transforms": [ { - "id" : "ecommerce-customer-transform", - "state" : "started", - "node" : { - "id" : "cpTIGMsVQ8Gqwqlxxxxxxx", - "name" : "my.home", - "ephemeral_id" : "5-L21nFsQxxxxxxxxxx-xx", - "transport_address" : "127.0.0.1:9300", - "attributes" : { } + "id": "ecommerce-customer-transform", + "state": "started", + "node": { + "id": "cpTIGMsVQ8Gqwqlxxxxxxx", + "name": "my.home", + "ephemeral_id": "5-L21nFsQxxxxxxxxxx-xx", + "transport_address": "127.0.0.1:9300", + "attributes": {} }, - "stats" : { - "pages_processed" : 78, - "documents_processed" : 6027, - "documents_indexed" : 68, + "stats": { + "pages_processed": 78, + "documents_processed": 6027, + "documents_indexed": 68, "documents_deleted": 22, "delete_time_in_ms": 214, - "trigger_count" : 168, - "index_time_in_ms" : 412, - "index_total" : 20, - "index_failures" : 0, - "search_time_in_ms" : 353, - "search_total" : 78, - "search_failures" : 0, - "processing_time_in_ms" : 8, - "processing_total" : 78, - "exponential_avg_checkpoint_duration_ms" : 97.30637923893185, - "exponential_avg_documents_indexed" : 2.2064915040974062, - "exponential_avg_documents_processed" : 179.89419945785045 + "trigger_count": 168, + "index_time_in_ms": 412, + "index_total": 20, + "index_failures": 0, + "search_time_in_ms": 353, + "search_total": 78, + "search_failures": 0, + "processing_time_in_ms": 8, + "processing_total": 78, + "exponential_avg_checkpoint_duration_ms": 97.30637923893185, + "exponential_avg_documents_indexed": 2.2064915040974062, + "exponential_avg_documents_processed": 179.89419945785045 }, - "checkpointing" : { - "last" : { - "checkpoint" : 20, - "timestamp_millis" : 1585344558220, - "time_upper_bound_millis" : 1585344498220 + "checkpointing": { + "last": { + "checkpoint": 20, + "timestamp_millis": 1585344558220, + "time_upper_bound_millis": 1585344498220 }, - "changes_last_detected_at" : 1585344558219 + "changes_last_detected_at": 1585344558219 }, "health": { "status": "green" diff --git a/specification/transform/preview_transform/examples/200_response/PreviewTransformResponseExample1.json b/specification/transform/preview_transform/examples/200_response/PreviewTransformResponseExample1.json new file mode 100644 index 0000000000..3c93bc0010 --- /dev/null +++ b/specification/transform/preview_transform/examples/200_response/PreviewTransformResponseExample1.json @@ -0,0 +1,220 @@ +{ + "summary": "A successful response contains a preview a transform that uses the pivot method.", + "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/update_transform/examples/200_response/UpdateTransformResponseExample1.json b/specification/transform/update_transform/examples/200_response/UpdateTransformResponseExample1.json new file mode 100644 index 0000000000..ca2d25a7bc --- /dev/null +++ b/specification/transform/update_transform/examples/200_response/UpdateTransformResponseExample1.json @@ -0,0 +1,57 @@ +{ + "summary": "A successful response when creating a transform.", + "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.json b/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.json new file mode 100644 index 0000000000..c792b24d9c --- /dev/null +++ b/specification/transform/update_transform/examples/request/UpdateTransformRequestExample1.json @@ -0,0 +1,50 @@ +{ + "summary": "A request to update a transform that uses the pivot method.", + "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" + } + } + } +}