For Computational Biologists and Software Developers:
If you wish to programmatically access our data, you can do so via our Web Service API. This page provides a quick reference guide to help you get started.
Issuing Client Requests
Client requests to the Web Service are formed by specifying URL parameters. Parameters are as follows:
- cmd: Indicates the command to execute. Current valid commands are defined in the commands section below.
- q: Indicates the query parameter. Depending on the command, this is used to indicate one or more search terms or a unique ID. For example, "dna repair" or "P09097".
- format: Indicates the
format of returned results.
Current valid formats are as follows:
- biopax: Data will be formatted in the BioPAX XML format.
- version: Indicates the version of the web service API. Must be specified. The only supported version is "1.0".
Commands
| Command | Description |
|---|---|
| help | Requests the current help page that you are now reading. |
| get_top_level_pathway_list | Returns a summary of all "top-level" pathways in the database. In the BioPAX ontology, pathways can contain sub-pathways. This command returns top-level pathways only, and filters out all sub-pathways. The response is a BioPAX XML document. |
| get_record_by_cpath_id | Retrieves the complete contents of the specified record. The response is a BioPAX XML document. |
Error Codes
If an error occurs while processing your request, you will receive an XML document with detailed information about the cause of the error. Error documents have the following format:
<error>
<error_code>[ERROR_CODE]</error_code>
<error_msg>[ERROR_DESCRIPTION]</error_msg>
<error_details>[ADDITIONAL_ERROR _DETAILS]</error_details>
</error>
The table below provides a list of error codes, with their descriptions.
| Error Code | Error Description |
|---|---|
| 200 | OK, data follows |
| 450 | Bad Command (command not recognized) |
| 451 | Bad Data Format (data format not recognized) |
| 452 | Bad Request (missing arguments) |
| 453 | Bad Request (invalid arguments) |
| 460 | No Results Found |
| 470 | Version not supported |
| 500 | Internal Server Error |
Examples of Usage
The following requests a summary of all top-level pathways in the database:
The following requests the full BioPAX record for local ID 1:
The following query specifies an invalid format. The web service will return an XML document with a specific error code and error message.