CerealsDB web API

An application programming interface (API) is a set of routines, protocols, and tools for building software applications. A web API is a subset of web services that use REST conventions. This page describes those protocols that will allow bioinformaticians to develop software applications that can extract data from CerealsDB.

For the API we adopted a JSON-based schema for messaging between the CerealsDB server and Clients. JSON (or JavaScript Object Notation) is a lightweight text-based open standard designed for human-readable data interchange.

The available web services can be accessed by sending a JSON request to CerealsDB (via curl or a perl script for example). The JSON request is:



This will return a JSON response containing a list of the services that the CerealsDB site provides, for example:




This in turn allows the client to parse this information and construct a JSON query that requests data from CerealsDB, for example:




In the above JSON code we have requested both the "Contig" and the "Search" web services (set to true). For the contig service we have requested information on a contig called BC000000118 and a SNP called BS00003644. We have also requested information from the Search web service which takes a search term (such as "rht" in this example) and the web service will return a list of contigs that have been annotated with this term. The resulting JSON code can then be parsed, so that the extracted data can be used in subsequent applications.

An example of this JSON response is shown below, and we can see that the web services have returned information on contig BC000000118, including the sequence of this contig and any SNPs (and their position) in the contig. We also have information on the SNP we requested (BS00003644) and we have obtained the sequence of the contig that surrounds the SNP as well as it's position in the sequence. Finally we have a contigs that has been annotated with the search term "rht". The top BLAST hits for this contig have been concatenated together to increase the chance of identifying interesting annotations.





Based at the University of Bristol with support from BBSRC. BBSRC icon Bristol icon

Maintained by Paul Wilkinson.


-->