I am currently researching for an elegant way, for my REST API under development, to express filters for GET requests returning collections. I'd like to express queries as "http://[...]?filter=expressions", where I am going to evaluate the expressions part. I have a feeling, that a flexible approach would trigger the need for a simple Query DSL? The closest to a good formal specification I found so far is
http://www.juniper.net/techpubs/en_US/junos-space-sdk/13.1/apiref/com.juniper.junos_space.sdk.help/html/reference/Commonbehav.html#step8
I was wondering, if ANTLR is the tool to look at? But since this should be such a common necessity, I was wondering, if there is some REST API query standard DSL something available?
A bit confused greetings and thx for your input :)
OData 4 (http://www.odata.org/) has a very complete query syntax and supports the E-R data model with navigation, filtering, expressions, etc. The MSFT Azure AD Graph API is based on OData. The only downside is that the complete spec is pretty deep. There are a few open source implementations, Apache Olingo (http://olingo.apache.org/) being one with support for Java clients and servers. There are others as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With