opensearch-project / opensearch-project/data-prepper

[BUG] opensearch_api source: _bulk endpoint returns empty HTTP 200 with no JSON body

Open
#6,877 0 comments 0 reactions 1 assignee View on GitHub

@divakarsingh is already working on this.

Since May 26, 2026.

enhancement
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Describe the bug
The opensearch_api source _bulk endpoint returns an empty HTTP 200 response with no body. Clients using RestHighLevelClient (Flink OpenSearch Connector, Logstash, opensearch-py) expect a JSON response matching the OpenSearch _bulk API format: {took, errors, items[]} and fail with "Unable to parse response body" / NullPointerException.

To Reproduce

  1. Configure Data Prepper with opensearch_api source
  2. Send a _bulk request from any standard OpenSearch client (e.g. Flink OpenSearch Connector, opensearch-py, curl)
  3. Observe empty response body - no JSON returned

Expected behavior
The _bulk endpoint should return a JSON response with {took, errors, items[]} matching the OpenSearch Bulk API response format, so standard clients can parse it without error.

Screenshots
N/A

Environment (please complete the following information):

  • OS: Linux
  • Version: Data Prepper 2.15.1 / main branch

Additional context
Forum report: https://forum.opensearch.org/t/data-prepper-opensearch-api-return-value-for-bulk-endpoint-is-wrong/28068

The issue is in OpenSearchAPIService.processBulkRequest() which returns HttpResponse.of(HttpStatus.OK) with no body.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.