---
type: api
title: Get machine learning information
description: Get defaults and limits used by machine learning.
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-ml-info
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-ml-info
products:
  - Elasticsearch
---

# Get machine learning information

Authentication: required

Availability: Generally available since 6.3

## Paths

- `GET` `/_ml/info`

## Description

Get defaults and limits used by machine learning.
This endpoint is designed to be used by a user interface that needs to fully
understand machine learning configurations where some options are not
specified, meaning that the defaults should be used. This endpoint may be
used to find out what those defaults are. It also provides information about
the maximum size of machine learning jobs that could run in the current
cluster configuration.

## Required authorization

- Cluster privileges: `monitor_ml`

## Response

`application/json`

- `defaults` (object)
  - `anomaly_detectors` (object)
    - `categorization_analyzer` (union oneOf)
      - **string**
      - **CategorizationAnalyzerDefinition**
        - `char_filter` (object[])
          One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of `categorization_filters` (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters.
        - `filter` (object[])
          One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization.
        - `tokenizer` (string | object)
          The name or definition of the tokenizer to use after character filters are applied. This property is compulsory if `categorization_analyzer` is specified as an object. Machine learning provides a tokenizer called `ml_standard` that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English. If you want to use that tokenizer but change the character or token filters, specify `"tokenizer": "ml_standard"` in your `categorization_analyzer`. Additionally, the `ml_classic` tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2). `ml_classic` was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify `"tokenizer": "ml_classic"` in your `categorization_analyzer`.
    - `categorization_examples_limit` (number)
    - `model_memory_limit` (string)
    - `model_snapshot_retention_days` (number)
    - `daily_model_snapshot_retention_after_days` (number)
  - `datafeeds` (object)
    - `scroll_size` (number)
- `limits` (object)
  - `max_single_ml_node_processors` (number)
  - `total_ml_processors` (number)
  - `max_model_memory_limit` (number | string)
  - `effective_max_model_memory_limit` (number | string)
  - `total_ml_memory` (number | string)
- `upgrade_mode` (boolean)
- `native_code` (object)
  - `build_hash` (string)
  - `version` (string)
## Code examples

#### Console

```console
GET _ml/info
```

#### JavaScript

```javascript
const response = await client.ml.info();
```

#### Python

```python
resp = client.ml.info()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_ml/info" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ml().info();
```

#### C#

```c#
var response = await client.MachineLearning.InfoAsync();
```

#### PHP

```php
$resp = $client->ml()->info();
```

#### Ruby

```ruby
response = client.ml.info
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "defaults": {
    "anomaly_detectors": {
      "categorization_analyzer": "string",
      "categorization_examples_limit": 0,
      "model_memory_limit": "string",
      "model_snapshot_retention_days": 0,
      "daily_model_snapshot_retention_after_days": 0
    },
    "datafeeds": {
      "scroll_size": 0
    }
  },
  "limits": {
    "max_single_ml_node_processors": 0,
    "total_ml_processors": 0,
    "max_model_memory_limit": "string",
    "effective_max_model_memory_limit": "string",
    "total_ml_memory": "string"
  },
  "upgrade_mode": false,
  "native_code": {
    "build_hash": "string",
    "version": "string"
  }
}
```

