younifyd
Menu

Create or update a component template (PUT)

Create or update a component template

PUT/_component_template/{name}

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Create or update a component template (PUT) action (under indices).
  3. Fill in the fields below, then reference the result from later steps as {{createOrUpdateAComponentTemplatePut.response.data}}.

Request

Path parameters

namestringrequired

Name of the component template to create. Elasticsearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.

Query parameters

createboolean

If `true`, this request cannot replace or update existing component templates.

causestring

User defined reason for create the component template.

master_timeoutoneOf

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.

Response

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

acknowledgedboolean

For a successful response, this value is always true. On failure, an exception is returned instead.

json
{
  "acknowledged": false
}

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

Create or update a component template (PUT) — Elasticsearch — Documentation