-
Notifications
You must be signed in to change notification settings - Fork 8
Allow top/skip on GET https://stitcher.ncats.io/api/stitches/latest when using filters #145
Comments
Can you provide an example URL that demonstrates the kind of filtering that you are doing? |
Sure... I was trying with |
OK. What is going on here is a little complicated. Let me try and break that down as best I can. TLDR = we run out of memory on the filter step, but also I am not sure this filter is giving you what you really want. First, the "status" property comes from a couple of sources - "Launched" as a value specifically comes from Broad. You can see all the places "status" comes from by looking at https://stitcher.ncats.io/api/datasources and specifically looking for which sources provide a "status" property. NOTE: this "status" is different from the status shown at drugs.ncats.io. Inxight: Drugs calculates its regulatory status from the "highestPhase" property at the stitch object top level. The value of "highestPhase" property corresponds to the ID of a regulatory event from the "events" array. That referenced event contains the highest development status achieved and citation information for that event. That means, however, that is not possible to simply filter the stitches in the way that you might want for all of the marketed drugs. This should probably be the subject of another issue/feature request. If we look at other properties, such as the one "WIKIPEDIA" from GSRS ... top and skip work just fine In fact, https://stitcher.ncats.io/api/stitches/latest?filter=WIKIPEDIA/ALOSETRON&top=3&skip=2 properly filters down to one single record, and the now meaningless top and skip are reset to 1 and 0, respectively in the response. Now, looking specifically at /api/stitches/latest?filter=status/Launched Leaving the current issue as a bug report ... we need to protect the server from out of memory issues, perhaps by truncating some of the stitch records, somehow. |
Could you guys have the server setup to auto-restart if it crashes? |
The API call appears to support the
top
andskip
query options but they don't actually work.The text was updated successfully, but these errors were encountered: