Skip to content

REST-API

The REST API allow users to interact with the OCELOT database programmatically. Currently, the API has two modes to query the database. First, identifier mode to obtain all descriptors or select-descriptors for a single entry. Second, descriptor mode to obtain list of database entries with selected descriptor.

Identifier mode

The syntax for identifier mode is below.
/api/v00/id/<identifier>/<descriptors>
A list of descriptors can be provided separated by , as shown in the example. Here relaxed_bangap and mol_nAtom descriptors are requested for entry com_k01071
/api/v00/id/com_k01071/relaxed_bandgap,mol_nAtom
If a descriptor is not provided, all descriptors are displayed.
/api/v00/id/com_k01071

Descriptor mode

The syntax for identifier mode is below.
/api/v00/descriptor/<descriptor_required>/<sort_order>/<number_of_entries>/<filter_descriptors>
By default, <number_of_entries> is set to 10 and <sort_order>=ascending. Hence, the query below will return 10 entries with the least bandgap
/api/v00/descriptor/relaxed_bandgap
The <descriptor_required> can be filtered by other descriptors. The filter syntax is descriptor followed by > or < or = and the value. Multiple descriptor filters can be applied by using , between each filter. The following query returns the 5 entries where the bandgap is the highest, number of aromatic rings in the molecule is 4 and electronic coupling is larger than 0.02 eV.
/api/v00/descriptor/relaxed_bandgap/descending/5/mol_naRing=4&max_j_hh>0.02