# Logstash HTTP output NDJSON with json\_batch

**URL:** https://discuss.elastic.co/t/logstash-http-output-ndjson-with-json-batch/359779
**Category:** Logstash
**Created:** [May 20, 2024, 5:36am UTC](https://discuss.elastic.co/t/logstash-http-output-ndjson-with-json-batch/359779 "2024-05-20T05:36:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gunlomboy](https://avatars.discourse-cdn.com/v4/letter/g/c0e974/32.png) [@gunlomboy](https://discuss.elastic.co/u/gunlomboy)
#### Post date: [May 20, 2024, 5:36am UTC](https://discuss.elastic.co/t/logstash-http-output-ndjson-with-json-batch/359779/1 "2024-05-20T05:36:20Z")

</div>

Hi,

I am trying to output batched newline delimited JSON using the logstash http output.

Can the json\_batch format be used together with the json\_lines codec to achieve this?

A similar query was posted here, but nobody seemed to respond.  
[https://discuss.elastic.co/t/using-ndjson-for-logstash-http-output-plugin/322683/1](https://discuss.elastic.co/t/using-ndjson-for-logstash-http-output-plugin/322683/1)

Thanks

---

<div class="post-metadata">

### Author: ![kercdbh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kercdbh/32/135712_2.png) [@kercdbh](https://discuss.elastic.co/u/kercdbh)
#### Post date: [July 2, 2024, 1:14pm UTC](https://discuss.elastic.co/t/logstash-http-output-ndjson-with-json-batch/359779/2 "2024-07-02T13:14:44Z")

</div>

it seems we're "that" close to have this NDJSON format in the logstash http output plugin

> <https://github.com/logstash-plugins/logstash-output-http/pull/112>
>
> Hello. I noticed that library don't have json\_lines format - so i fix it.
> Now f…ormat can support json\_lines
> 
> Also i added new config: batch\_url\_format (bool)
> When ienabled - you can forma url when you use batch body with format: json\_lines and json\_batch
