ultimate-api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ultimate-api [2020/12/01 18:15] – [Similarity search] flack | ultimate-api [2021/05/25 14:27] (current) – [Compounds export] flack | ||
---|---|---|---|
Line 316: | Line 316: | ||
" | " | ||
} | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Compounds API ====== | ||
+ | |||
+ | ===== Compound details ===== | ||
+ | |||
+ | For example for the compound identified by the InChIKey **PKGBDLPHSYFAFJ-UHFFFAOYSA-N** you can get the detail response the following way: | ||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | |||
+ | == Request: == | ||
+ | < | ||
+ | GET / | ||
+ | </ | ||
+ | |||
+ | == Response: == | ||
+ | < | ||
+ | HTTP/1.1 200 OK Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Compounds export ===== | ||
+ | |||
+ | If you have a set of identifiers you can export the corresponding compounds into SMILES or SDF files. | ||
+ | |||
+ | The HTTP response contains a // | ||
+ | |||
+ | The maximum number of compounds you can export with a single API call is 1000. | ||
+ | |||
+ | Invalid identifiers will be excluded from the response. | ||
+ | |||
+ | ==== SDF file ==== | ||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | == Request: == | ||
+ | < | ||
+ | POST / | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | == Response: == | ||
+ | < | ||
+ | HTTP/1.1 200 OK | ||
+ | Content-Type: | ||
+ | Content-Disposition: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== SMILES file ==== | ||
+ | |||
+ | == Example API request: == | ||
+ | < | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | == Request: == | ||
+ | < | ||
+ | POST / | ||
+ | Content-Type: | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ], | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | == Response: == | ||
+ | < | ||
+ | HTTP/1.1 200 OK | ||
+ | Content-Type: | ||
+ | Content-Disposition: | ||
</ | </ | ||
Line 333: | Line 463: | ||
== Example API request: == | == Example API request: == | ||
< | < | ||
- | echo ' | + | echo ' |
</ | </ | ||
ultimate-api.txt · Last modified: 2021/05/25 14:27 by flack