{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-cat-ml-jobs-jobs-record-schema.json",
  "title": "cat.ml_jobs.JobsRecord",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-cat-api-openapi.yml#/components/schemas/cat.ml_jobs.JobsRecord",
  "type": "object",
  "properties": {
    "id": {
      "description": "The anomaly detection job identifier.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.Id"
        }
      ]
    },
    "state": {
      "description": "The status of the anomaly detection job.\n\nSupported values include:\n  - `closing`: The job close action is in progress and has not yet completed. A closing job cannot accept further data.\n  - `closed`: The job finished successfully with its model state persisted. The job must be opened before it can accept further data.\n  - `opened`: The job is available to receive and process data.\n  - `failed`: The job did not finish successfully due to an error.\nThis situation can occur due to invalid input data, a fatal error occurring during the analysis, or an external interaction such as the process being killed by the Linux out of memory (OOM) killer.\nIf the job had irrevocably failed, it must be force closed and then deleted.\nIf the datafeed can be corrected, the job can be closed and then re-opened.\n  - `opening`: The job open action is in progress and has not yet completed.\n\n",
      "allOf": [
        {
          "$ref": "#/$defs/ml._types.JobState"
        }
      ]
    },
    "opened_time": {
      "description": "For open jobs only, the amount of time the job has been opened.",
      "type": "string"
    },
    "assignment_explanation": {
      "description": "For open anomaly detection jobs only, contains messages relating to the selection of a node to run the job.",
      "type": "string"
    },
    "data.processed_records": {
      "description": "The number of input documents that have been processed by the anomaly detection job.\nThis value includes documents with missing fields, since they are nonetheless analyzed.\nIf you use datafeeds and have aggregations in your search query, the `processed_record_count` is the number of aggregation results processed, not the number of Elasticsearch documents.",
      "type": "string"
    },
    "data.processed_fields": {
      "description": "The total number of fields in all the documents that have been processed by the anomaly detection job.\nOnly fields that are specified in the detector configuration object contribute to this count.\nThe timestamp is not included in this count.",
      "type": "string"
    },
    "data.input_bytes": {
      "description": "The number of bytes of input data posted to the anomaly detection job.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        }
      ]
    },
    "data.input_records": {
      "description": "The number of input documents posted to the anomaly detection job.",
      "type": "string"
    },
    "data.input_fields": {
      "description": "The total number of fields in input documents posted to the anomaly detection job.\nThis count includes fields that are not used in the analysis.\nHowever, be aware that if you are using a datafeed, it extracts only the required fields from the documents it retrieves before posting them to the job.",
      "type": "string"
    },
    "data.invalid_dates": {
      "description": "The number of input documents with either a missing date field or a date that could not be parsed.",
      "type": "string"
    },
    "data.missing_fields": {
      "description": "The number of input documents that are missing a field that the anomaly detection job is configured to analyze.\nInput documents with missing fields are still processed because it is possible that not all fields are missing.\nIf you are using datafeeds or posting data to the job in JSON format, a high `missing_field_count` is often not an indication of data issues.\nIt is not necessarily a cause for concern.",
      "type": "string"
    },
    "data.out_of_order_timestamps": {
      "description": "The number of input documents that have a timestamp chronologically preceding the start of the current anomaly detection bucket offset by the latency window.\nThis information is applicable only when you provide data to the anomaly detection job by using the post data API.\nThese out of order documents are discarded, since jobs require time series data to be in ascending chronological order.",
      "type": "string"
    },
    "data.empty_buckets": {
      "description": "The number of buckets which did not contain any data.\nIf your data contains many empty buckets, consider increasing your `bucket_span` or using functions that are tolerant to gaps in data such as mean, `non_null_sum` or `non_zero_count`.",
      "type": "string"
    },
    "data.sparse_buckets": {
      "description": "The number of buckets that contained few data points compared to the expected number of data points.\nIf your data contains many sparse buckets, consider using a longer `bucket_span`.",
      "type": "string"
    },
    "data.buckets": {
      "description": "The total number of buckets processed.",
      "type": "string"
    },
    "data.earliest_record": {
      "description": "The timestamp of the earliest chronologically input document.",
      "type": "string"
    },
    "data.latest_record": {
      "description": "The timestamp of the latest chronologically input document.",
      "type": "string"
    },
    "data.last": {
      "description": "The timestamp at which data was last analyzed, according to server time.",
      "type": "string"
    },
    "data.last_empty_bucket": {
      "description": "The timestamp of the last bucket that did not contain any data.",
      "type": "string"
    },
    "data.last_sparse_bucket": {
      "description": "The timestamp of the last bucket that was considered sparse.",
      "type": "string"
    },
    "model.bytes": {
      "description": "The number of bytes of memory used by the models.\nThis is the maximum value since the last time the model was persisted.\nIf the job is closed, this value indicates the latest size.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        }
      ]
    },
    "model.memory_status": {
      "description": "The status of the mathematical models.",
      "allOf": [
        {
          "$ref": "#/$defs/ml._types.MemoryStatus"
        }
      ]
    },
    "model.bytes_exceeded": {
      "description": "The number of bytes over the high limit for memory usage at the last allocation failure.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ByteSize"
        }
      ]
    },
    "model.memory_limit": {
      "description": "The upper limit for model memory usage, checked on increasing values.",
      "type": "string"
    },
    "model.by_fields": {
      "description": "The number of `by` field values that were analyzed by the models.\nThis value is cumulative for all detectors in the job.",
      "type": "string"
    },
    "model.over_fields": {
      "description": "The number of `over` field values that were analyzed by the models.\nThis value is cumulative for all detectors in the job.",
      "type": "string"
    },
    "model.partition_fields": {
      "description": "The number of `partition` field values that were analyzed by the models.\nThis value is cumulative for all detectors in the job.",
      "type": "string"
    },
    "model.bucket_allocation_failures": {
      "description": "The number of buckets for which new entities in incoming data were not processed due to insufficient model memory.\nThis situation is also signified by a `hard_limit: memory_status` property value.",
      "type": "string"
    },
    "model.categorization_status": {
      "description": "The status of categorization for the job.",
      "allOf": [
        {
          "$ref": "#/$defs/ml._types.CategorizationStatus"
        }
      ]
    },
    "model.categorized_doc_count": {
      "description": "The number of documents that have had a field categorized.",
      "type": "string"
    },
    "model.total_category_count": {
      "description": "The number of categories created by categorization.",
      "type": "string"
    },
    "model.frequent_category_count": {
      "description": "The number of categories that match more than 1% of categorized documents.",
      "type": "string"
    },
    "model.rare_category_count": {
      "description": "The number of categories that match just one categorized document.",
      "type": "string"
    },
    "model.dead_category_count": {
      "description": "The number of categories created by categorization that will never be assigned again because another category’s definition makes it a superset of the dead category.\nDead categories are a side effect of the way categorization has no prior training.",
      "type": "string"
    },
    "model.failed_category_count": {
      "description": "The number of times that categorization wanted to create a new category but couldn’t because the job had hit its `model_memory_limit`.\nThis count does not track which specific categories failed to be created.\nTherefore you cannot use this value to determine the number of unique categories that were missed.",
      "type": "string"
    },
    "model.log_time": {
      "description": "The timestamp when the model stats were gathered, according to server time.",
      "type": "string"
    },
    "model.timestamp": {
      "description": "The timestamp of the last record when the model stats were gathered.",
      "type": "string"
    },
    "forecasts.total": {
      "description": "The number of individual forecasts currently available for the job.\nA value of one or more indicates that forecasts exist.",
      "type": "string"
    },
    "forecasts.memory.min": {
      "description": "The minimum memory usage in bytes for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.memory.max": {
      "description": "The maximum memory usage in bytes for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.memory.avg": {
      "description": "The average memory usage in bytes for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.memory.total": {
      "description": "The total memory usage in bytes for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.records.min": {
      "description": "The minimum number of `model_forecast` documents written for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.records.max": {
      "description": "The maximum number of `model_forecast` documents written for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.records.avg": {
      "description": "The average number of `model_forecast` documents written for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.records.total": {
      "description": "The total number of `model_forecast` documents written for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.time.min": {
      "description": "The minimum runtime in milliseconds for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.time.max": {
      "description": "The maximum runtime in milliseconds for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.time.avg": {
      "description": "The average runtime in milliseconds for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "forecasts.time.total": {
      "description": "The total runtime in milliseconds for forecasts related to the anomaly detection job.",
      "type": "string"
    },
    "node.id": {
      "description": "The uniqe identifier of the assigned node.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.NodeId"
        }
      ]
    },
    "node.name": {
      "description": "The name of the assigned node.",
      "type": "string"
    },
    "node.ephemeral_id": {
      "description": "The ephemeral identifier of the assigned node.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.NodeId"
        }
      ]
    },
    "node.address": {
      "description": "The network address of the assigned node.",
      "type": "string"
    },
    "buckets.count": {
      "description": "The number of bucket results produced by the job.",
      "type": "string"
    },
    "buckets.time.total": {
      "description": "The sum of all bucket processing times, in milliseconds.",
      "type": "string"
    },
    "buckets.time.min": {
      "description": "The minimum of all bucket processing times, in milliseconds.",
      "type": "string"
    },
    "buckets.time.max": {
      "description": "The maximum of all bucket processing times, in milliseconds.",
      "type": "string"
    },
    "buckets.time.exp_avg": {
      "description": "The exponential moving average of all bucket processing times, in milliseconds.",
      "type": "string"
    },
    "buckets.time.exp_avg_hour": {
      "description": "The exponential moving average of bucket processing times calculated in a one hour time window, in milliseconds.",
      "type": "string"
    }
  },
  "$defs": {
    "_types.ByteSize": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        }
      ]
    },
    "_types.Id": {
      "type": "string"
    },
    "_types.NodeId": {
      "type": "string"
    },
    "ml._types.CategorizationStatus": {
      "type": "string",
      "enum": [
        "ok",
        "warn"
      ]
    },
    "ml._types.JobState": {
      "type": "string",
      "enum": [
        "closing",
        "closed",
        "opened",
        "failed",
        "opening"
      ]
    },
    "ml._types.MemoryStatus": {
      "type": "string",
      "enum": [
        "ok",
        "soft_limit",
        "hard_limit"
      ]
    }
  }
}