Get transformsAdded in 7.5.0

GET /_transform

Get configuration information for transforms.

Query parameters

  • 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.

  • fromnumber

    Skips the specified number of transforms.

  • sizenumber

    Specifies the maximum number of transforms to obtain.

  • Excludes fields that were automatically added when creating the transform. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • countnumber Required
    • transformsarray[object] Required
      Hide transforms attributes Show transforms attributes object
      • Hide authorization attributes Show authorization attributes object
        • api_keyobject
          Hide api_key attributes Show api_key attributes object
          • idstring Required

            The identifier for the API key.

          • namestring Required

            The name of the API key.

        • rolesarray[string]

          If a user ID was used for the most recent update to the transform, its roles at the time of the update are listed in the response.

        • If a service account was used for the most recent update to the transform, the account name is listed in the response.

      • Time unit for milliseconds

      • create_time_stringstring | number

        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

      • Free text description of the transform.

      • destobject Required
        Hide dest attributes Show dest attributes object
      • frequencystring

        A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

      • idstring Required
      • latestobject
        Hide latest attributes Show latest attributes object
        • sortstring Required

          Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

        • unique_keyarray[string] Required

          Specifies an array of one or more fields that are used to group the data.

      • pivotobject
        Hide pivot attributes Show pivot attributes object
        • Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation, min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted average.

        • group_byobject

          Defines how to group the data. More than one grouping can be defined per pivot. The following groupings are currently supported: date histogram, geotile grid, histogram, terms.

          Hide group_by attribute Show group_by attribute object
      • Hide retention_policy attribute Show retention_policy attribute object
        • timeobject
          Hide time attributes Show time attributes object
          • fieldstring Required

            Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

          • max_agestring Required

            A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

      • settingsobject
        Hide settings attributes Show settings attributes object
        • Specifies whether the transform checkpoint ranges should be optimized for performance. Such optimization can align checkpoint ranges with the date histogram interval when date histogram is specified as a group source in the transform config. As a result, less document updates in the destination index will be performed thus improving overall performance.

        • Defines if dates in the ouput should be written as ISO formatted string or as millis since epoch. epoch_millis was the default for transforms created before version 7.11. For compatible output set this value to true.

        • Specifies whether the transform should deduce the destination index mappings from the transform configuration.

        • Specifies a limit on the number of input documents per second. This setting throttles the transform by adding a wait time between search requests. The default value is null, which disables throttling.

        • Defines the initial page size to use for the composite aggregation for each checkpoint. If circuit breaker exceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is 10 and the maximum is 65,536.

        • unattendedboolean

          If true, the transform runs in unattended mode. In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails. Setting the number of retries other than infinite fails in validation.

      • sourceobject Required
        Hide source attributes Show source attributes object
        • indexstring | array[string] Required
        • Hide runtime_mappings attribute Show runtime_mappings attribute object
          • *object Additional properties
            Hide * attributes Show * attributes object
            • fieldsobject

              For type composite

            • fetch_fieldsarray[object]

              For type lookup

            • formatstring

              A custom format for date type runtime fields.

            • Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

            • Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

            • scriptobject
            • typestring Required

              Values are boolean, composite, date, double, geo_point, geo_shape, ip, keyword, long, or lookup.

        • queryobject

          A query clause that retrieves a subset of data from the source index.

          Query DSL
      • syncobject
        Hide sync attribute Show sync attribute object
        • timeobject
          Hide time attributes Show time attributes object
          • delaystring

            A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • fieldstring Required

            Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

      • versionstring
      • _metaobject
        Hide _meta attribute Show _meta attribute object
        • *object Additional properties
GET /_transform
curl \
 --request GET 'http://api.example.com/_transform' \
 --header "Authorization: $API_KEY"
Response examples (200)
A successful response that contains configuration information for a transform.
{
  "count": 1,
  "transforms": [
    {
      "id": "ecommerce_transform1",
      "authorization": {
        "roles": [
          "superuser"
        ]
      },
      "version": "8.4.0",
      "create_time": 1656023416565,
      "source": {
        "index": [
          "kibana_sample_data_ecommerce"
        ],
        "query": {
          "term": {
            "geoip.continent_name": {
              "value": "Asia"
            }
          }
        }
      },
      "dest": {
        "index": "kibana_sample_data_ecommerce_transform1",
        "pipeline": "add_timestamp_pipeline"
      },
      "frequency": "5m",
      "sync": {
        "time": {
          "field": "order_date",
          "delay": "60s"
        }
      },
      "pivot": {
        "group_by": {
          "customer_id": {
            "terms": {
              "field": "customer_id"
            }
          }
        },
        "aggregations": {
          "max_price": {
            "max": {
              "field": "taxful_total_price"
            }
          }
        }
      },
      "description": "Maximum priced ecommerce data by customer_id in Asia",
      "settings": {},
      "retention_policy": {
        "time": {
          "field": "order_date",
          "max_age": "30d"
        }
      }
    }
  ]
}