jirutka/rsql-parser

Empty Query

nitinja opened this issue · 2 comments

Hi Everyone,

This is more of a question than an issue.
Is there a way to send empty query to rsql endpoint in case I want to access all records at an endpoint?

I generally access my endpoint with rsql query as
http://localhost:8080/api/things/rsql?query=name=="john"

Can I use same endpoint (with "rsql" at end) with empty query? One way to do it is reverting to the bare endpoint (http://localhost:8080/api/things) but this needs switching URL to bare one.

I tried query="" but it doesn't work.

@nitinjadhav466 in http terms, query parameter is a request parameter and by standard rule, it can be omitted which means it is empty. You can do this by just removing it entirely in the url such as

http://localhost:8080/api/things/rsq

Logically, this should allow you to query all records without any filtering. But of course,it depends on your backend implementation, such as on how you integrate rsql-parser into your application.

Got it! Thanks.