Accessing Web API

Hi all,

I’m trying to access QC data from the web API for MRIQC (https://mriqc.nimh.nih.gov/docs/api) but finding that I can’t seem to enter parameters to filter down the results. Does anyone have some insight into how to use the API site?

Thanks so much!

What parameters are you wanting to filter by and how what tools have you been using to access the api so far?

We are on mriqception trying (https://github.com/crewalsh/mriqception) which is a tool that plots the the qc measures from one’s own data set in relation to data from the web api. For this, we are trying to create a query to download a reference data set matching the scanning parameters of one’s own data set. For that, we thought about including:

  • RepetitionTime
  • MultibandAccelerationFactor
  • EchoTime
  • MagneticFieldStrength

So far, we tried to use this website https://mriqc.nimh.nih.gov/ but we cannot really access or change any parameters there.

Any help would be highly appreciated!

What an awesome project!

So to it is possible to filter results. Here is an example of getting TRs of 2.5:

curl https://mriqc.nimh.nih.gov/api/v1/bold/?where=bids_meta.RepetitionTime==2.5

filters can be combined with an ampersand:
curl 'https://mriqc.nimh.nih.gov/api/v1/bold/?where=bids_meta.RepetitionTime==2.5&bids_meta=="letter1backtask"'

Can you give something like this a try and see if it gets you what you need? If there’s anything else that you need to get at or run into any problems please let me know.

1 Like

Just noticed there are some commented out urls along the same line in the project, I hope I haven’t misunderstood the problem:

Nope, not at all answering the wrong question! We were using those links as examples (someone else wrote this code a year ago, so we’re trying to figure out where this got left) but when we tried those links, we were noticing that there were very few examples (ie the requests had a max result of 1000, but showed fewer) that were often times only from like 2017, so wanted some clarification that we could play with ourselves to see what was going on. This is super helpful starting point, so thank you!!

Hi,

The ampersand does not appear to combine filters (such that results satisfy multiple search criteria). For example curl ‘https://mriqc.nimh.nih.gov/api/v1/bold/?where=bids_meta.RepetitionTime==2.5&bids_meta==“letter1backtask”&page=100’ will pull results all with a Repetition Time of 2.5 but with various task states.

Thank you!

Hi,
Have you succeeded to access QC data with modification of parameters from this last try?