younifyd
Menu

Get component template (GET /_component_template)

Get component template

GET/_component_template

Use it in a workflow

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

Request

Query parameters

cluster_manager_timeoutstring

The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).

flat_settingsboolean

Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. For example, the flat form of `"cluster": { "max_shards_per_node": 500 }` is `"cluster.max_shards_per_node": "500"`.

Default false

localboolean

When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node.

Default false

master_timeoutstring

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.

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

component_templatesarray<object>
namestringrequired

The name of a resource or configuration element.

component_templateobjectrequired3 fields
json
{
  "component_templates": [
    {
      "name": "string",
      "component_template": {
        "template": {
          "_meta": {},
          "version": 0,
          "settings": {},
          "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
            }
          },
          "aliases": {}
        },
        "version": 0,
        "_meta": {}
      }
    }
  ]
}

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