REST Interfaces

Introduction

Representational State Transfer (REST) is a software architectural style that defines how arbitrary resources are defined and accessed in a network environment. It was first described by Roy Fielding in his Ph.D. dissertation. Though this approach is quite general, concrete implementations usually describe an HTTP interface, where a resource is defined by a traditional URL. The advantage of a REST interface to a service or resource is the ease with which they can be accessed and manipulated, without requiring extra layers of protocol (such as SOAP).

We are slowly providing REST interfaces to our web services and this page will be updated as more interfaces are made available. Note, that the REST interface does not necessarily replace a SOAP based web service (indeed, our interfaces are wrappers around the pre-existing services). Rather, they provide an alternate mode of access to methods and data.

Databases

We have a number of databases derived from PubChem as well as a local mirror (updated monthly) of PubChem itself. At this point we provide REST interfaces to retrieve a compound ID (CID) given an InChI or an InChI key from our local PubChem mirror.

To get a CID by InChI use the following

http://www.chembiogrid.org/cheminfo/rest/db/pubchem/cidinchi/InChI=1/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)/f/h11H

and to get CID by InChI key use the following

http://rguha.ath.cx/~rguha/cicc/rest/db/pubchem/cidikey/RYYVLZVUVIJVGH-UHFFFAOYAW

In both the above URL's replace the component after cidinchi or cidikey with your own strings. If an invalid identifier is supplied you get a HTTP 404 error.

We currently provide access to our 3D structure database (Pub3D). The database contains single conformer (but not necessarily minimum energy) structures for 99% of PubChem and can be accessed via SOAP web services.

To obtain a 3D structure in SDF format for a given CID, InChI or InChI key, use the following URL (using CID 2244 as an example)

http://www.chembiogrid.org/cheminfo/rest/db/pub3d/2244

or

http://www.chembiogrid.org/cheminfo/rest/db/pub3d/InChI=1/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)/f/h11H

or

http://www.chembiogrid.org/cheminfo/rest/db/pub3d/AMITWKPSRSBCJV-UHFFFAOYAL

In case an invalid or non-existent CID or InChI is specified, an HTTP 404 is returned.

Cheminformatics

Currently we provide access to descriptor calculations and specifications for CDK descriptors using a REST interface.