Skip to content
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

Research Resource Identifiers to collect information about resources #59

Open
Remi-Gau opened this issue Apr 9, 2020 · 2 comments
Open

Comments

@Remi-Gau
Copy link
Collaborator

Remi-Gau commented Apr 9, 2020

I just realized that there should be a way to rely on RRID to collect metadata about some resources.

For example SPM has the following RRID : SCR_007037.

And if you check what is linked to this there is plenty of info we would not have to enter manually if you could grab them there.

https://scicrunch.org/resources/Tools/record/nlx_144509-1/SCR_007037/resolver?q=%22Statistical%20Parametric%20Mapping%22&l=%22Statistical%20Parametric%20Mapping%22

@Remi-Gau Remi-Gau added this to To do in Main kanban board Apr 10, 2020
@Remi-Gau
Copy link
Collaborator Author

Possibly we could use this repo to query the scicrunch database:

https://github.com/SciCrunch/scibot

@Remi-Gau
Copy link
Collaborator Author

How to query the RRID database with the scicrunch API

We want to query the resource database. So we can look up the command in the resource section of the API documentation. The doc to use the API can be found here

For example the RID for FSL is : SCR_002823

We can use that directly in the UI provided by the doc at the section

Get all versions of resources
/resource/versions/all/{rid}

Input the FSL RID and click execute to have the API list all the versions of FSL that are stored in the database.

It also tells us the command to type in the shell to use the API

curl -X GET "https://scicrunch.org/api/1/resource/versions/all/SCR_002823" -H  "accept: application/json"

We can us that extra information about the version in the UI at the section to get all the details we want about a version of FSL

Get single resource
/resource/fields/view/{rid}

From the output we can extract the keywords and the URL.

Command line:

curl -X GET "https://scicrunch.org/api/1/resource/fields/view/SCR_002823?version=12" -H  "accept: application/json"

If we want to use it from the command line we need an API key. To create one:

  • go to https://scicrunch.org and create an account or log in if you already have one.
  • create a key for the API (my account --> API keys)

Then add this key in your commands from the shell like so:

curl -X GET "https://scicrunch.org/api/1/resource/fields/view/SCR_002823?version=12&key={INSERT_YOUR_KEY_HERE}" -H  "accept: application/json"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant