KarrLab / datanator_rest_api

A OAS3 compliant REST API for the Datanator integrated database
MIT License
0 stars 3 forks source link

Substrate/product ids missing from some reaction search results #118

Closed jonrkarr closed 4 years ago

jonrkarr commented 4 years ago

Example: https://api.datanator.info/ftx/text_search/num_of_index/?query_message=atp&index=sabio_reaction_entries&from_=0&size=10&fields=enzyme_names&fields=ec-code&fields=substrates&fields=substrate_names&fields=products&fields=product_names&includes=ec-code&includes=enzyme_names&includes=substrate_names&includes=product_names

The test API has the same error.

lzy7071 commented 4 years ago

This is strange because according to line 24, the API url should have ended with &excludes=kinlaw_id&excludes=in_metabolites without the includes={} contained in the URL. When there is includes={} in the API call, it takes precedence over excludes={} and returns only fields indicated in includes={}, which is why the object returned by the API call indicated in the example contains only substrate_names and product_names fields.

lzy7071 commented 4 years ago

It seems the production server already reflects the editing https://datanator.info/search/atp/Escherichia%20coli%20E1002/. The error indicated by Airbrake was from an old preview link. I don't know how to disable Airbrake from testing older preview links.

lzy7071 commented 4 years ago

Closing because API endpoint used in production frontend is correct and the API endpoint is behaving as expected.