elasticsearch/docs/reference/ml/df-analytics/apis/delete-dfanalytics.asciidoc
Liam Thompson 33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00

63 lines
1.4 KiB
Text

[role="xpack"]
[[delete-dfanalytics]]
= Delete {dfanalytics-jobs} API
[subs="attributes"]
++++
<titleabbrev>Delete {dfanalytics-jobs}</titleabbrev>
++++
Deletes an existing {dfanalytics-job}.
[[ml-delete-dfanalytics-request]]
== {api-request-title}
`DELETE _ml/data_frame/analytics/<data_frame_analytics_id>`
[[ml-delete-dfanalytics-prereq]]
== {api-prereq-title}
Requires the `manage_ml` cluster privilege. This privilege is included in the
`machine_learning_admin` built-in role.
[[ml-delete-dfanalytics-path-params]]
== {api-path-parms-title}
`<data_frame_analytics_id>`::
(Required, string)
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics]
[[ml-delete-dfanalytics-query-params]]
== {api-query-parms-title}
`force`::
(Optional, Boolean) If `true`, it deletes a job that is not stopped; this method is
quicker than stopping and deleting the job.
`timeout`::
(Optional, <<time-units,time units>>) The time to wait for the job to be deleted.
Defaults to 1 minute.
[[ml-delete-dfanalytics-example]]
== {api-examples-title}
The following example deletes the `loganalytics` {dfanalytics-job}:
[source,console]
--------------------------------------------------
DELETE _ml/data_frame/analytics/loganalytics
--------------------------------------------------
// TEST[skip:TBD]
The API returns the following result:
[source,console-result]
----
{
"acknowledged" : true
}
----