Mriqc web api: accessing updated ratings and quality control metrics

I’m trying to look through the most recent user ratings and quality control metrics with the mriqc web api, which I think is at mriqc.nimh.nih.gov. But when I try to get those ratings, I see only 25. Likewise, a get to /ratings_count suggests that there are only up to 25 ratings available. That seems low, way fewer than were mentioned by Esteban et al. (2019). I know that there are a few earlier snapshots available (e.g., https://github.com/oesteban/mriqc-webapi-snapshot), but I was more interested in looking at an updated dataset. Are those available somewhere else?

I don’t have much experience with RESTful web services, so it feels plausible that I’m doing something wrong.


Edit - In case it helps to get a response, here’s how I’m trying to access the data (sorry, it’s not python but instead R)

library(httr)
library(tidyverse)

g <- GET("https://mriqc.nimh.nih.gov/api/v1/rating")

rating <- content(g, "parsed", flatten = FALSE) %>%
  magrittr::extract2(1) %>%
  map(data.frame) %>%
  bind_rows() %>%
  as_tibble()

And it looks like there are only 25 records.

With curl from a terminal

curl -X GET "https://mriqc.nimh.nih.gov/api/v1/rating_counts" -H "accept: application/json"

there is a field giving that "max_results": 25.

1 Like

I’m struggling with the same problem. Anyone can help ?

Hi @CelineProvins . Thanks for reviving this. I just recently spoke with someone offline who has apparently dealt with this before, @meet10may. I guess the issue was that the files are divided into “pages”. Pages seem to have only 25 records each. Here’s an example in python of grabbing the records from multiple pages: https://notebook.community/poldracklab/mriqc/docs/notebooks/MRIQC%20Web%20API

Here’s that the code from the initial post in R, getting data from page=1 and page=2

g <- GET("https://mriqc.nimh.nih.gov/api/v1/rating")

rating <- content(g, "parsed", flatten = FALSE) %>%
  magrittr::extract2(1) %>%
  map(data.frame) %>%
  bind_rows() %>%
  as_tibble()

g <- GET("https://mriqc.nimh.nih.gov/api/v1/rating?page=2")

rating2 <- content(g, "parsed", flatten = FALSE) %>%
  magrittr::extract2(1) %>%
  map(data.frame) %>%
  bind_rows() %>%
  as_tibble()
1 Like

@psadil Thank you so much for sharing this link, I could reach the solution I needed thanks to information on that page.

1 Like