Elasticsearch · Arazzo Workflow

Elasticsearch Bootstrap an Index

Version 1.0.0

Check the cluster is ready, create an index only if it does not already exist, and read back its settings and mappings.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AnalyticsDatabaseFull-Text SearchNoSQLSearchArazzoWorkflows

Provider

elasticsearch

Workflows

bootstrap-index
Idempotently create an Elasticsearch index and verify its resulting configuration.
Verifies cluster health, detects whether the index exists, creates it when missing, and reads back the resolved settings and mappings so the caller can confirm the index matches the intended definition.
4 steps inputs: index, mappings, settings outputs: clusterStatus, indexDefinition
1
checkClusterReady
Read cluster health before writing anything, so the workflow fails fast against a cluster that cannot accept an index creation.
2
probeIndex
Probe for the target index with a HEAD request. A 404 here is an expected answer, not a failure, so both 200 and 404 are treated as success and the status code drives the branch.
3
createIndex
Create the index with the supplied settings and mappings. Only reached when the probe returned 404, which keeps the workflow idempotent.
4
readIndex
Read the index back to confirm the settings and mappings Elasticsearch actually resolved, which may include defaults the caller did not supply.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Elasticsearch Bootstrap an Index
  summary: Check the cluster is ready, create an index only if it does not already exist, and read back its settings and mappings.
  description: >-
    The first thing any Elasticsearch integration does. The workflow confirms the
    cluster is in a serviceable state, probes for the target index, and branches:
    when the index is already present it skips straight to reading it back, and
    when it is absent it creates the index with the supplied settings and
    mappings before reading it back. This makes the flow idempotent and safe to
    re-run from a provisioning pipeline. Every step spells out its request inline
    so the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: clusterApi
  url: ../openapi/elasticsearch-cluster-api-openapi.yml
  type: openapi
- name: indexApi
  url: ../openapi/elasticsearch-index-api-openapi.yml
  type: openapi
workflows:
- workflowId: bootstrap-index
  summary: Idempotently create an Elasticsearch index and verify its resulting configuration.
  description: >-
    Verifies cluster health, detects whether the index exists, creates it when
    missing, and reads back the resolved settings and mappings so the caller can
    confirm the index matches the intended definition.
  inputs:
    type: object
    required:
    - index
    properties:
      index:
        type: string
        description: The name of the index to bootstrap (e.g. "products").
      settings:
        type: object
        description: Index settings such as number_of_shards and number_of_replicas.
      mappings:
        type: object
        description: The field mappings that define the index schema.
  steps:
  - stepId: checkClusterReady
    description: >-
      Read cluster health before writing anything, so the workflow fails fast
      against a cluster that cannot accept an index creation.
    operationId: clusterHealth
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      clusterName: $response.body#/cluster_name
      status: $response.body#/status
  - stepId: probeIndex
    description: >-
      Probe for the target index with a HEAD request. A 404 here is an expected
      answer, not a failure, so both 200 and 404 are treated as success and the
      status code drives the branch.
    operationId: indexExists
    parameters:
    - name: index
      in: path
      value: $inputs.index
    successCriteria:
    - condition: $statusCode == 200 || $statusCode == 404
    outputs:
      probeStatus: $statusCode
    onSuccess:
    - name: indexAlreadyPresent
      type: goto
      stepId: readIndex
      criteria:
      - condition: $statusCode == 200
    - name: indexMissing
      type: goto
      stepId: createIndex
      criteria:
      - condition: $statusCode == 404
  - stepId: createIndex
    description: >-
      Create the index with the supplied settings and mappings. Only reached when
      the probe returned 404, which keeps the workflow idempotent.
    operationId: createIndex
    parameters:
    - name: index
      in: path
      value: $inputs.index
    requestBody:
      contentType: application/json
      payload:
        settings: $inputs.settings
        mappings: $inputs.mappings
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      created: $response.body#/acknowledged
  - stepId: readIndex
    description: >-
      Read the index back to confirm the settings and mappings Elasticsearch
      actually resolved, which may include defaults the caller did not supply.
    operationId: getIndex
    parameters:
    - name: index
      in: path
      value: $inputs.index
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      indexDefinition: $response.body
  outputs:
    clusterStatus: $steps.checkClusterReady.outputs.status
    indexDefinition: $steps.readIndex.outputs.indexDefinition

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/elasticsearch-index-bootstrap-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.