delete-datafeed.asciidoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-delete-datafeed]]
  4. === Delete {dfeeds} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Delete {dfeeds}</titleabbrev>
  8. ++++
  9. Deletes an existing {dfeed}.
  10. [[ml-delete-datafeed-request]]
  11. ==== {api-request-title}
  12. `DELETE _ml/datafeeds/<feed_id>`
  13. [[ml-delete-datafeed-prereqs]]
  14. ==== {api-prereq-title}
  15. * Unless you use the `force` parameter, you must stop the {dfeed} before you
  16. can delete it.
  17. * If the {es} {security-features} are enabled, you must have `manage_ml` or
  18. `manage` cluster privileges to use this API. See
  19. {stack-ov}/security-privileges.html[Security privileges].
  20. [[ml-delete-datafeed-path-parms]]
  21. ==== {api-path-parms-title}
  22. `<feed_id>`::
  23. (Required, string) Identifier for the {dfeed}.
  24. [[ml-delete-datafeed-query-parms]]
  25. ==== {api-query-parms-title}
  26. `force`::
  27. (Optional, boolean) Use to forcefully delete a started {dfeed}; this method is
  28. quicker than stopping and deleting the {dfeed}.
  29. [[ml-delete-datafeed-example]]
  30. ==== {api-examples-title}
  31. The following example deletes the `datafeed-total-requests` {dfeed}:
  32. [source,js]
  33. --------------------------------------------------
  34. DELETE _ml/datafeeds/datafeed-total-requests
  35. --------------------------------------------------
  36. // CONSOLE
  37. // TEST[skip:setup:server_metrics_datafeed]
  38. When the {dfeed} is deleted, you receive the following results:
  39. [source,console-result]
  40. ----
  41. {
  42. "acknowledged": true
  43. }
  44. ----