younifyd
Menu

Get index template (GET /_index_template/{name})

Get index template

GET/_index_template/{name}

Use it in a workflow

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

Request

Path parameters

namestringrequired

The name of the index template to retrieve. Wildcard (*) expressions are supported.

Query parameters

cluster_manager_timeoutstring

Operation timeout for connection to cluster-manager node.

flat_settingsboolean

If `true`, returns settings in flat format.

Default false

localboolean

If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node.

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 {{getIndexTemplateGetIndexTemplateName.response.data.<field>}}.

index_templatesarray<object>
namestringrequired

The name of a resource or configuration element.

index_templateobjectrequired8 fields

The configuration for an index template.

json
{
  "index_templates": [
    {
      "name": "string",
      "index_template": {
        "index_patterns": null,
        "composed_of": [
          "string"
        ],
        "template": {
          "aliases": {},
          "mappings": {
            "all_field": {
              "analyzer": null,
              "enabled": null,
              "omit_norms": null,
              "search_analyzer": null,
              "similarity": null,
              "store": null,
              "store_term_vector_offsets": null,
              "store_term_vector_payloads": null,
              "store_term_vector_positions": null,
              "store_term_vectors": null
            },
            "date_detection": false,
            "dynamic": null,
            "dynamic_date_formats": [
              null
            ],
            "dynamic_templates": [
              null
            ],
            "_field_names": {
              "enabled": null
            },
            "index_field": {
              "enabled": null
            },
            "_meta": {},
            "numeric_detection": false,
            "properties": {},
            "_routing": {
              "required": null
            },
            "_size": {
              "enabled": null
            }
          },
          "settings": {
            "index": {},
            "mode": "string",
            "routing_path": null,
            "soft_deletes": {
              "enabled": null,
              "retention": null,
              "retention_lease": 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
          }
        },
        "version": 0,
        "priority": 0,
        "_meta": {},
        "allow_auto_create": false,
        "data_stream": {
          "hidden": false,
          "allow_custom_routing": false,
          "timestamp_field": {
            "name": "string"
          }
        }
      }
    }
  ]
}

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