# Request Body is Required

**URL:** <https://discuss.elastic.co/t/request-body-is-required/321139>\
**Category:** Kibana\
**Created:** [December 13, 2022, 2:31pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139 "2022-12-13T14:31:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_s/32/97631_2.png) [@Jonas\_S](https://discuss.elastic.co/u/Jonas_S)\
**Post date:** [December 13, 2022, 2:31pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/1 "2022-12-13T14:31:15Z")

</div>

Hello,

every time i try to use the Kibana Dev Tools, if the request has a body it fails with this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/d/bd8aab0923e26d04652999296abbc6cca539297c.png)

Yes, there are no newlines and also the request body is there:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fe9166242997ce9715a0bf663998825c4d1d4110.png)

I saw many similar threads, but all without solutions:  
[https://discuss.elastic.co/t/how-to-understand-the-error-of-reindex-request-body-is-required/300278](https://discuss.elastic.co/t/how-to-understand-the-error-of-reindex-request-body-is-required/300278)  
[https://discuss.elastic.co/t/request-body-is-required/275691](https://discuss.elastic.co/t/request-body-is-required/275691)  
[https://discuss.elastic.co/t/reindex-fails-in-kibana-devtools-console-but-succeeds-on-command-line-using-curl/237266](https://discuss.elastic.co/t/reindex-fails-in-kibana-devtools-console-but-succeeds-on-command-line-using-curl/237266)

Did anyone find out in the meantime what causes this?

Best regards  
Jonas

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [December 13, 2022, 2:43pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/2 "2022-12-13T14:43:27Z")

</div>

Hi Jonas,

I'm guessing there are extra characters somewhere in the request that are causing the error. Sadly it's difficult to tell as you've provided a screenshot rather than the raw console request.

I found this one worked for me, which I built using the autocomplete in the console.

```auto
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}

```

Can you give that a try? Or alternatively use the autocomplete (control + space on Mac) to form the body of the request and then add the string property name.

Let me know if that works out!

---

<div class="post-metadata">

**Author:** ![Jonas\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_s/32/97631_2.png) [@Jonas\_S](https://discuss.elastic.co/u/Jonas_S)\
**Post date:** [December 13, 2022, 2:46pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/3 "2022-12-13T14:46:06Z")

</div>

No, there is absolutely no formatting problem here. I already posted a screenshot of the request body in the browser.

I tried your snippet and of course it is the same.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [December 13, 2022, 3:03pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/4 "2022-12-13T15:03:59Z")

</div>

Thanks for clarifying. Did you also try recreating using the autocompletion to ensure there aren't any other characters such as extra spaces that could be causing the issue?

Can you also share your snippet using the code tags rather than the screenshot so we can try and reproduce?

---

<div class="post-metadata">

**Author:** ![Jonas\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_s/32/97631_2.png) [@Jonas\_S](https://discuss.elastic.co/u/Jonas_S)\
**Post date:** [December 13, 2022, 3:06pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/5 "2022-12-13T15:06:49Z")

</div>

Yes, there are no spaces.

```auto
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}

```

But really, the request does not matter. I just took one from your upgrading tutorial. Any request with a body fails with this error and i tried it many times

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [December 13, 2022, 3:18pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/6 "2022-12-13T15:18:24Z")

</div>

Thanks for confirming it's not just the cluster request type. The requests are working on my side on my toy cluster, which is 8.4. So I'm not able to reproduce. Not sure which version you're on?

It might be worth reaching out via [Elastic support](https://www.elastic.co/cloud/elasticsearch-service/support) or alternatively raising a GitHub issue on Kibana for this one. Unless others from the community come back with other ideas...

---

<div class="post-metadata">

**Author:** ![Jonas\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_s/32/97631_2.png) [@Jonas\_S](https://discuss.elastic.co/u/Jonas_S)\
**Post date:** [December 13, 2022, 3:24pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/7 "2022-12-13T15:24:23Z")

</div>

I'm currently on 8.5.2, but had this problem since some months now, also with previous versions. I was hoping that a new version would fix it, but as it seems it happens only under certain conditions.  
But clearly i'm not the only one having the issue.  
I was also thinking if it can be network problems or certificate related, but then other requests without a body would also fail, right?  
And i'm having no problem at all with requests without a body.

The support link you posted is only for cloud? We have an on prem stack. As i understand there is no support for it without a licence, right?

Github issue: [Request body is required · Issue #147457 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/147457)

---

<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:** [January 10, 2023, 3:24pm UTC](https://discuss.elastic.co/t/request-body-is-required/321139/8 "2023-01-10T15:24:28Z")

</div>

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