---
type: api
title: Get transform stats
description: Get usage information for transforms.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-transform-get-transform-stats
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-transform-get-transform-stats
products:
  - Elasticsearch
---

# Get transform stats

Availability: 7.5+

## Paths

- `GET` `/_transform/{transform_id}/_stats`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#bearerauth)

#### Path Parameters

- `transform_id` (union Name | [] Name)
  Identifier for the transform. It can be a transform identifier or a
wildcard expression. You can get information for all transforms by using
`_all`, by specifying `*` as the `<transform_id>`, or by omitting the
`<transform_id>`.

## Description

Get usage information for transforms.

## Required authorization

* Index privileges: `read`,`view_index_metadata`
* Cluster privileges: `monitor_transform`

## Query String Parameters

- `allow_no_match` (boolean · default: true)
  Specifies what to do when the request:

1. Contains wildcard expressions and there are no transforms that match.
2. Contains the _all string or no identifiers and there are no matches.
3. Contains wildcard expressions and there are only partial matches.

If this parameter is false, the request returns a 404 status code when
there are no matches or only partial matches.
- `basic` (boolean · default: false)
  If true, the response includes `id`, `state`, `node`, `stats`, `health`,
and basic `checkpointing` information (the last and next checkpoint
numbers, and the next checkpoint's `position` and `progress`). Skips
statistics that require heavy computations to calculate:
`operations_behind`, `changes_last_detected_at`, `last_search_time`, and
the checkpoint timestamps.
- `from` (number · default: 0)
  Skips the specified number of transforms.
- `size` (number · default: 100)
  Specifies the maximum number of transforms to obtain.
- `timeout` (string Duration · default: 30s)
  Controls the time to wait for the stats

## Response

`application/json`

- `count` (number)
- `transforms` ([] TransformStats)
  - `checkpointing` ({} Checkpointing)
    - `changes_last_detected_at` (number)
    - `changes_last_detected_at_string` (DateTime)
    - `last` ({} CheckpointStats)
      - `checkpoint` (number)
      - `checkpoint_progress` ({} TransformProgress)
        - `docs_indexed` (number)
        - `docs_processed` (number)
        - `docs_remaining` (number)
        - `percent_complete` (number)
        - `total_docs` (number)
      - `timestamp` (DateTime)
      - `timestamp_millis` (EpochTimeUnitMillis)
      - `time_upper_bound` (DateTime)
      - `time_upper_bound_millis` (EpochTimeUnitMillis)
    - `next` ({} CheckpointStats)
      Same fields as `last` in `checkpointing`
    - `operations_behind` (number)
    - `last_search_time` (number)
    - `last_search_time_string` (DateTime)
  - `health` ({} TransformStatsHealth)
    - `status` (enum HealthStatus)
      

Supported values include:
  - `green` (or `GREEN`): All shards are assigned.
  - `yellow` (or `YELLOW`): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.
  - `red` (or `RED`): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.
  - `unknown`
  - `unavailable`
      Values: `green`, `GREEN`, `yellow`, `YELLOW`, `red`, `RED`, `unknown`, `unavailable`
    - `issues` ([] TransformHealthIssue)
      If a non-healthy status is returned, contains a list of issues of the transform.
      - `type` (string)
        The type of the issue
      - `issue` (string)
        A description of the issue
      - `details` (string)
        Details about the issue
      - `count` (number)
        Number of times this issue has occurred since it started
      - `first_occurrence` (EpochTimeUnitMillis)
        The timestamp this issue occurred for for the first time
      - `first_occurence_string` (DateTime)
  - `id` (string Id)
  - `node` ({} NodeAttributes)
    - `attributes` (map string to string)
      Lists node attributes.
    - `ephemeral_id` (string Id)
      The ephemeral ID of the node.
    - `id` (string)
      The unique identifier of the node.
    - `name` (string)
      The unique identifier of the node.
    - `transport_address` (string)
      The host and port where transport HTTP connections are accepted.
  - `reason` (string)
  - `state` (string)
  - `stats` ({} TransformIndexerStats)
    - `delete_time_in_ms` (EpochTimeUnitMillis)
    - `documents_indexed` (number)
    - `documents_deleted` (number)
    - `documents_processed` (number)
    - `exponential_avg_checkpoint_duration_ms` (DurationValueUnitFloatMillis)
    - `exponential_avg_documents_indexed` (number)
    - `exponential_avg_documents_processed` (number)
    - `index_failures` (number)
    - `index_time_in_ms` (DurationValueUnitMillis)
    - `index_total` (number)
    - `pages_processed` (number)
    - `processing_time_in_ms` (DurationValueUnitMillis)
    - `processing_total` (number)
    - `search_failures` (number)
    - `search_time_in_ms` (DurationValueUnitMillis)
    - `search_total` (number)
    - `trigger_count` (number)
## Code Examples

#### Console

```console
GET _transform/ecommerce-customer-transform/_stats
```

#### JavaScript

```javascript
const response = await client.transform.getTransformStats({
  transform_id: "ecommerce-customer-transform",
});
```

#### Python

```python
resp = client.transform.get_transform_stats(
    transform_id="ecommerce-customer-transform",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_stats" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.transform().getTransformStats(g -> g
    .transformId("ecommerce-customer-transform")
);
```

#### C#

```c#
var response = await client.TransformManagement.GetTransformStatsAsync(transformId: new[] { "ecommerce-customer-transform" });
```

#### PHP

```php
$resp = $client->transform()->getTransformStats([
    "transform_id" => "ecommerce-customer-transform",
]);
```

#### Ruby

```ruby
response = client.transform.get_transform_stats(
  transform_id: "ecommerce-customer-transform"
)
```

## Response Examples

#### Get transform stats response example1

A successful response that contains usage information for a transform.

```json
{
  "count": 1,
  "transforms": [
    {
      "id": "ecommerce-customer-transform",
      "state": "started",
      "node": {
        "id": "cpTIGMsVQ8Gqwqlxxxxxxx",
        "name": "my.home",
        "ephemeral_id": "5-L21nFsQxxxxxxxxxx-xx",
        "transport_address": "127.0.0.1:9300",
        "attributes": {}
      },
      "stats": {
        "pages_processed": 78,
        "documents_processed": 6027,
        "documents_indexed": 68,
        "documents_deleted": 22,
        "delete_time_in_ms": 214,
        "trigger_count": 168,
        "index_time_in_ms": 412,
        "index_total": 20,
        "index_failures": 0,
        "search_time_in_ms": 353,
        "search_total": 78,
        "search_failures": 0,
        "processing_time_in_ms": 8,
        "processing_total": 78,
        "exponential_avg_checkpoint_duration_ms": 97.30637923893185,
        "exponential_avg_documents_indexed": 2.2064915040974062,
        "exponential_avg_documents_processed": 179.89419945785045
      },
      "checkpointing": {
        "last": {
          "checkpoint": 20,
          "timestamp_millis": 1585344558220,
          "time_upper_bound_millis": 1585344498220
        },
        "changes_last_detected_at": 1585344558219
      },
      "health": {
        "status": "green"
      }
    }
  ]
}
```

