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

Registry

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

A Registry represents a collection of chemical structures and resources for managing them. Each Registry defines rules that govern the addition and removal of Substances and Structures. A Registry has the following resources and attributes:

Name Type Occurs Description
registry:name String 1 The name of this Registry. [create, update]
registry:deletable Boolean 1 Set to true before deleting this Registry. Defaults to false. [create, update]
service Link 1 View the Service for this Registry.
substances Link 1 View the Index of Substances for this Registry.
structures Link 1 View the Index of Structures for this Registry.
queries Link 1 View the Index of Queries for this Registry.
archives Link 1 View the Index of Archives for this Registry.
registrations Link 1 View the Index of Registrations for this Registry.
index Link 1 View the Index of Registries for your account.
update Link 1 Update the attributes of this Registry.
destroy Link 1 Irreversibly delete this Registry and all of its contents. "deletable" attribute must be set to true.

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 a Registry

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

Example Request

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

Example Response

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

{
  "service": {
    "name": "this registry's service",
    "media_type": "application\/vnd.com.chemcaster.Service+json",
    "uri": "https:\/\/chemcaster.com\/rest"
  },
  "substances": {
    "name": "this registry's substances",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33\/substances"
  },
  "structures": {
    "name": "this registry's structures",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33\/structures"
  },
  "registrations": {
    "name": "this registry's registrations",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33\/registrations"
  },
  "index": {
    "name": "listing of registries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries"
  },
  "update": {
    "name": "update this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33"
  },
  "destroy": {
    "name": "delete this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33"
  },
  "queries": {
    "name": "this registry's queries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/33\/queries"
  },
  "registry": {
    "deletable": false,
    "name": "CarboBlox, Inc."
  }
}

Create a Registry

Synopsis
POST {URI of Registry Index}
Request Headers
Accept, Authorization, Content-Type
Request Message Body
[application/vnd.com.chemcaster.Registry+json]
Response Headers
Content-Length, Content-Type
Response Message Body
[application/vnd.com.chemcaster.Registry+json]
Response Status
201, 401, 404, 406, 422

Example Request

POST /registries
Host: chemcaster.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/vnd.com.chemcaster.Registry+json
Content-Type: application/vnd.com.chemcaster.Registry+json

{
  "registry": {
    "name":"CarboTek, LLC",
    "deletable":true
  }
}

Example Response

HTTP/1.1 201 Created
Location: https://chemcaster.com/registries/34
Content-Type: application/vnd.com.chemcaster.Registry+json
Content-Length: nnn

{
  "service": {
    "name": "this registry's service",
    "media_type": "application\/vnd.com.chemcaster.Service+json",
    "uri": "https:\/\/chemcaster.com\/rest"
  },
  "substances": {
    "name": "this registry's substances",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/substances"
  },
  "structures": {
    "name": "this registry's structures",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/structures"
  },
  "index": {
    "name": "listing of registries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries"
  },
  "update": {
    "name": "update this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34"
  },
  "destroy": {
    "name": "delete this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34"
  },
  "queries": {
    "name": "this registry's queries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/queries"
  },
  "registry": {
    "deletable": true,
    "name": "CarboTek, LLC"
  }
}

Update a Registry

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

Example Request

PUT /registries/34
Host: chemcaster.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/vnd.com.chemcaster.Registry+json
Content-Type: application/vnd.com.chemcaster.Registry+json

{
  "registry": {
    "name":"Kombi Kem Technologies",
    "deletable":false
  }
}

Example Response

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

{
  "substances": {
    "name": "this registry's substances",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/substances"
  },
  "structures": {
    "name": "this registry's structures",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/structures"
  },
  "index": {
    "name": "listing of registries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries"
  },
  "update": {
    "name": "update this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34"
  },
  "destroy": {
    "name": "delete this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34"
  },
  "queries": {
    "name": "this registry's queries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/queries"
  },
  "registry": {
    "deletable": false,
    "name": "Kombi Kem Technologies"
  }
}

Delete a Registry

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

Example Request

DELETE /registries/34
Host: chemcaster.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/vnd.com.chemcaster.Registry+json

Example Response

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

{
  "substances": {
    "name": "this registry's substances",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/substances"
  },
  "structures": {
    "name": "this registry's structures",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/structures"
  },
  "index": {
    "name": "listing of registries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries"
  },
  "update": {
    "name": "update this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34"
  },
  "destroy": {
    "name": "delete this registry",
    "media_type": "application\/vnd.com.chemcaster.Registry+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34"
  },
  "queries": {
    "name": "this registry's queries",
    "media_type": "application\/vnd.com.chemcaster.Index+json",
    "uri": "https:\/\/chemcaster.com\/registries\/34\/queries"
  },
  "registry": {
    "deletable": false,
    "name": "Kombi Kem Technologies"
  }
}

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