General consideration
First, deploy the BioNetDB WAR file (bionetdb.war) following the intructions from Deploy WAR file.
Understanding the URL
The general format of the REST API web services is:
http://HOST_URL/webservices/rest/{apiVersion}/{resource}/{endpoint}?{options}
where HOST_URL is the name of the host machine and the name of Java war file deployed in web server (e.g. tomcat) over that server for example localhost:8080/bionetdb
Entities inside the curly braces { } are the web service parameters, and they are treated as variables. For example the following URL:
http://localhost:8080/bionetdb/webservices/rest/v1/table/cypher?query="match (n:VARIANT) return count(n)"
As is explained later in this documentation, this RESTful web service will execute a Cypher query returning results as a table:
- apiVersion (v1) : indicates BioNetDB version to retrieve information from, data models and API may change between versions.
- resource (table) : specifies the data type of what the user wants to retrieve. This can be one of resources listed below.
- endpoint (cypher) : these parameters must be specified depending on the nature of your input data; in our example, cypher indicates we are going to execute a Cypher query.
- options (query) : variables in key value pair form, passed as query parameters; in our example, it is the Cypher query itself: "match (n:VARIANT) return count(n)"
URL parameters
apiVersion
apiVersions are numbered as v1, v2, etc. At this moment we are heading to first stable apiVersion which is v1.
resource
There are several resources implemented:
Resource | Path | Description | Main endpoints |
---|
Network | /network | Methods to work with networks | cyper, info, model |
Node | /node | Methods to work with nodes | cyper, info |
Path | /path | Methods to work with paths between nodes | cypher |
Table | /table | Methods to get output results as tabels | cypher |
options
These query parameters can modify the behaviour of the query (exclude, include, limit, skip and count) or add some filters to some specific endpoints to add useful functionality. The following image shows the options for the previous webservice.

Swagger
BioNetDB has been documented using Swagger project. Detailed information about resources, endpoints and options is available at your own installation:
http://localhost:8080/bionetdb/webservices/

