Skip to content

Using RESTful web services

Nacho edited this page Mar 3, 2015 · 26 revisions

Using REST web services

The installation of CellBase web services requires Tomcat 7 to be ready in the server machine. After building the CellBase code, the cellbase.war file should be located at:

/tmp/cellbase/cellbase-server/target/cellbase.war

Copy cellbase.war into the Tomcat 7 webapps directory, e.g.:

cp /tmp/cellbase/cellbase-server/target/cellbase.war /var/lib/tomcat7/webapps/

The general structure of a CellBase web service call is:

servername/cellbase/webservices/rest/{version}/{species}/{category}/{subcategory}/id/{resource}?{filters}

Detailed documentation on CellBase web services can be found at:

http://wiki.opencb.org/projects/cloud/doku.php?id=cellbase:user-manual

For example:

  • Get information of Human genes located in Chromosome 3 between coordinates 55 and 100000; execute

curl http://www.ebi.ac.uk/cellbase/webservices/rest/v3/hsapiens/genomic/region/3:55-100000/gene

  • Get data for Mus Musculus BRCA2:

curl http://www.ebi.ac.uk/cellbase/webservices/rest/v3/mmusculus/feature/gene/BRCA2/info

  • Get all Human variants associated with beta-Thalassemia:

curl http://www.ebi.ac.uk/cellbase/webservices/rest/v3/hsapiens/genomic/variant/beta_Thalassemia/phenotype

  • Get information for all Drosophila Melanogaster chromosomes:

curl http://wwwdev.ebi.ac.uk/cellbase/webservices/rest/v3/dmelanogaster/genomic/chromosome/all

Swagger

Swagger project has been set up and is available at:

https://wwwdev.ebi.ac.uk/cellbase/webservices/