Wiki

Clone wiki

enterobase-web / api_reldate_parameter

Top level links:

The reldate API parameter

Refer to interactive documentation : http://enterobase.warwick.ac.uk/api/v2.0/swagger-ui

reldate is a parameter for several query methods in the API and can have an integer value. (The name stands for "relative date".) The value is the maximum age in days of content in the query result. For example, if reldate is 20 then the query will include everything from the past 20 days that otherwise matches the query.

An example of this is the assemblies query

http://enterobase.warwick.ac.uk/api/v2.0/senterica/assemblies?orderby=barcode&only_fields=download_fastq_link&only_fields=lastmodified&limit=5&reldate=10&assembly_status=Assembled&sortorder=asc

giving the result

{
  "Assemblies": [
    {
      "download_fastq_link": "http://enterobase.warwick.ac.uk/upload/download?assembly_barcode=SAL_EA1795AA_AS&database=senterica&file_format=fastq",
      "lastmodified": "2017-05-02T13:00:26.643198+00:00"
    },
    {
      "download_fastq_link": "http://enterobase.warwick.ac.uk/upload/download?assembly_barcode=SAL_IA5204AA_AS&database=senterica&file_format=fastq",
      "lastmodified": "2017-05-01T22:02:56.892765+00:00"
    },
    {
      "download_fastq_link": "http://enterobase.warwick.ac.uk/upload/download?assembly_barcode=SAL_KA9491AA_AS&database=senterica&file_format=fastq",
      "lastmodified": "2017-04-30T17:32:38.119705+00:00"
    },
    {
      "download_fastq_link": "http://enterobase.warwick.ac.uk/upload/download?assembly_barcode=SAL_MA6721AA_AS&database=senterica&file_format=fastq",
      "lastmodified": "2017-04-28T08:31:08.800341+00:00"
    },
    {
      "download_fastq_link": "http://enterobase.warwick.ac.uk/upload/download?assembly_barcode=SAL_MA6715AA_AS&database=senterica&file_format=fastq",
      "lastmodified": "2017-04-28T08:31:08.675781+00:00"
    }
  ],
  "links": {
    "paging": {
      "next": "http://enterobase.warwick.ac.uk/api/v2.0/senterica/assemblies?orderby=barcode&assembly_status=Assembled&only_fields=download_fastq_link&limit=5&reldate=10&offset=5&sortorder=asc"
    },
    "records": 5,
    "total_records": 885
  }
}

Updated