opensearch-project / opensearch-project/data-prepper
[BUG] opensearch_api source: _bulk endpoint returns empty HTTP 200 with no JSON body
@divakarsingh is already working on this.
Since May 26, 2026.
- 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
- Configure Data Prepper with
opensearch_apisource - Send a
_bulkrequest from any standard OpenSearch client (e.g. Flink OpenSearch Connector, opensearch-py, curl) - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.