Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
General
Considerationconsideration
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:
Code Block | ||||
---|---|---|---|---|
| ||||
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:
Code Block | ||||
---|---|---|---|---|
| ||||
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.
Anchor | ||||
---|---|---|---|---|
|
There are several resources implemented, see below.
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 some typical options for a certain web service.
Image Removed
Resources and Endpoints
REST API is organised in two main groups: Catalog and Analysis web services.
Catalog
Resource | Path | Description | Main Endpointsendpoints |
---|---|---|---|
UsersNetwork | /usersnetwork | Different methods Methods to work with usersnetworks | cyper, info, create, login, ...Projectsmodel |
Node | /projects | projects are defined for each user and contains studies | info, create, studies, ... |
Studies | /studies | studies are the main component of catalog, the can be shared and contain files, samples and jobs | info, create, files, samples, jobs, variants, alignments, groups, ... |
Files | /files | files are added to the study and can be indexed to be queried | info, create, index, share, ... |
Jobs | /jobs | jobs are tool executions that can be queued | info, create, ... |
Families | /families | families are connected collection of individuals based on relationship | info, create, ... |
Individuals | /individuals | samples come from the individuals | info, create, ... |
Samples | /samples | samples are each of the experiment samples, typically matches a NGS BAM file or VCF sample | info, create, annotate, share, ... |
Cohorts | /cohorts | these model a group of samples that share some common properties, these are used for data analysis | info, create, stats, samples, ... |
Clinical Analysis | /clinical | this handles creating and search of a clinical analysis | info, create, ... |
Variable Set | /variableset | variables annotate samples with different information useful for data analysis | info, crate, ... |
Meta | /meta | gives the meta information about OpenCGA installation instance | ping, about, status |
GA4GH | /ga4gh | GA4GH standard web services to search genomics data in OpenCGA | variant search, reads search, responses |
Analysis
Operations over Genomic Variants to facilitate complete analysis with different tools.
Swagger
OpenCGAnode | 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.
Image Added
Swagger
BioNetDB has been documented using Swagger project. Detailed information about resources, endpoints and options is available at your own installation:
http://bioinfodev.hpc.cam.ac.uk/opencgalocalhost:8080/bionetdb/webservices/
Client Libraries
Currently OpenCGA supports the following client libraries:
Deprecation Policy
Certain APIs are deprecated over the period of time as OpenCGA is a live project and continuously improved and new features are implemented. Deprecation cycle consists of a warning period to let make user aware that these services are considered for change and highly likely will be replaced followed by a deprecated message. OpenCGA supports deprecated services for two releases (Deprecated and Next one). Deprecated services are hidden in the following release of deprecation and finally removed completely in next release.
Code Block | ||||
---|---|---|---|---|
| ||||
Warning (working) ---> Deprecated (working) ---> Hidden (working) ---> Removed (not working) |
All deprecated web services are clearly marked as deprecated along with a warning help message for user.
Image RemovedImage Added
Image Added
Table of Contents:
Table of Contents | ||
---|---|---|
|