phac-nml / irida

Canada’s Integrated Rapid Infectious Disease Analysis Platform for Genomic Epidemiology
https://irida.ca
Apache License 2.0
40 stars 31 forks source link

Allow search/filtering on some REST API endpoints using URL query strings. #444

Open dfornika opened 5 years ago

dfornika commented 5 years ago

Describe your idea for a new feature

Allow search/filtering on some REST API endpoints using URL query strings.

Describe how you would access this feature?

REST API

Additional information

It would be helpful for client applications to be able to specify a subset of a resource collection, or allow the ability to select a specific resource using a different attribute besides the numeric IRIDA ID. The most obvious example would be the ability to select a sample by its sampleName attribute.

This would also involve adding documentation so is related to #104.

dfornika commented 5 years ago

This library may be a good solution to providing a more expressive query language for the IRIDA REST API:

https://github.com/jirutka/rsql-parser

There's a tutorial here:

https://www.baeldung.com/spring-rest-api-query-search-language-tutorial