Merge branch 'release/v3.2.0'
[compound] / README.md
1 OpenTox Compound
2 ================
3
4 - An [OpenTox](http://www.opentox.org) REST Webservice 
5 - Implements the [OpenTox compound API 1.2](http://opentox.org/dev/apis/api-1.2/structure)
6
7 REST operations
8 ---------------
9
10     Get the representation of a compound  GET   /compound/{id}  -                         Compound representation   200,404,500
11     Create a new compound                 POST  /compound       Compound representation   URIs for new compounds    200,400,500
12
13 Supported MIME formats (http://chemical-mime.sourceforge.net/)[http://chemical-mime.sourceforge.net/]
14 --------------------------------------------------------------
15
16 - chemical/x-daylight-smiles (default)
17 - chemical/x-inchi
18 - chemical/x-mdl-sdfile
19 - text/plain (chemical names)
20 - image/gif (returns image uri, output only)
21
22 Examples
23 --------
24
25 ### Create a compound_uri from smiles
26
27     curl -X POST  -H "Content-Type:chemical/x-daylight-smiles" --data-binary "c1ccccc1" http://webservices.in-silico.ch/compound
28
29 ### Create a compound_uri from a SD file
30
31     curl -X POST -H "Content-Type:chemical/x-mdl-sdfile" --data-binary @my.sdf http://webservices.in-silico.ch/compound
32
33 ### Create a compound_uri from name (or any other identifier that can be resolved with the Cactus service)
34
35     curl -X POST  -H "Content-Type:text/plain" --data-binary "Benzene" http://webservices.in-silico.ch/compound
36
37 ### Create a compound_uri from CAS
38
39     curl -X POST  -H "Content-Type:text/plain" --data-binary "71-43-2" http://webservices.in-silico.ch/compound
40
41 ### Get SMILES for a compound_uri
42
43     curl http://webservices.in-silico.ch/compound/InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H
44
45 ### Get a SD file for a compound_uri:
46
47     curl -H "Accept:chemical/x-mdl-sdfile" http://webservices.in-silico.ch/compound/InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H
48
49 ### Get all names for a compound_uri
50
51     curl -H "Accept:text/plain" http://webservices.in-silico.ch/compound/InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H
52
53 [API documentation](http://rdoc.info/github/opentox/compound)
54 -------------------------------------------------------------
55
56 Copyright (c) 2009-2011 Christoph Helma, Martin Guetlein, Micha Rautenberg, Andreas Maunz, David Vorgrimmler, Denis Gebele. See LICENSE for details.
57