Wiki
Clone wikienterobase-web / api_orderby_parameter
Top level links:
- Main top level page for all documentation
- EnteroBase Features
- Registering on EnteroBase and logging in
- Tutorials
- Using the API
- About the underlying pipelines and other internals
- How schemes in EnteroBase work
- FAQ
The orderby API parameter
Refer to interactive documentation : http://enterobase.warwick.ac.uk/api/v2.0/swagger-ui
orderby
is a parameter for several query methods in the API and can be set to the name
of one of the fields in the query method's results, in order to sort on that field. Where this
option is available it generally takes the value "barcode" by default (see the
interactive documentation for details).
An example of this is the below query sorting on n50 in ascending order
http://enterobase.warwick.ac.uk/api/v2.0/senterica/assemblies?orderby=n50&only_fields=download_fastq_link&only_fields=n50&limit=5&reldate=10&assembly_status=Assembled&sortorder=asc
giving the result
???
Note that the behaviour when sorting on a field with a date (such as "lastmodified") is currently undefined and in particular is not expected to sort in chronological order.
Updated