validate-detector.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-valid-detector]]
  4. === Validate Detectors API
  5. ++++
  6. <titleabbrev>Validate Detectors </titleabbrev>
  7. ++++
  8. Validates detector configuration information.
  9. ==== Request
  10. `POST _xpack/ml/anomaly_detectors/_validate/detector`
  11. ==== Description
  12. The validate detectors API enables you validate the detector configuration
  13. before you create a job.
  14. ==== Request Body
  15. For a list of the properties that you can specify in the body of this API,
  16. see <<ml-detectorconfig,detector configuration objects>>.
  17. ==== Authorization
  18. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  19. For more information, see
  20. {xpack-ref}/security-privileges.html[Security Privileges].
  21. ==== Examples
  22. The following example validates detector configuration information:
  23. [source,js]
  24. --------------------------------------------------
  25. POST _xpack/ml/anomaly_detectors/_validate/detector
  26. {
  27. "function": "metric",
  28. "field_name": "responsetime",
  29. "by_field_name": "airline"
  30. }
  31. --------------------------------------------------
  32. // CONSOLE
  33. // TEST[skip:needs-licence]
  34. When the validation completes, you receive the following results:
  35. [source,js]
  36. ----
  37. {
  38. "acknowledged": true
  39. }
  40. ----
  41. // TESTRESPONSE