I am designing a RESTful API. I need to retrieve a resource (complex report) passing a really long list of filters. Something like this:
So I should use GET HTTP verb but if URI exceeds the allowed URL length (by browser, web server or intermediate proxies), can I use POST request with JSON body encapsulating filters to do so? The POST verb is intended for creating resources and updating partially but not for retrieving resources. How can I solve this situation. Please tell me a solution that conforms to REST fundamentals because encoding URL to decrease the length is not an agreeable solution. I have been researching a lot about this but I didn't find a proper and definitive guidelines. Any help will be appreciated.