2017-04-11 21:52:47 -04:00
|
|
|
//lcawley Verified example output 2017-04-11
|
2017-04-04 18:26:39 -04:00
|
|
|
[[ml-valid-detector]]
|
|
|
|
==== Validate Detectors
|
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
The validate detectors API validates detector configuration information.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
===== Request
|
|
|
|
|
|
|
|
`POST _xpack/ml/anomaly_detectors/_validate/detector`
|
|
|
|
|
|
|
|
===== Description
|
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
This API enables you validate the detector configuration before you create a job.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
===== Request Body
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
For a list of the properties that you can specify in the body of this API,
|
|
|
|
see <<ml-detectorconfig,detector configuration objects>>.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
===== Authorization
|
|
|
|
|
|
|
|
You must have `manage_ml`, or `manage` cluster privileges to use this API.
|
|
|
|
For more information, see <<privileges-list-cluster>>.
|
|
|
|
|
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Examples
|
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
The following example validates detector configuration information:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-04-06 10:56:46 -04:00
|
|
|
POST _xpack/ml/anomaly_detectors/_validate/detector
|
2017-04-04 18:26:39 -04:00
|
|
|
{
|
2017-04-11 21:52:47 -04:00
|
|
|
"function": "metric",
|
|
|
|
"field_name": "responsetime",
|
|
|
|
"by_field_name": "airline"
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
When the validation completes, you receive the following results:
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
2017-04-06 10:56:46 -04:00
|
|
|
"acknowledged": true
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
----
|