diff --git a/specification/ml/close_job/examples/200_response/MlCloseJobResponseExample1.json b/specification/ml/close_job/examples/200_response/MlCloseJobResponseExample1.json new file mode 100644 index 0000000000..e8b8f527ac --- /dev/null +++ b/specification/ml/close_job/examples/200_response/MlCloseJobResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when closing anomaly detection jobs.", + "value": { + "closed": true + } +} diff --git a/specification/ml/delete_job/examples/200_response/MlDeleteJobResponseExample1.json b/specification/ml/delete_job/examples/200_response/MlDeleteJobResponseExample1.json new file mode 100644 index 0000000000..a4af5f45f6 --- /dev/null +++ b/specification/ml/delete_job/examples/200_response/MlDeleteJobResponseExample1.json @@ -0,0 +1,6 @@ +{ + "summary": "A successful response when deleting an anomaly detection job.", + "value": { + "acknowledged": true + } +} diff --git a/specification/ml/delete_job/examples/200_response/MlDeleteJobResponseExample2.json b/specification/ml/delete_job/examples/200_response/MlDeleteJobResponseExample2.json new file mode 100644 index 0000000000..69513247cd --- /dev/null +++ b/specification/ml/delete_job/examples/200_response/MlDeleteJobResponseExample2.json @@ -0,0 +1,7 @@ +{ + "summary": "A successful response when deleting an anomaly detection job asynchronously.", + "description": "When the `wait_for_completion` query parameter is set to `false`, the response contains an identifier for the job deletion task.", + "value": { + "task": "oTUltX4IQMOUUVeiohTt8A:39" + } +} diff --git a/specification/ml/open_job/examples/200_response/MlOpenJobResponseExample1.json b/specification/ml/open_job/examples/200_response/MlOpenJobResponseExample1.json new file mode 100644 index 0000000000..4f5b9b4abf --- /dev/null +++ b/specification/ml/open_job/examples/200_response/MlOpenJobResponseExample1.json @@ -0,0 +1,7 @@ +{ + "summary": "A successful response when opening an anomaly detection job.", + "value": { + "opened": true, + "node": "node-1" + } +} diff --git a/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.json b/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.json new file mode 100644 index 0000000000..44de2836e1 --- /dev/null +++ b/specification/ml/open_job/examples/request/MlOpenJobRequestExample1.json @@ -0,0 +1,7 @@ +{ + "summary": "A request to open anomaly detection jobs.", + "description": "The timeout specifies to wait 35 minutes for the job to open.", + "value": { + "timeout": "35m" + } +} diff --git a/specification/ml/put_job/examples/200_response/MlPutJobResponseExample1.json b/specification/ml/put_job/examples/200_response/MlPutJobResponseExample1.json new file mode 100644 index 0000000000..ed3d4ef453 --- /dev/null +++ b/specification/ml/put_job/examples/200_response/MlPutJobResponseExample1.json @@ -0,0 +1,77 @@ +{ + "summary": "A successful response when creating an anomaly detection job and datafeed.", + "value": { + "job_id": "test-job1", + "job_type": "anomaly_detector", + "job_version": "8.4.0", + "create_time": 1656087283340, + "datafeed_config": { + "datafeed_id": "datafeed-test-job1", + "job_id": "test-job1", + "authorization": { + "roles": ["superuser"] + }, + "query_delay": "61499ms", + "chunking_config": { + "mode": "auto" + }, + "indices_options": { + "expand_wildcards": ["open"], + "ignore_unavailable": false, + "allow_no_indices": true, + "ignore_throttled": true + }, + "query": { + "bool": { + "must": [ + { + "match_all": {} + } + ] + } + }, + "indices": ["kibana_sample_data_logs"], + "scroll_size": 1000, + "delayed_data_check_config": { + "enabled": true + }, + "runtime_mappings": { + "hour_of_day": { + "type": "long", + "script": { + "source": "emit(doc['timestamp'].value.getHour());" + } + } + } + }, + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Sum of bytes", + "function": "sum", + "field_name": "bytes", + "detector_index": 0 + } + ], + "influencers": [], + "model_prune_window": "30d" + }, + "analysis_limits": { + "model_memory_limit": "11mb", + "categorization_examples_limit": 4 + }, + "data_description": { + "time_field": "timestamp", + "time_format": "epoch_ms" + }, + "model_plot_config": { + "enabled": true, + "annotations_enabled": true + }, + "model_snapshot_retention_days": 10, + "daily_model_snapshot_retention_after_days": 1, + "results_index_name": "custom-test-job1", + "allow_lazy_open": false + } +} diff --git a/specification/ml/put_job/examples/request/MlPutJobRequestExample1.json b/specification/ml/put_job/examples/request/MlPutJobRequestExample1.json new file mode 100644 index 0000000000..5095de5462 --- /dev/null +++ b/specification/ml/put_job/examples/request/MlPutJobRequestExample1.json @@ -0,0 +1,48 @@ +{ + "summary": "A request to create an anomaly detection job and datafeed.", + "value": { + "analysis_config": { + "bucket_span": "15m", + "detectors": [ + { + "detector_description": "Sum of bytes", + "function": "sum", + "field_name": "bytes" + } + ] + }, + "data_description": { + "time_field": "timestamp", + "time_format": "epoch_ms" + }, + "analysis_limits": { + "model_memory_limit": "11MB" + }, + "model_plot_config": { + "enabled": true, + "annotations_enabled": true + }, + "results_index_name": "test-job1", + "datafeed_config": { + "indices": ["kibana_sample_data_logs"], + "query": { + "bool": { + "must": [ + { + "match_all": {} + } + ] + } + }, + "runtime_mappings": { + "hour_of_day": { + "type": "long", + "script": { + "source": "emit(doc['timestamp'].value.getHour());" + } + } + }, + "datafeed_id": "datafeed-test-job1" + } + } +}