younifyd
Menu

Simulate template (POST /_index_template/_simulate/{name})

Simulate template

POST/_index_template/_simulate/{name}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Simulate template (POST /_index_template/_simulate/{name}) action (under indices).
  3. Fill in the fields below, then reference the result from later steps as {{simulateTemplatePostIndexTemplateSimulateName.response.data}}.

Request

Path parameters

namestringrequired

The name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body.

Query parameters

causestring

User defined reason for dry-run creating the new template for simulation purposes.

Default "false"

cluster_manager_timeoutstring

Operation timeout for connection to cluster-manager node.

createboolean

If `true`, the template passed in the body is only used if no existing templates match the same index patterns. If `false`, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.

Default false

master_timeoutstring

Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

Returns 200 with an object. Read it in later steps with {{simulateTemplatePostIndexTemplateSimulateName.response.data.<field>}}.

overlappingarray<object>
namestringrequired

The name of a resource or configuration element.

index_patternsarray<string>required

The list of index patterns that may overlap with other templates.

templateobject

The configuration for an index template simulation.

aliasesobjectrequired

The map of alias names to their configurations.

mappingsobject15 fields
settingsobjectrequired40 fields

The configuration settings for an index.

json
{
  "template": {
    "aliases": {},
    "settings": {
      "index": {},
      "mode": "string",
      "routing_path": null,
      "soft_deletes": {
        "enabled": null,
        "retention": {
          "type": null,
          "description": null
        },
        "retention_lease": {
          "type": null,
          "description": null
        }
      },
      "soft_deletes.retention_lease.period": "string",
      "sort": {
        "field": null,
        "order": null,
        "mode": null,
        "missing": null
      },
      "number_of_shards": null,
      "number_of_replicas": null,
      "number_of_routing_shards": null,
      "check_on_startup": "checksum",
      "codec": "string",
      "routing_partition_size": null
    },
    "mappings": {
      "all_field": {
        "analyzer": "string",
        "enabled": false,
        "omit_norms": false,
        "search_analyzer": "string",
        "similarity": "string",
        "store": false,
        "store_term_vector_offsets": false,
        "store_term_vector_payloads": false,
        "store_term_vector_positions": false,
        "store_term_vectors": false
      },
      "date_detection": false,
      "dynamic": null,
      "dynamic_date_formats": [
        "string"
      ],
      "dynamic_templates": [
        {}
      ],
      "_field_names": {
        "enabled": false
      },
      "index_field": {
        "enabled": false
      },
      "_meta": {},
      "numeric_detection": false,
      "properties": {},
      "_routing": {
        "required": false
      },
      "_size": {
        "enabled": false
      }
    }
  },
  "overlapping": [
    {
      "name": "string",
      "index_patterns": [
        "string"
      ]
    }
  ]
}

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.