# 7.11 APIs who don't need a body now return an error when provided with one

**URL:** <https://discuss.elastic.co/t/7-11-apis-who-dont-need-a-body-now-return-an-error-when-provided-with-one/265324>\
**Category:** Elasticsearch\
**Created:** [February 24, 2021, 10:51am UTC](https://discuss.elastic.co/t/7-11-apis-who-dont-need-a-body-now-return-an-error-when-provided-with-one/265324 "2021-02-24T10:51:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/malec/32/46127_2.png) [@Malec](https://discuss.elastic.co/u/Malec)\
**Post date:** [February 24, 2021, 10:51am UTC](https://discuss.elastic.co/t/7-11-apis-who-dont-need-a-body-now-return-an-error-when-provided-with-one/265324/1 "2021-02-24T10:51:05Z")

</div>

Hi,

I have been upgrading one of my clusters to 7.11.1 and much to my surprise there is a behavior change that I haven't been able to find in the breaking changes or in the "what's new" page for this release.

```auto
GET _cat/health
{
}

```

Now returns

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "request [GET /_cat/health] does not support having a body"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "request [GET /_cat/health] does not support having a body"
  },
  "status" : 400
}

```

Now, the problem was in my ansible playbook because my uri module had the `body_format: json` property set to check for cluster health so it was a good opportunity to clean up my code.

Since I haven't found any mentions of this behavior change in the documentation or in the github issues, I thought I would put it out there for everyone as a head's up. Maybe someone in the elastic team can add it to the documentation?

This also affects `POST _flush/synced` and many other APIs I suppose.

This is confirmed to work in 7.7.0 and I believe 7.10.2 too but it will return an error in 7.11.1

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 24, 2021, 1:08pm UTC](https://discuss.elastic.co/t/7-11-apis-who-dont-need-a-body-now-return-an-error-when-provided-with-one/265324/2 "2021-02-24T13:08:09Z")

</div>

I also don't see anything in the release notes about this. Would you report it as a bug on Github? I'm not sure whether this was deliberate or not, but we've definitely changed some behaviour between 7.10.2 and 7.11.1.

---

<div class="post-metadata">

**Author:** ![Malec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/malec/32/46127_2.png) [@Malec](https://discuss.elastic.co/u/Malec)\
**Post date:** [February 24, 2021, 1:34pm UTC](https://discuss.elastic.co/t/7-11-apis-who-dont-need-a-body-now-return-an-error-when-provided-with-one/265324/3 "2021-02-24T13:34:57Z")

</div>

Issue created!

> <https://github.com/elastic/elasticsearch/issues/69532>
>
> Elasticsearch version (bin/elasticsearch --version): 7.11.1 - docker image
> Description of the problem including expected versus actual behavior:
> Hi,
> I have been upgrading one of...

---

<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:** [March 24, 2021, 1:35pm UTC](https://discuss.elastic.co/t/7-11-apis-who-dont-need-a-body-now-return-an-error-when-provided-with-one/265324/4 "2021-03-24T13:35:22Z")

</div>

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