# Removed support fields on body for POST request for field\_caps API

**URL:** <https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765>\
**Category:** Elasticsearch\
**Created:** [May 15, 2022, 10:15pm UTC](https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765 "2022-05-15T22:15:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleksandr\_Priadko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oleksandr_priadko/32/105677_2.png) [@Oleksandr\_Priadko](https://discuss.elastic.co/u/Oleksandr_Priadko)\
**Post date:** [May 15, 2022, 10:15pm UTC](https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765/1 "2022-05-15T22:15:12Z")

</div>

On ES v 6.4 API like that

```nohighlight
{
   "fields" : ["rating"]
}

```

was deprecated and removed on v 7.x

Now I have to use only URI fields request  
`GET /<target>/_field_caps?fields=<fields>`

`POST /<target>/_field_caps?fields=<fields>`

Now I have an issue where we can create a request with fields provided on URI because of possible 414 (Request-URI Too Long)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 15, 2022, 11:52pm UTC](https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765/2 "2022-05-15T23:52:44Z")

</div>

Hi @Oleksandr_Priadko Welcome to the community!

Edit Darn I read that wrong.

Yes the body request for `field_caps` was deprecated in 6.4 and removed in 7.x that is correct

You can use wildcards if that will help.

---

<div class="post-metadata">

**Author:** ![Oleksandr\_Priadko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oleksandr_priadko/32/105677_2.png) [@Oleksandr\_Priadko](https://discuss.elastic.co/u/Oleksandr_Priadko)\
**Post date:** [May 16, 2022, 12:30am UTC](https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765/3 "2022-05-16T00:30:08Z")

</div>

Thank you for your answer @stephenb , but for me it is strange, to use on URI something that may be huge. What is the reason to remove it from the body?

Using wildcards isn't a solution, because a user may have in the result some fields that weren't requested.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 16, 2022, 12:33am UTC](https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765/4 "2022-05-16T00:33:07Z")

</div>

I don't have insight on why it was removed. We'd have to go find the PR.

You absolutely can open a feature request and ask for it back.

I agree, it seems a little odd to me too.

---

<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:** [June 13, 2022, 12:34am UTC](https://discuss.elastic.co/t/removed-support-fields-on-body-for-post-request-for-field-caps-api/304765/5 "2022-06-13T00:34:06Z")

</div>

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