Web Services REST API: Difference between revisions
Line 11: | Line 11: | ||
==CoGe's database's API== | ==CoGe's database's API== | ||
We | We are currently developing public web services for accessing and loading data in CoGe! | ||
Here is our draft API specification document:<br> | |||
http://docs.google.com/document/d/1GXOPIVvyTwoGR2IRjDNmdd2nj_6d8db7jx9hG8RxTDc | |||
The new services won't be available for a few more weeks, but here are some examples of how they will work ... | |||
'''Organism Search''' | |||
<pre> | |||
curl http://genomevolution.org/api/v1/organisms/search/col-0 | |||
{ | |||
"organisms": | |||
[ | |||
{ | |||
"id": "1", | |||
"name": "Arabidopsis thaliana Col-0 (thale cress)", | |||
"description": "Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis" | |||
} | |||
] | |||
} | |||
</pre> | |||
'''Organism Fetch''' | |||
<pre> | |||
curl http://genomevolution.org/api/v1/organisms/1 | |||
{ | |||
"id": 1, | |||
"name": "Arabidopsis thaliana Col-0 (thale cress)", | |||
"description": "Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis" | |||
“genomes” : [ 16911, ... ] | |||
} | |||
</pre> | |||
'''Genome Fetch''' | |||
<pre> | |||
curl http://genomevolution.org/api/v1/genomes/16911 | |||
{ | |||
"id": 16911 | |||
"name": "", | |||
"description": "", | |||
"version": "10.02", | |||
"link": "", | |||
"restricted": false, | |||
"sequence_type": { | |||
"name": "unmasked", | |||
"description": "unmasked sequence data" | |||
}, | |||
"experiments": [31,32,33, ...], | |||
"metadata": [], | |||
} | |||
</pre> |
Revision as of 22:29, 4 April 2014
CoGe's Application Programming Interface:
There are two main ways a programmer can interact with CoGe:
- Through the web pages via URLs
- Through CoGe's database's API
Linking to CoGe
Each web application of CoGe is designed for a particular task, and provides links to other web applications in CoGe. This is how CoGe's Open-ended Analysis Network works. To get information on how to link to a particular web application, please see that application's wiki. If the information you are seeking is not immediately apparent, please feel free to e-mail Eric Lyons and for help.
CoGe's database's API
We are currently developing public web services for accessing and loading data in CoGe!
Here is our draft API specification document:
http://docs.google.com/document/d/1GXOPIVvyTwoGR2IRjDNmdd2nj_6d8db7jx9hG8RxTDc
The new services won't be available for a few more weeks, but here are some examples of how they will work ...
Organism Search
curl http://genomevolution.org/api/v1/organisms/search/col-0 { "organisms": [ { "id": "1", "name": "Arabidopsis thaliana Col-0 (thale cress)", "description": "Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis" } ] }
Organism Fetch
curl http://genomevolution.org/api/v1/organisms/1 { "id": 1, "name": "Arabidopsis thaliana Col-0 (thale cress)", "description": "Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta; Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids; eurosids II; Brassicales; Brassicaceae; Arabidopsis" “genomes” : [ 16911, ... ] }
Genome Fetch
curl http://genomevolution.org/api/v1/genomes/16911 { "id": 16911 "name": "", "description": "", "version": "10.02", "link": "", "restricted": false, "sequence_type": { "name": "unmasked", "description": "unmasked sequence data" }, "experiments": [31,32,33, ...], "metadata": [], }