OpenSearch/docs/en/rest-api/ml/update-job.asciidoc

86 lines
2.1 KiB
Plaintext
Raw Normal View History

//lcawley Verified example output 2017-04-11
[[ml-update-job]]
==== Update Jobs
The update job API allows you to update certain properties of a job.
===== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/_update`
////
===== Description
//TBD: Important:: Updates do not take effect until after then job is closed and re-opened.
////
===== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Request Body
The following properties can be updated after the job is created:
`analysis_config`::
(object) The analysis configuration, which specifies how to analyze the data.
See <<ml-analysisconfig, analysis configuration objects>>. In particular,
the following properties can be updated: `categorization_filters`,
`detector_description`, TBD.
`analysis_limits`::
(object) Specifies runtime limits for the job.
See <<ml-apilimits,analysis limits>>.
[NOTE]
--
* You can update the `analysis_limits` only while the job is closed.
* The `model_memory_limit` property value cannot be decreased.
* If the `memory_status` property in the `model_size_stats` object has a value
of `hard_limit`, this means that it was unable to process some data. You might
want to re-run this job with an increased `model_memory_limit`.
--
`description`::
(string) An optional description of the job.
===== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
The following example updates the `it-ops-kpi` job:
[source,js]
--------------------------------------------------
POST _xpack/ml/anomaly_detectors/it-ops-kpi/_update
{
"description":"New description",
"analysis_limits":{
"model_memory_limit": 8192
}
}
--------------------------------------------------
// CONSOLE
// TEST[skip:todo]
When the job is updated, you receive the following results:
[source,js]
----
{
"job_id": "it-ops-kpi",
"job_type": "anomaly_detector",
"description": "New description",
...
"analysis_limits": {
"model_memory_limit": 8192
},
...
}
----