# How to pretty-print response of a curl request of information?

**URL:** <https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151>\
**Category:** Elasticsearch\
**Created:** [January 7, 2019, 7:01am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151 "2019-01-07T07:01:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [January 7, 2019, 7:01am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151/1 "2019-01-07T07:01:26Z")

</div>

When I execute curl host IP:9200/\_nodes?filter\_path=\*\*.bootstrap, it returns with the following:  
{"nodes":{"idI\_aGgSRpuwcFXfQ2UrUA":{"settings":{"bootstrap":{"memory\_lock":"true"}}}}}

How can I pretty-print it?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 7, 2019, 7:11am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151/2 "2019-01-07T07:11:14Z")

</div>

`curl host IP:9200/_nodes?filter_path=**.bootstrap&pretty` should do it.

---

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [January 7, 2019, 7:16am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151/3 "2019-01-07T07:16:16Z")

</div>

It returns that bash: pretty: command not found...

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 7, 2019, 7:35am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151/4 "2019-01-07T07:35:00Z")

</div>

`curl host "IP:9200/_nodes?filter_path=**.bootstrap&pretty"` - needs quotes.

---

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [January 7, 2019, 7:51am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151/5 "2019-01-07T07:51:22Z")

</div>

yes! Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 4, 2019, 7:51am UTC](https://discuss.elastic.co/t/how-to-pretty-print-response-of-a-curl-request-of-information/163151/6 "2019-02-04T07:51:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
