I want to create a Sinatra API route with optional query parameters.I'm able to add the query parameters as follows
%r{^/mysql/data/(?)/start_time=(?\w*)/?}
But the route corresponding to the above route is like "/mysql/data/:name/start_time=:start_time"
I need the query parameters as optional and to be declared in URL format.
Eg:
/mysql/data/:name?start_time=:start_time&end_time=:end_time
Is there any way in Sinatra to do this?