One can access all datasets from all public databases hosted on NeuroJSON.io using the CouchDB supported RESTful APIs. Because RESTful APIs are URL-based, all the data resources on NeuroJSON.io can be virtually accessed from any programming environments, including web and cloud applications.
Here are the RESTful API formats to access the data on NeuroJSON.io
URL | Returned results | Examples |
---|---|---|
GET https://neurojson.io:7777/sys/registry | list all public databases hosted on NeuroJSON.io and their metadata | example |
GET https://neurojson.io:7777/dbname | list the information related to a database named "dbname" | example |
GET https://neurojson.io:7777/dbname/_all_docs | list all the documents stored within the database named "dbname" | example |
GET https://neurojson.io:7777/dbname/_all_docs?limit=X&skip=Y | list all documents in database "dbname", list the first X docs starting from the Y-th | example |
GET https://neurojson.io:7777/dbname/dsname | list the full content of the dataset "dsname" in database "dbname" | example |
GET https://neurojson.io:7777/dbname/dsname?revs=true | list the full content of dataset "dsname" in "dbname" with revision list | example |
GET https://neurojson.io:7777/dbname/dsname?rev=revhash | retrieve the specific revision "revhash" of document "dsname" in "dbname" | example |
POST https://neurojson.io:7777/dbname/_find | use the CouchDB _find API to query specific data fields | see below |
Data query example: When calling the _find API to query a database, a user post a JSON construct, like below, that defines a set of query criteria; Here, the "selector" field asks CouchDB to find participant age below 20; the "fields" item asks CouchDB to return the specified data items once the records are found; the "limit" field sets a maximum length for each returned query. | ||