delete-dfanalytics.asciidoc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[delete-dfanalytics]]
  4. === Delete {dfanalytics-jobs} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Delete {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. Deletes an existing {dfanalytics-job}.
  10. experimental[]
  11. [[ml-delete-dfanalytics-request]]
  12. ==== {api-request-title}
  13. `DELETE _ml/data_frame/analytics/<data_frame_analytics_id>`
  14. [[ml-delete-dfanalytics-prereq]]
  15. ==== {api-prereq-title}
  16. If the {es} {security-features} are enabled, you must have the following
  17. built-in roles or equivalent privileges:
  18. * `machine_learning_admin`
  19. * `kibana_admin` (UI only)
  20. For more information, see <<security-privileges>> and <<built-in-roles>>.
  21. [[ml-delete-dfanalytics-path-params]]
  22. ==== {api-path-parms-title}
  23. `<data_frame_analytics_id>`::
  24. (Required, string)
  25. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics]
  26. [[ml-delete-dfanalytics-query-params]]
  27. ==== {api-query-parms-title}
  28. `force`::
  29. (Optional, boolean) If `true`, it deletes a job that is not stopped; this method is
  30. quicker than stopping and deleting the job.
  31. `timeout`::
  32. (Optional, <<time-units,time units>>) The time to wait for the job to be deleted.
  33. Defaults to 1 minute.
  34. [[ml-delete-dfanalytics-example]]
  35. ==== {api-examples-title}
  36. The following example deletes the `loganalytics` {dfanalytics-job}:
  37. [source,console]
  38. --------------------------------------------------
  39. DELETE _ml/data_frame/analytics/loganalytics
  40. --------------------------------------------------
  41. // TEST[skip:TBD]
  42. The API returns the following result:
  43. [source,console-result]
  44. ----
  45. {
  46. "acknowledged" : true
  47. }
  48. ----