Update a snapshot Added in 5.4.0

POST /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update

Updates certain properties of a snapshot.

Path parameters

  • job_id string Required

    Identifier for the anomaly detection job.

  • snapshot_id string Required

    Identifier for the model snapshot.

application/json

Body Required

  • description string

    A description of the model snapshot.

  • retain boolean

    If true, this snapshot will not be deleted during automatic cleanup of snapshots older than model_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • acknowledged boolean Required
    • model object Required
      Hide model attributes Show model attributes object
      • description string

        An optional description of the job.

      • job_id string Required
      • latest_record_time_stamp number

        The timestamp of the latest processed record.

      • latest_result_time_stamp number

        The timestamp of the latest bucket result.

      • min_version string Required
      • model_size_stats object
        Hide model_size_stats attributes Show model_size_stats attributes object
        • bucket_allocation_failures_count number Required
        • job_id string Required
        • log_time string | number Required

          A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

          One of:

          Time unit for milliseconds

        • memory_status string Required

          Values are ok, soft_limit, or hard_limit.

        • model_bytes number | string Required

        • model_bytes_exceeded number | string

        • model_bytes_memory_limit number | string

        • output_memory_allocator_bytes number | string

        • peak_model_bytes number | string

        • assignment_memory_basis string
        • result_type string Required
        • total_by_field_count number Required
        • total_over_field_count number Required
        • total_partition_field_count number Required
        • categorization_status string Required

          Values are ok or warn.

        • categorized_doc_count number Required
        • dead_category_count number Required
        • failed_category_count number Required
        • frequent_category_count number Required
        • rare_category_count number Required
        • total_category_count number Required
        • timestamp number
      • retain boolean Required

        If true, this snapshot will not be deleted during automatic cleanup of snapshots older than model_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted. The default value is false.

      • snapshot_doc_count number Required

        For internal use only.

      • snapshot_id string Required
      • timestamp number Required

        The creation timestamp for the snapshot.

POST /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update
curl \
 --request POST 'http://api.example.com/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"description":"string","retain":true}'