Reactome: A Curated Pathway Database
Developer's Zone

RESTful Service

More Info

To use this API efficiently, the user needs to understand the Reactome data model.

Get Started
GET vs POST Methods

The methods listed on this page are specified as either GET or POST requests. GET and POST are not interchangeable.

GET

This API is primarily intended for programmatic access by other applications such as the Reactome Pathway Browser.
However, methods specifying GET can be accessed via a web browser or command line client such as wget
or curl using the URL structure specified in the documentation. An example of a GET request for the method QueryById is
shown below:

http://reactome.org/ReactomeRESTfulAPI/RESTfulWS/queryById/DatabaseObject/R-ALL-29358.1

An example of how to obtain this information via the command line:

curl http://reactome.org/ReactomeRESTfulAPI/RESTfulWS/queryById/DatabaseObject/R-ALL-29358.1 > R-ALL-29358.1.xml

POST

POST methods are generally accessed by other programs and can be accessed directly by a web browser. How they are accessed
is specific to the application and programming language. Below is an example of how Javascript was used in this web page
to demonstrate the POST methods.

	
function queryByIds(type) {
	url = "/ReactomeRESTfulAPI/RESTfulWS/queryByIds/Pathway";
	body = "ID=109607,109606,75153,169911";
	doPost(url, type, body);
}
		
function doPost(url, type, body) {
	newWindow = window.open("", url);
	ajax = new XMLHttpRequest();
	ajax.open("POST", url, true);

	ajax.setRequestHeader("Content-type", "text/plain");
	ajax.setRequestHeader("Accept", type);
	ajax.onreadystatechange = function() {
		if(ajax.readyState == 4 && ajax.status == 200) {
			text = ajax.responseText.replace(/</g, "&lt;");
			text = text.replace(/>/g, "&gt;");
			newWindow.document.write("<pre>" + text + "</pre>");
			newWindow.document.close();
		}
	};
	ajax.send(body);
}
		
function listByQuery(type) {
	url = "/ReactomeRESTfulAPI/RESTfulWS/listByQuery/Pathway";
	body = "name=Apoptosis";
	doPost(url, type, body);
}
		
function pathwaysForEntities(type) {
	url = "/ReactomeRESTfulAPI/RESTfulWS/pathwaysForEntities";
	body="ID=170075,176374,68557";
	doPost(url, type, body);
}

function queryHitPathways(type) {
	url = "/ReactomeRESTfulAPI/RESTfulWS/queryHitPathways";
	body="PPP2R1A,CEP192,AKAP9,CENPJ,CEP290,DYNC1H1";
	doPost(url, type, body);
}

It is also possible to use the command line to obtain data from POST methods. For example:

curl --header "Content-Type:text/plain"  --data "PPP2R1A,CEP192,AKAP9,CENPJ,CEP290,DYNC1H1" \
http://reactomews.oicr.on.ca:8080/ReactomeRESTfulAPI/RESTfulWS/queryHitPathways

RESTFul Service API

BioPAX Exporter: biopaxExporter/{level}/{dbId: \\d+}
Pass an Event database identifier, and get the BioPAX exported in either XML or JSON. The passed Id has to be an Event Id. If there is no matching ID in the database, it will return an empty string.

Request Type:
GET
Parameters:
String – BioPAX Level2 or Level3: one of two values, Level2 and Level3
Integer – Event database identifier
Output:
String – BioPAX RDF document
Example:
To get the BioPAX level 2 export for Cell cycle, mitotic,
use biopaxExporter/Level2/69278

FrontPageItems: frontPageItems/{species name}
Get the list of front page items listed in the Reactome pathway browser.
You can get a list of front page items for different species by specifying species name.

Request Type:
GET
Parameters:
String – Full species name that should be encoded for URL (e.g. homo+sapiens for human, or mus+musculus for mouse)
Output:
list of fully encoded Pathway objects in JSON or XML
Example:
To get a list of front page items for human pathways, use frontPageItems/homo+sapiens


HighlightPathwayDiagram: highlightPathwayDiagram/{dbId:\\d+}/{format: PDF|PNG}
Highlight a diagram for a specified pathway based on its DB_ID. The returned value is base64 encoded image in the PDF or PNG format. This method should be used after method queryHitPathways.

Request Type:
POST
Parameters:
Integer – Pathway database identifier
String – image format: PNG, or PDF

String – Gene symbols delimited by comma (no space)
Output:
String – Base64 encoded pathway diagram for PNG or PDF with objects highlighted for queried genes
Note:
You may have to use a Base64 decoder to get the actual image file from the returned String.

ListByQuery: listByQuery/{className}
This API lets you query the Reactome Database for a list of objects by using Key Value pairs based on an object’s attributes. The format of the HTTP POST body should structured as a Key=Value pair.
First there must be a key “key”, and a value “value” inside the body of the HTTP POST request. For example, to query pathways with names as “Apoptosis”, post “name=Apoptosis” to the server.

Request Type:
POST
Parameters:
String – class name
String – attribute values encoded in key-value pair in the POST body
Output:
encoded objects in JSON or XML
Example:
To query a list of pathways with names as “Apoptosis”, try XML or JSON result

PathwayDiagram: pathwayDiagram/{dbId : \\d+}/{format: .+}
This API lets you retrieve a pathway diagram by passing the database identifier of the pathway and the format of the pathway diagram returned. The available format choices are PDF, PNG and XML.

Request Type:
GET
Parameters:
Integer – Pathway database identifier
String – image format: PNG, PDF, or XML.

Output:
String – Base64 encoded pathway diagram for PNG or PDF. XML text for the XML file type.
Example:
To get the pathway diagram in XML for Cell cycle, mitotic, use pathwayDiagram/109581/XML

PathwayHierarchy: pathwayHierarchy/{species name}
Get the pathway hierarchy for a specified species as displayed in Reactome pathway browser.

Request Type:
GET
Parameters:
String – Full species name that should be encoded for URL (e.g. homo+sapiens for human, or mus+musculus for mouse)
Output:
String – XML text containing pathways and reactions
Example:
To get the pathway hierarchy for human as displayed in Reactome pathway browser, use pathwayHierarchy/homo+sapiens

PathwayParticipants: pathwayParticipants/{dbId : \\d+}
This API lets you query for a list of pathway participants for a pathway using a Pathway database identifier. It returns a list of all PhysicalEntity objects that participate in the Pathway.

Request Type:
GET
Parameters:
Integer – Pathway database identifier
Output:
list of fully encoded PhysicalEntity objects in JSON or XML
Example:
To get a list of PhysicalEntity objects participating in Apoptosis, use pathwayParticipants/109581

PathwayComplexes: pathwayComplexes/{dbId : \\d+}

This API lets you query for a list of complexes belonging to a pathway using a Pathway database identifier. It returns a list of all PhysicalEntity objects that participate in the Pathway.
Request Type:
GET
Parameters:
Integer – Pathway database identifier
Output:
list of fully encoded PhysicalEntity objects in JSON or XML
Example:
To get a list of PhysicalEntity objects participating in Apoptosis, use pathwayComplexes/109581

QueryById: queryById/{className}/{dbId: \\d+}
This API lets you query the Reactome Database for a specific object. It requires passing class name of the object, as well as the database identifier or the stable identifier of the object. The class name is required. It returns a full object, including full class information about all the attributes of the returned object. For example, if the object has one PublicationSource attribute, it will return a full PublicationSource object within the returned object.

Request Type:
GET
Parameters:
String – class name
Integer – instance database identifier or stable identifier if available
Output:
encoded object in JSON or XML
Example:
To get a Pathway object for Apoptosis, use queryById/Pathway/109581

QueryByIds: queryByIds/{className}
This API lets you query the Reactome Database for a list of objects. It requires passing the object class as the first parameter in the URL, and a list of database identifiers
or stable identifiers as the second parameter. The Identifiers are passed inside the body of the HTTP Post request. The Id’s format should be structured as a Key=Value pair.
First a key “ID”, and a value of comma separated list inside the body of the HTTP POST request.

Request Type:
POST
Parameters:
String – class name
Integer – database identifiers or stable identifiers if available in the POST body
Output:
encoded objects in JSON or XML
Example:
To get the sub-pathway objects for Apoptosis,
try XML or JSON result


QueryHitPathways: queryHitPathways
Query for a list of pathways that contain one or more genes passed in the query list. Currently only human pathways will be returned from this method.

Request Type:
POST
Parameters:
String – Gene symbols delimited by comma (no space)
Output:
list of fully encoded Pathways objects in JSON or XML
Example:
To get a list of pathways containing PPP2R1A, CEP192, AKAP9, CENPJ, CEP290, and DYNC1H1,
try XML or JSON result

QueryPathwayForEntities: pathwaysForEntities
Query for pathway objects by specifying an array of PhysicalEntity database identifiers. The returned Pathways should contain the passed EventEntity objects. All passed EventEntity database identifiers should be in the database.

Request Type:
POST
Parameters:
Integer – PhysicalEntity database identifiers delimited by comma
Output:
list of fully encoded Pathways objects in JSON or XML
Example:
To get a list of pathways containing CDC2, HUS1, and MCM2, try XML or JSON result

QueryReviewedPathways: queryReviewedPathways/{personId}
This API lets you query the Reactome Database for pathways reviewed by a particular person.
It requires the DB_ID for the Person class. Person IDs can be located with either the QueryPeopleByName
or QueryPeopleByEmail methods,

Request Type:
GET
Parameters:
String – Person class name
Output:
encoded object in JSON or XML
Example:
To get all pathways reviewed by Person 1169275 queryReviewedPathways/1169275

QueryPeopleByName: queryPeopleByName/{name}
This API lets you query the Reactome Database for a particular person.
It requires a full or partial name. NOTE: spaces must be escaped with ‘%20’.

Request Type:
GET
Parameters:
String – Name
Output:
encoded object in JSON or XML
Example:
Find people whose names match ‘Robin Haw’ queryPeopleByName/Robin%20Haw
Find all people whose names match ‘Haw’ queryPeopleByName/Haw

QueryPeopleByEmail: queryPeopleByEmail/{email}
This API lets you query the Reactome Database for a particular person by a valid email address.

Request Type:
GET
Parameters:
String – email address
Output:
encoded object in JSON or XML
Example:
Find people whose names match ‘deustp01@nyumc.org’ queryPeopleByEmail/deustp01@nyumc.org

Species List: speciesList
Get the list of species used in the “Switch Species” box in Reactome pathway browser.

Request Type:
GET
Output:
encoded objects in JSON or XML
Example:
To get the list of species in Reactome, use speciesList

SBML Exporter: sbmlExporter/{dbId: \\d+}
Pass an Event database identifier, and get the SBML XML text. The passed Id has to be an Event Id. If there is no matching ID in the database, it will return an empty string.

Request Type:
GET
Parameters:
Integer – Event database identifier
Output:
String – SBML XML text
Example:
To get the SBML export for Apoptosis, use sbmlExporter/109581

Reference Molecules getReferenceMolecules/
Get a list of small molecules and their chebi IDs

Request Type:
GET
Parameters:
None
Output:
String Tab-delimited list
Example:
Get small molecules

Diseases getDiseases/
Get a list of diseases and their disease ontology Ids (DOID)

Request Type:
GET
Parameters:
None
Output:
String Tab-delimited list
Example:
Get diseases

Proteins getUniProtRefSeqs/
Get a list of Reactome proteins that have UniProt identifiers

Request Type:
GET
Parameters:
None
Output:
String Tab-delimited list
Example:
Get proteins

Resources