-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request for complex query support #48
Comments
pinging @rwblair - should this work already? I'm guessing so right? |
@dkp is there an object id that multiband acceleration factor is 4 or greater that is returned by the query you posted? Playing with just that part of the query and switching it from a less than to a greater than seems to return appropriate results: Please let me know if I'm misunderstanding the issue. |
@rwblair Thanks so much for the prompt reply! Is the URL syntax documented anywhere? I'm afraid I am new to navigating your undocumented web API and I'm finding it very confusing. For example, your query string does work for me but uses
Also note that this query does not require a When and why do I need to use
I also note that there is apparently an undocumented limit of 50 records we can retrieve ; (
|
So we use software called Eve to automatically generate the API from a schema. More information on how it handles these query parameters can be found under the filtering section on page 16 of this PDF: The 'where' comes from mongodb style queries. I can't find good information on how exactly parameters outside of the where clause get converted into queries against the database, but I was not able to get querying on a nested field to work. With regards to "where=key=value" there are two ways that a query can assert equality, one is the mongodb style which is verbose and I'll omit for not, and the other is pythonic in nature where it expects a double equals sign to assert equality like Here is where the schema we use is defined if you want to get an idea of its structure: This shows which entries can be inside the nested bids_meta structure (but none are required): This is schema is the root object for the bold endpoints: My suspicion is that the RepetitionTime part of the queries is being ignored without the bids_meta prefix in a where clause. Returning to your original query if we do it in their "pythonic" style we get this where clause before url encoding:
with encoding: Which seems to work coming back with 1024 results, much fewer than querying on any one of the terms. Finally, apologies on the 50 limit not being documented, not sure why we set it that way or if it was a default. Are you able to paginate over the results ok? |
I was hoping to pull data from the database with specific qualities (TR, MB, manufacturer etc.). I tried the following URL: https://mriqc.nimh.nih.gov/api/v1/bold?max_results=10&where=bids_meta.MultibandAccelerationFactor%3C4&RepetitionTime=2.0&Manufacturer=Siemens&MagneticFieldStrength=3
Although this runs, the results are not filtered by the BIDS meta data. Am I missing something about how to do this? Is this a planned feature? It would be very useful.
Thank you.
The text was updated successfully, but these errors were encountered: