Wiki

Clone wiki

enterobase-web / api_barcode_parameter

Top level links:

The barcode API parameter

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

barcode is a parameter for several query methods in the API and can have the barcode of a scheme, locus, allele, assembly, ST, trace, strain or other data requested. Barcodes are explained on the page about the API structure.

Several of the query methods also support a syntax for specifying the barcode by including it in the URL path (generally at the end of the path, before the parameters).

For example, a strain query for the barcode SAL_EA9564AA could be carried out either with
http://hercules.warwick.ac.uk/api/v2.0/senterica/strains?barcode=SAL_EA9564AA (with a HTTP GET request only)
or
http://hercules.warwick.ac.uk/api/v2.0/senterica/strains/SAL_EA9564AA (with either an HTTP GET or POST request).

both of these obtaining the results

{
  "Strains": [
    {
      "antigenic_formulas": null,
      "assembly_barcode": "SAL_KA3160AA",
      "city": null,
      "collection_date": null,
      "collection_month": null,
      "collection_time": null,
      "collection_year": 2015,
      "comment": null,
      "continent": "North America",
      "country": "United States",
      "county": null,
      "created": "2016-02-06T19:00:03.611332+00:00",
      "lab_contact": "United States Department of Agriculture, Food Safety and Inspection Service",
      "lastmodified": "2016-02-06T19:55:02.798303+00:00",
      "latitude": null,
      "longitude": null,
      "postcode": null,
      "region": "Iowa",
      "secondary_sample_accession": "SRS1278094",
      "serotype": "Agona",
      "source_details": "Animal-Swine-Sow",
      "source_niche": "Livestock",
      "source_type": "Air",
      "strain_barcode": "SAL_EA9564AA",
      "strain_name": "FSIS1605678",
      "uberstrain": "SAL_EA9564AA",
      "version": 1
    }
  ],
  "links": {
    "paging": {},
    "records": 1,
    "total_records": 1
  }
}

Updated