Start a new topic

Multiple cellular locations for target where API docs say single value

For target with URI the cellularLocation in the 'drugbank' exactMatch block contains an array with 2 values. The API docs state that it should be a single value. Which is correct, the response or the API docs?

Example data:

1 Comment

exactMatch will often match multiple values (as there could be multiple identifier across the datasets Open PHACTS index) - but sometimes it may just be a single value. Unfortunately the JSON returned by the API will vary between these depending on the exact query.  (One could argue that they should always be an array in the JSON for this reason).

For most of the API, the current documentation does not indicate the granularity of the result - for the client it is safest to assume that any nested object could be returned as either an array of values or a single value - this could vary depending on the parameters and how much information exists for that particular compound.

Login or Signup to post a comment