Skip to main content

OpenSearch

OpenSearch is an open-source search and analytics suite for ingesting, searching, visualizing, and analyzing data. This connector uses the OpenSearch cluster REST API to check cluster and node health, list and inspect indices, run Query DSL searches, retrieve documents, and write data back through single-document, bulk, index-creation, and mapping-management operations.

OpenSearch icon

Power end-to-end data operations for your OpenSearch API with Nexla. Our bi-directional OpenSearch connector is purpose-built for OpenSearch, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to OpenSearch or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your OpenSearch workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating an OpenSearch credential, you need the base URL of your OpenSearch cluster and a username and password for a user that the cluster's Security plugin recognizes. The OpenSearch REST API uses HTTP Basic authentication, so requests are authenticated with these credentials against the cluster endpoint.

To gather the required information, complete the following steps:

  1. Identify the base URL of your OpenSearch cluster. For a self-hosted cluster, this is the cluster endpoint and port, for example https://my-cluster.example.com:9200. For a managed deployment, this is the domain endpoint for your AWS OpenSearch Service domain or the endpoint for your OpenSearch Serverless collection.

  2. Confirm that the cluster's Security plugin is enabled and that HTTP Basic authentication against the internal user database is in use. The internal user database stores users, their hashed passwords, and their role assignments.

  3. Obtain a username and password for a user with permission to run the APIs you plan to use. An administrator can create an internal user in OpenSearch Dashboards under Security > Internal users, or through the Security REST API at _plugins/_security/api/internalusers/. On AWS OpenSearch Service with fine-grained access control, use the master user (or another user configured through the internal user database).

  4. Map the user to one or more roles that grant the required cluster and index permissions. Read operations (cluster health, cat APIs, node stats, search, and get document) require read access to the relevant cluster and index resources, while write operations (index document, bulk, create index, and update mapping) require the corresponding write permissions.

  5. Note the name of the index that index-scoped operations should target by default. This value is used as the default index for the search, get index, get document, index document, create index, and update mapping endpoints unless overridden per endpoint.

For complete information about authentication backends, users, and roles, see the OpenSearch Security documentation and the OpenSearch API reference.

Authenticate

Credentials required

HTTP Basic auth against a self-hosted OpenSearch cluster secured by the Security plugin. Needs the cluster base URL plus a username/password.

FieldRequiredSecretDescription
Base URLYesNoThe OpenSearch cluster endpoint, e.g. https://my-cluster.example.com:9200 (self-hosted) or the domain endpoint for an AWS OpenSearch Service / OpenSearch Serverless collection.
UsernameYesNoOpenSearch Security plugin username with permission to run the selected APIs.
PasswordYesYesPassword for the OpenSearch Security plugin user.
Default Index NameYesNoDefault index used by index-scoped endpoints (search, get index, get/index document, create index, update mapping) unless overridden per-endpoint.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

  2. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  3. Enter your OpenSearch cluster endpoint in the Base URL field, including the protocol and port where applicable (for example, https://my-cluster.example.com:9200). This endpoint is used for the connection test and to construct every API request.

  4. Enter the OpenSearch Security plugin username in the Username field and its password in the Password field. These credentials are sent using HTTP Basic authentication and must belong to a user with permission to run the endpoints you intend to use.

  5. Enter the default index for index-scoped operations in the Default Index Name field. This index is used by the search, get index, get document, index document, create index, and update mapping endpoints unless a specific endpoint overrides it.

    Nexla validates the credential by calling the cluster health endpoint (/_cluster/health) on the base URL you provide, so the user must be able to reach the cluster and read its health status.

    For more information about defining users and roles, see the OpenSearch access control documentation.

  6. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the OpenSearch connector tile, then select the credential that will be used to connect to the OpenSearch cluster, and click Next; or, create a new OpenSearch credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common OpenSearch endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

[Rest API] Cluster Health

Get the health status (green/yellow/red) of the OpenSearch cluster.

  • This endpoint calls the cluster health API and returns a single record summarizing overall cluster status, along with shard and node counts. Use it to monitor cluster availability or to gate downstream flows on cluster state.

For detailed information about the response fields, see the OpenSearch Cluster Health API documentation.

[Rest API] List Indices (cat)

List all indices in the cluster with health, status, doc count, and size, via the cat API.

  • This endpoint calls the cat indices API and returns one record per index, including health, status, document count, and storage size. Use it to inventory the indices in your cluster or to drive index-level reporting.

For detailed information about the returned columns, see the OpenSearch cat indices API documentation.

[Rest API] Get Index

Get settings, mappings, and aliases for the default index.

  • This endpoint returns the configuration of the index named in the credential's Default Index Name field, including its settings, field mappings, and aliases. Use it to inspect how an index is defined before searching or writing to it.

For detailed information about the response structure, see the OpenSearch Get Index API documentation.

[Rest API] Search Documents

Run a Query DSL search against the default index and return matching hits.

  • This endpoint runs a search against the index named in the credential's Default Index Name field and returns the matching hits. Enter the Query DSL request body in the Search Query (JSON) field, for example {"query":{"match_all":{}}} to return all documents. Adjust the query to filter, sort, or page through results as needed.

For detailed information about Query DSL and search request bodies, see the OpenSearch Search API documentation.

[Rest API] Get Document

Get a single document by ID from the default index.

  • This endpoint retrieves one document from the index named in the credential's Default Index Name field. Enter the unique identifier of the document to retrieve in the Document ID field.

For detailed information about retrieving documents, see the OpenSearch Get Document API documentation.

[Rest API] List Nodes (cat)

List cluster nodes with role, load, heap, and disk usage, via the cat API.

  • This endpoint calls the cat nodes API and returns one record per node, including node role, load, heap usage, and disk usage. Use it to monitor cluster capacity or to feed node-level operational reporting.

For detailed information about the returned columns, see the OpenSearch cat nodes API documentation.

[Rest API] Node Stats

Get detailed statistics (JVM, OS, indices, thread pools) for all cluster nodes.

  • This endpoint calls the nodes stats API and returns detailed metrics for every node in the cluster, covering JVM, operating system, indices, and thread pool activity. Use it for in-depth performance monitoring and capacity analysis.

For detailed information about the available statistics, see the OpenSearch Nodes Stats API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

OpenSearch data sources can also be manually configured to ingest data from any valid OpenSearch REST API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new OpenSearch data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the OpenSearch destination, and select the Send to Destination option from the menu. Select the OpenSearch connector from the list of available destination connectors, then select the credential that will be used to connect to the OpenSearch cluster, and click Next; or, create a new OpenSearch credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common OpenSearch endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

[Rest API] Index Document

Create or replace a document in the default index (auto-generated ID if none given).

  • This endpoint sends each record from your Nexset as a JSON document to the index named in the credential's Default Index Name field. Optionally enter a value in the Document ID field to control the document identifier; leave it blank to let OpenSearch auto-generate an ID on each write.

For detailed information about indexing documents, see the OpenSearch Index Document API documentation.

[Rest API] Bulk Operations

Run a batch of index/create/update/delete operations in a single request (NDJSON body).

  • This endpoint sends data to the cluster's bulk API so that multiple index, create, update, or delete operations can be performed in a single request. The request body must be formatted as newline-delimited JSON (NDJSON), where each action line is followed by its corresponding document line where applicable.

For detailed information about the required NDJSON format, see the OpenSearch Bulk API documentation.

[Rest API] Create Index

Create the default index with the given settings and mappings.

  • This endpoint creates the index named in the credential's Default Index Name field. Send the index settings and mappings as the JSON request body to define the new index's configuration.

For detailed information about index settings and mappings, see the OpenSearch Create Index API documentation.

[Rest API] Update Mapping

Add or update field mappings for the default index.

  • This endpoint adds or updates field mappings on the index named in the credential's Default Index Name field. Send the mapping definition as the JSON request body to introduce new fields or adjust the mapping of existing ones, subject to the OpenSearch rules for mapping changes.

For detailed information about updating mappings, see the OpenSearch Put Mapping API documentation.

Manual configuration

OpenSearch destinations can also be manually configured to send data to any valid OpenSearch REST API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

OpenSearch APIs expect JSON for single-document, index-creation, and mapping operations, and newline-delimited JSON (NDJSON) for the bulk endpoint. For operations that target a specific document, include the document ID at the end of the URL.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured OpenSearch endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the OpenSearch endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.