Using the REST API documentation

Use of the REST API typically involves three common steps:

  • identifying the question we want answered
  • identifying the corresponding REST resources to help us answer this question
  • assessing the REST responses

If however, you are still having trouble answering the question, please do get in touch!

Typical example

Question

As an illustrative example, let us assume we want to retrieve all information about Gene Ontology terms that match the words, primosome complex, in some way.

Choose the resource

To answer our question, we would first click the "GO" link in the menu on the left of the REST API home page. This will show us the list of resources available that are specific to Gene Ontology data; we should choose the one that answers best our question. In this case, the /ontology/go/search resource operation is a good fit.

Give it a go

We can subsequently try this out to see if it produces the kind of result we want. For our problem, this involves entering primosome complex as the value of the parameter named, query, and then hitting "Try it out!".

Finally, the results of the request will be displayed in the section below the "Try it out!" button, and you will be able to see if this is the kind of result you were expecting.

As can be seen above, we provide code snippets showing how one can access the results using a range of common tools/languages; currently Curl, Perl, Python, Ruby and Java.

From this point, we may then wish to find out as additional information about each of the terms matching primosome complex. For example, we could use the /ontology/go/terms/{ids} resource operation, where the term identifiers can be specified as a comma-separated-value, e.g., /ontology/go/terms/GO:0000001,GO:0000002.