Skip to content
alx652 edited this page Nov 19, 2024 · 3 revisions

What are the APIs available?

All operations done in the UI are available via the REST API. The browser front-end is just a direct consumer of the REST API.

Substance APIs

Live Swagger documentation on the REST API is available on the NCATS GSRS Project Page - Swagger API Docs. While the basics are present, there are some advanced features that are not documented here. The Swagger documentation mostly concerns how the basic URL patterns for the API endpoints are constructed, but not how the responses are organized.

For more details on the substance JSON, available searching fields, and their meaning, consider looking at data dictionary and the JSON schema.

Below are select examples:

Image-to-chemical structure REST API (molvec).

This API end point (/api/v1/substances/ocrStructure) will convert a binary image file POST to a molfile for use in registration. This end-point is used extensively in both the GSRS UI and by some other API consumers to help in registration/searching.

Name-resolution REST API.

This API end point (/resolve/) will query the given name or code across multiple online data sources to attempt to find a chemical structure. This is useful for resolving IUPAC names, CAS numbers, and many other structural identifiers.

Chemical format interpretation / stereo decomposition REST API.

This API end point (/v1/substances/interpretStructure) will break apart chemical structures into their constituent moieties and predict the likely stereochemical categories they belong to (as well as give basic statistics about the structures like molecular weight, number of stereocenters, etc). This end-point is useful in establishing that the stereochemical attributes are complete or at least defined in their incompleteness.

(Drug) Application APIs

[To be added]