Get trained models

  • GET /_cat/ml/trained_models/{model_id}
  • GET /_cat/ml/trained_models
Auth

Get configuration and usage information about inference trained models.

Important

CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get trained models statistics API.

Required privileges

Cluster privileges monitor_ml

Path parameters

model_id string optional

A unique identifier for the trained model.

Leave it out to use /_cat/ml/trained_models.

Query parameters

allow_no_match boolean · default: true

Specifies what to do when the request: contains wildcard expressions and there are no models that match; contains the _all string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. If true, the API returns an empty array when there are no matches and the subset of results when there are partial matches. If false, the API returns a 404 status code when there are no matches or only partial matches.

h union string | string[]

A comma-separated list of column names to display.

Supported values include:

  • create_time (or ct): The time when the trained model was created.
  • created_by (or c, createdBy): Information on the creator of the trained model.
  • data_frame_analytics_id (or df, dataFrameAnalytics, dfid): Identifier for the data frame analytics job that created the model. Only displayed if it is still available.
  • description (or d): The description of the trained model.
  • heap_size (or hs, modelHeapSize): The estimated heap size to keep the trained model in memory.
  • id: Identifier for the trained model.
  • ingest.count (or ic, ingestCount): The total number of documents that are processed by the model.
  • ingest.current (or icurr, ingestCurrent): The total number of document that are currently being handled by the trained model.
  • ingest.failed (or if, ingestFailed): The total number of failed ingest attempts with the trained model.
  • ingest.pipelines (or ip, ingestPipelines): The total number of ingest pipelines that are referencing the trained model.
  • ingest.time (or it, ingestTime): The total time that is spent processing documents with the trained model.
  • license (or l): The license level of the trained model.
  • operations (or o, modelOperations): The estimated number of operations to use the trained model. This number helps measuring the computational complexity of the model.
  • version (or v): The Elasticsearch version number in which the trained model was created.
s union string | string[]

A comma-separated list of column names or aliases used to sort the response.

Supported values include:

  • create_time (or ct): The time when the trained model was created.
  • created_by (or c, createdBy): Information on the creator of the trained model.
  • data_frame_analytics_id (or df, dataFrameAnalytics, dfid): Identifier for the data frame analytics job that created the model. Only displayed if it is still available.
  • description (or d): The description of the trained model.
  • heap_size (or hs, modelHeapSize): The estimated heap size to keep the trained model in memory.
  • id: Identifier for the trained model.
  • ingest.count (or ic, ingestCount): The total number of documents that are processed by the model.
  • ingest.current (or icurr, ingestCurrent): The total number of document that are currently being handled by the trained model.
  • ingest.failed (or if, ingestFailed): The total number of failed ingest attempts with the trained model.
  • ingest.pipelines (or ip, ingestPipelines): The total number of ingest pipelines that are referencing the trained model.
  • ingest.time (or it, ingestTime): The total time that is spent processing documents with the trained model.
  • license (or l): The license level of the trained model.
  • operations (or o, modelOperations): The estimated number of operations to use the trained model. This number helps measuring the computational complexity of the model.
  • version (or v): The Elasticsearch version number in which the trained model was created.
from number · default: 0

Skips the specified number of transforms.

size number · default: 100

The maximum number of transforms to display.

format string · default: text

Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile.

help boolean · default: false

When set to true will output available columns. This option can't be combined with any other query string option.

v boolean · default: false

When set to true will enable verbose output.

bytes enum

Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

Values: b kb mb gb tb pb
time enum

Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

Values: nanos micros ms s m h d

Response

application/json
<array> object[]
id string

The model identifier.

created_by string

Information about the creator of the model.

heap_size number | string

The estimated heap size to keep the model in memory.

operations string

The estimated number of operations to use the model. This number helps to measure the computational complexity of the model.

license string

The license level of the model.

create_time union oneOf

The time the model was created.

One of: string or number
version string

The version of Elasticsearch when the model was created.

description string

A description of the model.

ingest.pipelines string

The number of pipelines that are referencing the model.

ingest.count string

The total number of documents that are processed by the model.

ingest.time string

The total time spent processing documents with thie model.

ingest.current string

The total number of documents that are currently being handled by the model.

ingest.failed string

The total number of failed ingest attempts with the model.

data_frame.id string

The identifier for the data frame analytics job that created the model. Only displayed if the job is still available.

data_frame.create_time string

The time the data frame analytics job was created.

data_frame.source_index string

The source index used to train in the data frame analysis.

data_frame.analysis string

The analysis used by the data frame to build the model.

type string