Metamolecular™
Logo
  • How It Works
  • |
  • API Documentation
  • |
  • Log In
  • |
  • Sign Up

Substance

[application/vnd.com.chemcaster.Substance+json]

A Substance represents a chemical substance consisting of one or more Components, each associated with one Structure. A Substance has the following resources and attributes:

Name Type Occurs Description
substance:serialization String 1 The serializated version of the Substance, typically in molfile format [create, update].
substance:inchi String 0..1 The InChI for this Subtance, if applicable.
index Link 1 List all Substances in the parent Registry.
registry Link 1 The Registry containing this Substance.
registration Link 1 The Registration for this Substance.
components Link 1 The Components comprising this Substance.
images Link 1 The Images Index for this Substance.

Sample Requests and Responses

Representations are transported between client and server over HTTP using media types specific to each resource. For details, see Common Behaviors.

Note: clients MUST NOT make assumptions about the layout of the URIs within the Service.

The following examples illustrate sample requests and responses.

View Substance

Synopsis
GET {URI of Substance resource}
Request Headers
Accept, Authorization
Request Message Body
N/A
Response Headers
Content-Length, Content-Type
Response Message Body
[application/vnd.com.chemcaster.Substance+json]
Response Status
200, 401, 404, 406

Example Request

GET /substances/123
Host: chemcaster.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/vnd.com.chemcaster.Substance+json

Example Response

HTTP/1.1 200 OK
Content-Type: application/vnd.com.chemcaster.Substance+json
Content-Length: nnn

{
  "index": {
    "name": "substance index",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33\/substances"
  },
  "registry": {
    "name": "CombiBlox, Inc.",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33"
  },
  "registration": {
    "name": "registration for this substance",
    "media_type": "application\/vnd.com.chemcaster.Registration+json",
    "uri": "https:\/\/chemcaster.com\/registrations\/815"
  },
  "components": {
    "name": "components for this substance",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/substances\/64\/components"
  },
  "images": {
    "name": "images for this substance",
    "media_type": "application\/vnd.com.chemcaster.Image+json",
    "uri": "https:\/\/chemcaster.com\/substances\/64\/images"
  },
  "substance": {
    "serialization": "[NO NAME]\r\n  CHEMWRIT          2D\r\nCreated with ChemWriter - http:\/\/metamolecular.com\/chemwriter\r\n 24 26  0  0  0  0  0  0  0  0  0 V2000\r\n    5.1600   -5.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    6.0260   -5.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    6.8921   -5.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    6.8921   -4.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    6.0260   -3.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    5.1600   -4.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    7.7581   -5.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    8.6241   -5.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    8.6241   -4.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    7.7581   -3.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    9.4901   -3.8200    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\r\n    7.7581   -2.8200    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\r\n   10.3561   -4.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n   11.2221   -3.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n   12.0881   -4.3200    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\r\n    8.6241   -2.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    8.6241   -1.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n   10.3561   -5.3200    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\r\n   12.9541   -3.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n   12.9541   -2.8200    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\r\n   12.0881   -2.3200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n   11.2221   -2.8200    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\r\n    4.2940   -5.8200    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\r\n    4.2940   -3.8200    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\r\n  1  2  2  0  0  0  0\r\n  2  3  1  0  0  0  0\r\n  3  4  2  0  0  0  0\r\n  4  5  1  0  0  0  0\r\n  5  6  2  0  0  0  0\r\n  6  1  1  0  0  0  0\r\n  3  7  1  0  0  0  0\r\n  7  8  2  0  0  0  0\r\n  8  9  1  0  0  0  0\r\n  9 10  2  0  0  0  0\r\n 10  4  1  0  0  0  0\r\n  9 11  1  0  0  0  0\r\n 10 12  1  0  0  0  0\r\n 11 13  1  0  0  0  0\r\n 13 14  1  0  0  0  0\r\n 14 15  2  0  0  0  0\r\n 12 16  1  0  0  0  0\r\n 16 17  1  0  0  0  0\r\n 13 18  2  0  0  0  0\r\n 15 19  1  0  0  0  0\r\n 19 20  2  0  0  0  0\r\n 20 21  1  0  0  0  0\r\n 21 22  2  0  0  0  0\r\n 22 14  1  0  0  0  0\r\n  1 23  1  0  0  0  0\r\n  6 24  1  0  0  0  0\r\nM  END",
    "inchi": "InChI=1S\/C17H16N4O3\/c1-2-24-16-11-8-15(22)12(18)7-10(11)3-4-13(16)21-17(23)14-5-6-19-9-20-14\/h3-9,22H,2,18H2,1H3,(H,21,23)"
  }
}

This documentation is based in part on the Sun Cloud API Documentation, which was adapted under the Creative Commons Attribution 3.0 Unported License.

About Chemcaster

Chemcaster is a platform for rapidly creating websites needing chemical structure registration, imaging and search.

We're looking for developers interested in trying Chemcaster during its testing period. Sign up today for a free account!

REST API Quick Reference

  • Overview
  • Common Behaviors
  • Resources

Ruby_logo_small Php_logo_small

© 2009, 2010 Metamolecular, LLC

Terms of Service | Privacy Policy

20100702190759 - 31a55584cbb943cf3a1fc462246b2f40e03cff87