Removed support fields on body for POST request for field_caps API

On ES v 6.4 API like that

   "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)

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.

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.

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.

1 Like

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