Get component templates Added in 7.8.0

GET /_component_template

Retrieves information about component templates.

Query parameters

  • If true, returns settings in flat format.

  • Return all default configurations for the component template (default: false)

  • local boolean

    If true, the request retrieves information from the local node only. If false, information is retrieved from the master node.

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

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • component_templates array[object] Required
      Hide component_templates attributes Show component_templates attributes object
      • name string Required
      • component_template object Required

        Additional properties are allowed.

        Hide component_template attributes Show component_template attributes object
        • template object Required

          Additional properties are allowed.

          Hide template attributes Show template attributes object
        • version number
        • _meta object
          Hide _meta attribute Show _meta attribute object
          • * object Additional properties

            Additional properties are allowed.

GET /_component_template
curl \
 -X GET http://api.example.com/_component_template
Response examples (200)
{
  "component_templates": [
    {
      "name": "string",
      "component_template": {
        "template": {
          "_meta": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "version": 42.0,
          "settings": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "mappings": {
            "all_field": {},
            "date_detection": true,
            "dynamic": "strict",
            "dynamic_date_formats": [
              "string"
            ],
            "dynamic_templates": [
              {}
            ],
            "_field_names": {},
            "index_field": {},
            "_meta": {},
            "numeric_detection": true,
            "properties": {},
            "_routing": {},
            "_size": {},
            "_source": {},
            "runtime": {},
            "enabled": true,
            "subobjects": true,
            "_data_stream_timestamp": {}
          },
          "aliases": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "lifecycle": {
            "data_retention": "string",
            "downsampling": {},
            "rollover": {}
          }
        },
        "version": 42.0,
        "_meta": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        }
      }
    }
  ]
}