Wiki
Clone wikienterobase-web / api_strainsversion
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 strainsversion query method
Refer to interactive documentation : http://enterobase.warwick.ac.uk/api/v2.0/swagger-ui#!/Strainsversion
The strainsversion
query method shows previous versions of the strain metadata such as host, geography
and lab contacts.
An example of this type of query to try in the interactive documentation has database set to "senterica" and "strain name" set to "FSIS1605678" which corresponds to a request to the URL
http://enterobase.warwick.ac.uk/api/v2.0/senterica/strainsversion?strain_name=FSIS1605678
giving the result with no old versions
{ "StrainsArchive": [], "links": { "paging": {}, "records": 0, "total_records": 0 } }
Another example of this type of query to try in the interactive documentation has database set to "senterica" and "strain name" set to "RM_172" which corresponds to a request to the URL
http://enterobase.warwick.ac.uk/api/v2.0/senterica/strainsversion?strain_name=RM_172
giving the results with one old version
{ "StrainsArchive": [ { "antigenic_formulas": "", "assembly_barcode": "SAL_AA0630AA", "city": null, "collection_date": null, "collection_month": null, "collection_time": null, "collection_year": 2006, "comment": null, "continent": "North America", "country": "USA", "county": null, "created": "2015-08-26T15:04:33.345763+00:00", "lab_contact": "R. Meinersmann (USDA)", "lastmodified": "2015-08-26T15:04:33.345796+00:00", "latitude": null, "longitude": null, "postcode": null, "region": null, "secondary_sample_accession": "NA", "serotype": "Agona", "source_details": "River", "source_niche": null, "source_type": "Environment", "strain_barcode": "SAL_AA0630AA", "strain_name": "RM_172", "uberstrain": "SAL_AA0630AA", "version": 1 } ], "links": { "paging": {}, "records": 1, "total_records": 1 } }
And the request for "strain name" set to "Ragna", also using "only_fields":
http://hercules.warwick.ac.uk/api/v2.0/senterica/strainsversion?only_fields=city&only_fields=collection_year&only_fields=country&only_fields=lastmodified&only_fields=serotype&only_fields=source_details&only_fields=source_type&only_fields=strain_barcode&only_fields=strain_name&only_fields=version&strain_name=Ragna
gives 9 old versions:
{ "StrainsArchive": [ { "city": "Trondheim", "collection_year": 1800, "country": "Norway", "lastmodified": "2016-10-28T13:03:01.679343+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 1 }, { "city": "Trondheim", "collection_year": null, "country": "Norway", "lastmodified": "2016-10-28T15:49:55.690802+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 2 }, { "city": "Trondheim", "collection_year": null, "country": "Norway", "lastmodified": "2016-10-28T15:50:15.275379+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 3 }, { "city": "Trondheim", "collection_year": null, "country": "Norway", "lastmodified": "2016-10-28T16:21:11.895341+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 4 }, { "city": "Trondheim", "collection_year": null, "country": "Norway", "lastmodified": "2016-11-02T16:23:51.261721+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 5 }, { "city": "Trondheim", "collection_year": 1200, "country": "Norway", "lastmodified": "2016-11-02T18:50:51.950894+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 6 }, { "city": "Trondheim", "collection_year": 1200, "country": "Norway", "lastmodified": "2016-12-01T11:56:01.862835+00:00", "serotype": "Paratyphi C", "source_details": "Teeth and long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 7 }, { "city": "Trondheim", "collection_year": 1200, "country": "Denmark", "lastmodified": "2017-01-09T12:54:40.712442+00:00", "serotype": "Paratyphi C", "source_details": "Teeth, long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 8 }, { "city": "Trondheim", "collection_year": 1200, "country": "Norway", "lastmodified": "2017-01-09T12:55:14.647874+00:00", "serotype": "Paratyphi C", "source_details": "Teeth, long bone", "source_type": "Human", "strain_barcode": "SAL_HA1701AA", "strain_name": "Ragna", "version": 9 } ], "links": { "paging": {}, "records": 9, "total_records": 9 } }
Updated