Services

LIPID MAPS® REST service

The LIPID MAPS® REST service enables access to a variety of data (including lipid structures and lipid-related genes/proteins) using HTTP requests. These requests may be carried out using a web browser or may be embedded in 3rd party applications or scripts to enable programmatic access. Most modern programming languages including PHP, Perl, Python, Java and Javascript have the capability to create HTTP request and interact with datasets such as this REST service.

The REST URL is composed of 3 main parts:

  1. The invariant base URL (in this case "https://www.lipidmaps.org/rest")
  2. The input specification is composed of 3 required parameters separated by forward slashes. The first parameter is the context, either "compound", "gene" or "protein", each of which has a separate list of input items associated with it (2nd parameter). The 3rd parameter is an appropriate input value for the chosen item.

    Examples of an input specification are:
    • /compound/pubchem_cid/985/
    • /compound/formula/C20H34O/
    • /gene/gene_id/31/gene_name/
    • /protein/uniprot_id/Q13085/all/
  3. The output specification is composed of a required output item parameter and an optional output format parameter. The list of possible output items depends on the value chosen for the context. In the case of the "compound" context one or more (separated by commas) of 'formula', 'exactmass', 'inchi_key', 'name', 'sys_name', 'smiles', 'lm_id', 'pubchem_cid', 'hmdb_id', 'kegg_id', 'chebi_id', 'metacyc_id' may be specified. More conveniently, an output type of 'all' may be specified to retrieve all compound-related fields. Also an output type of 'classification' retrieves the LIPID MAPS® classification hierarchy. In the case of the "gene" and "protein"contexts, allowed output types include 'gene_id', 'gene_name', 'gene_symbol', 'gene_synonyms', 'alt_names', 'mrna_id', 'refseq_id', 'protein_gi', 'uniprot_id', 'protein_entry', 'protein_name', 'seqlength' and 'seq'. The default output format is JSON which is amenable to manipulation and parsing by various programming languages. Optionally a text output format may be specified with each field displayed in a separate row, for example: /compound/pubchem_cid/311/all/text
    All or part of the LIPID MAPS® Structure Database (LMSD) may be downloaded by specifying the "download" (tabular) option as the output format, for example:
    https://www.lipidmaps.org/rest/compound/lm_id/LMFA/all/download generates a table of all lipids in the "Fatty Acyls" category. This format contains SMILES strings and InChI Keys but does not contain the structure molfiles (which are available as SD file downloads on the LMSD Download page).

Interactive "REST url" Creator

The interactive "REST url" creator below shows the complete list of currently available options for this service.

Base URL Context Input item Input value Output item Output format
https://www.lipidmaps.org/rest / / / / /

URL:

(What is REST?) (What is JSON?)

Examples

Example Request Example URL
Fetch compound name from LM_ID https://www.lipidmaps.org/rest/compound/lm_id/LMFA01010001/name
Fetch all compound fields from LM_ID https://www.lipidmaps.org/rest/compound/lm_id/LMFA01010001/all
Fetch all compound fields as text from LM_ID https://www.lipidmaps.org/rest/compound/lm_id/LMFA01010001/all/txt
Fetch compound smiles from PubChem CID https://www.lipidmaps.org/rest/compound/pubchem_cid/985/smiles
Fetch compound sytematic name from inchi key https://www.lipidmaps.org/rest/compound/inchi_key/IPCSVZSSVZVIGE-UHFFFAOYSA-N/sys_name
Fetch compound physicochemical properties from inchi key https://www.lipidmaps.org/rest/compound/inchi_key/IPCSVZSSVZVIGE-UHFFFAOYSA-N/physchem
Fetch all compound fields from formula (multiple records) https://www.lipidmaps.org/rest/compound/formula/C20H34O/all
Fetch compound classification hierarchy from PubChem CID https://www.lipidmaps.org/rest/compound/pubchem_cid/985/classification
Download compound molfile from LM_ID https://www.lipidmaps.org/rest/compound/lm_id/LMFA01010001/molfile
Draw structure from abbreviation (?) https://www.lipidmaps.org/rest/compound/abbrev/PC(16:0/20:4(5Z,8Z,11Z,14Z))/structure
Fetch all compound fields from bulk abbreviation https://www.lipidmaps.org/rest/compound/abbrev/PA(38:0)/all/txt
Fetch all compound fields from chain abbreviation https://www.lipidmaps.org/rest/compound/abbrev_chains/PC(16:0_18:0)/all/txt
Download table of all Prostaglandins in LMSD https://www.lipidmaps.org/rest/compound/lm_id/LMFA0301/all/download
Download table of all Eicosanoids in LMSD https://www.lipidmaps.org/rest/compound/lm_id/LMFA03/all/download
Download table of all Glycerophospholipids in LMSD https://www.lipidmaps.org/rest/compound/lm_id/LMGP/all/download
Download table of all lipids in LMSD https://www.lipidmaps.org/rest/compound/lm_id/LM/all/download
Fetch all gene fields from gene symbol https://www.lipidmaps.org/rest/gene/gene_symbol/acaca/all
Fetch gene name from Entrez gene id https://www.lipidmaps.org/rest/gene/gene_id/31/gene_name
Fetch all protein fields from UniProt id https://www.lipidmaps.org/rest/protein/uniprot_id/Q13085/all
Fetch all protein fields from Entrez gene id https://www.lipidmaps.org/rest/protein/gene_id/19/all
Fetch mRNA id from protein Refseq id https://www.lipidmaps.org/rest/protein/refseq_id/NP_005493/mrna_id
Perform MS precursor ion search on LIPIDS virtual database with m/z 635.52, ion-type M+H and mass tolerance of 0.5 and output as text https://www.lipidmaps.org/rest/moverz/LIPIDS/635.52/M+H/0.5/txt
Perform MS precursor ion search on LIPIDS virtual database with m/z 513.45, ion-type M-2H (2-) and mass tolerance of 0.2 and output as text https://www.lipidmaps.org/rest/moverz/LIPIDS/513.45/M-2H/0.2/txt

REST (REpresentational State Transfer) is an architectural style consisting of a coordinated set of architectural constraints applied to components, connectors, and data elements, within a distributed hypermedia system. REST ignores the details of component implementation and protocol syntax in order to focus on the roles of components, the constraints upon their interaction with other components, and their interpretation of significant data elements.

Fielding, Roy T. (2000). "Chapter 5: Representational State Transfer (REST)". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine.
Fielding, Roy T.; Taylor, Richard N. (May 2002), "Principled Design of the Modern Web Architecture" (PDF), ACM Transactions on Internet Technology (TOIT) (New York: Association for Computing Machinery) 2 (2): 115-150, doi:10.1145/514183.514185, ISSN 1533-5399
REST Wikipedia page

JSON (JavaScript Object Notation) is a lightweight data-interchange format which human readable and also convenient for computers to parse and generate. JSON is a text format that is completely language independent but uses conventions that are familiar to most common programming languages.
Official JSON website