Path parameters

  • sourcestring Required

    The source index or data stream name

  • deststring Required

    The destination index or data stream name

application/json

BodyRequired

  • Hide mappings_override attributes Show mappings_override attributes object
    • all_fieldobject
      Hide all_field attributes Show all_field attributes object
    • dynamicstring

      Values are strict, runtime, true, or false.

    • dynamic_templatesarray[object]
    • Hide _field_names attribute Show _field_names attribute object
    • Hide index_field attribute Show index_field attribute object
    • _metaobject
      Hide _meta attribute Show _meta attribute object
      • *object Additional properties
    • _routingobject
      Hide _routing attribute Show _routing attribute object
    • _sizeobject
      Hide _size attribute Show _size attribute object
    • _sourceobject
      Hide _source attributes Show _source attributes object
    • runtimeobject
      Hide runtime attribute Show runtime attribute object
      • *object Additional properties
        Hide * attributes Show * attributes object
        • fieldsobject

          For type composite

          Hide fields attribute Show fields attribute object
          • *object Additional properties
            Hide * attribute Show * attribute object
            • typestring Required

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

        • fetch_fieldsarray[object]

          For type lookup

          Hide fetch_fields attributes Show fetch_fields attributes object
          • fieldstring Required

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

          • formatstring
        • 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
          Hide script attributes Show script attributes object
          • sourcestring | object

            One of:
          • idstring
          • paramsobject

            Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.

            Hide params attribute Show params attribute object
            • *object Additional properties
          • langstring

            Any of:

            Values are painless, expression, mustache, or java.

          • optionsobject
            Hide options attribute Show options attribute object
            • *string Additional properties
        • typestring Required

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

    • enabledboolean
    • Values are true or false.

    • Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
  • Index settings
  • If index blocks should be removed when creating destination index (optional)

Responses

POST /_create_from/{source}/{dest}
POST _create_from/my-index/my-new-index
resp = client.perform_request(
    "POST",
    "/_create_from/my-index/my-new-index",
)
const response = await client.transport.request({
  method: "POST",
  path: "/_create_from/my-index/my-new-index",
});
response = client.perform_request(
  "POST",
  "/_create_from/my-index/my-new-index",
  {},
)
$requestFactory = Psr17FactoryDiscovery::findRequestFactory();
$request = $requestFactory->createRequest(
    "POST",
    "/_create_from/my-index/my-new-index",
);
$resp = $client->sendRequest($request);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_create_from/my-index/my-new-index"