| Literature DB >> 29220452 |
Keith A Jolley1, James E Bray1, Martin C J Maiden1.
Abstract
Database URL: http://rest.pubmlst.org/.Entities:
Mesh:
Year: 2017 PMID: 29220452 PMCID: PMC5550937 DOI: 10.1093/database/bax060
Source DB: PubMed Journal: Database (Oxford) ISSN: 1758-0463 Impact factor: 3.451
PubMLST API methods*
| HTTP method | Description | |
|---|---|---|
| / | GET | List site resources |
| /db/{database} | GET | List database resources |
| /db/{database}/loci | GET | List loci |
| /db/{database}/loci/{locus} | GET | Retrieve locus record |
| /db/{database}/loci/{locus}/alleles | GET | Retrieve list of alleles defined for a locus |
| /db/{database}/loci/{locus}/alleles_fasta | GET | Download alleles in FASTA format |
| /db/{database}/loci/{locus}/alleles/{allele_id} | GET | Retrieve full allele information |
| /db/{database}/loci/{locus}/sequence | POST | Query sequence to identify allele |
| /db/{database}/sequence | POST | Query sequence to identify allele without specifying locus |
| /db/{database}/schemes | GET | List schemes |
| /db/{database}/schemes/{scheme_id} | GET | Retrieve scheme information |
| /db/{database}/schemes/{scheme_id}/fields/{field} | GET | Retrieve scheme field information |
| /db/{database}/schemes/{scheme_id}/profiles | GET | List allelic profiles defined for scheme |
| /db/{database}/schemes/{scheme_id}/profiles_csv | GET | Download allelic profiles in tab-delimited text format |
| /db/{database}/schemes/{scheme_id}/profiles/{profile_id} | GET | Retrieve allelic profile record |
| /db/{database}/isolates | GET | Retrieve list of isolate records |
| /db/{database}/isolates/{isolate_id} | GET | Retrieve isolate record |
| /db/{database}/isolates/{isolate_id}/allele_designations | GET | Retrieve list of allele designations |
| /db/{database}/isolates/{isolate_id}/allele_designations/{locus} | GET | Retrieve full allele designation record |
| /db/{database}/isolates/{isolate_id}/allele_ids | GET | Retrieve allele identifiers (abbreviated allele designations) |
| /db/{database}/isolates/{isolate_id}/schemes/{scheme_id}/allele_ designations | GET | Retrieve scheme allele designations records |
| /db/{database}/isolates/{isolate_id}/schemes/{scheme_id}/allele_ids | GET | Retrieve list of scheme allele identifiers |
| /db/{database}/isolates/{isolate_id}/contigs | GET | Retrieve list of sequence contigs |
| /db/{database}/isolates/{isolate_id}/contigs_fasta | GET | Download isolate contigs in FASTA format |
| /db/{database}/contigs/{contig_id} | GET | Retrieve contig record |
| /db/{database}/isolates/search | POST | Search isolate database |
| /db/{database}/fields | GET | Retrieve list of isolate provenance field descriptions |
| /db/{database}/fields/{field} | GET | Retrieve values set for a provenance field |
| /db/{database}/users/{user_id} | GET | Retrieve submitter/curator information |
| /db/{database}/projects | GET | Retrieve list of projects |
| /db/{database}/projects/{project_id} | GET | Retrieve project information |
| /db/{database}/projects/{project_id}/isolates | GET | Retrieve list of isolates belonging to a project |
| /db/{database}/submissions | GET | Retrieve list of your submissions |
| /db/{database}/submissions | POST | Create new submission |
| /db/{database}/submissions/{submission_id} | GET | Retrieve submission record |
| /db/{database}/submissions/{submission_id} | DELETE | Delete submission record |
| /db/{database}/submissions/{submission_id}/messages | GET | Retrieve submission correspondence |
| /db/{database}/submissions/{submission_id}/messages | POST | Add submission correspondence |
| /db/{database}/submissions/{submission_id}/files | GET | Retrieve list of supporting files uploaded for submission |
| /db/{database}/submissions/{submission_id}/files | POST | Upload submission supporting file |
| /db/{database}/submissions/{submission_id}/files/{filename} | GET | Download submission supporting file |
| /db/{database}/submissions/{submission_id}/files/{filename} | DELETE | Delete submission supporting file |
Substitute field values where terms are enclosed in {curly brackets}. Submission methods require OAuth authentication to identify the user.
Figure 1.Schematic of API structure. Method calls are written within boxes, with the complete URL constructed by appending the hierarchical values from the root. Terms written in curly brackets represent specific entity values. Dashed lines show where the output from one method include calls to further methods. For example, a scheme record will link to member loci, whereas a locus record will include links to schemes of which it is a member.
Figure 2.Retrieving an isolate record. A HTTP GET call to http://rest.pubmlst.org/db/{database}/isolates/{isolate_id} can be used to return an isolate record (highlighted – database configuration name and isolate id number are substituted for the variables). The abbreviated response (not all scheme data is shown) is piped through the Python json.tool to format it for readability.
Figure 3.Constructing a query to an isolate database. A query of the isolate database can be performed using a HTTP POST call with the search parameters formatted as JSON. Here we query the Neisseria database for all ST-11 isolates, sampled in 2015 from Europe. The curl command line tool can be used to send this query (highlighted). The abbreviated response (only five isolate records are shown rather than the default 100) is piped through the Python json.tool to format it for readability.