Fix conflictual query execution endpoint-resolution when query name is 'aql'



Checking the Queyr API iI found we have:

Execute stored query: POST /query/{qualified_query_name}/{version}

with optional {version}

And Execute ad-hoc query: POST /query/aql 1

The issue is: the second is a special case of the first one, when the {quelified_name} is aql and {version} is not present.

How does a server differentiate one from the other? The first idea is because the stored query execution doesn’t have a body, which IMO is a little obscure. Personally I would suggest both endpoints don’t have overlapping cases, for instance, having a different paths for ad-hoc and stored queries.



Matija Polajnar
June 24, 2020, 7:57 AM

I suggest we change the ad-hoc query endpoint to just /query. If anyone implements multiple query languages, that could be implemented as different accepted content types.

Sebastian Iancu
July 1, 2020, 8:34 AM

To me, it seems the right way to fix this, we could do this in v1.1. The main question is the impact of this backwards incompatible change? is it acceptable and manageable by implementors of REST API?


Sebastian Iancu

Raised By

Pablo Pazos


Affects versions