delete-inference-trained-model.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[delete-inference]]
  4. === Delete {infer} trained model API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Delete {infer} trained model</titleabbrev>
  8. ++++
  9. Deletes an existing trained {infer} model that is currently not referenced by an
  10. ingest pipeline.
  11. experimental[]
  12. [[ml-delete-inference-request]]
  13. ==== {api-request-title}
  14. `DELETE _ml/inference/<model_id>`
  15. [[ml-delete-inference-prereq]]
  16. ==== {api-prereq-title}
  17. * You must have `machine_learning_admin` built-in role to use this API. For more
  18. information, see <<security-privileges>> and <<built-in-roles>>.
  19. [[ml-delete-inference-path-params]]
  20. ==== {api-path-parms-title}
  21. `<model_id>`::
  22. (Optional, string)
  23. include::{docdir}/ml/ml-shared.asciidoc[tag=model-id]
  24. [[ml-delete-inference-response-codes]]
  25. ==== {api-response-codes-title}
  26. `409`::
  27. The code indicates that the trained {infer} model is referenced by an ingest
  28. pipeline and cannot be deleted.
  29. [[ml-delete-inference-example]]
  30. ==== {api-examples-title}
  31. The following example deletes the `regression-job-one-1574775307356` trained
  32. model:
  33. [source,console]
  34. --------------------------------------------------
  35. DELETE _ml/inference/regression-job-one-1574775307356
  36. --------------------------------------------------
  37. // TEST[skip:TBD]
  38. The API returns the following result:
  39. [source,console-result]
  40. ----
  41. {
  42. "acknowledged" : true
  43. }
  44. ----