Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Understanding the URL

The general structure of a OpenCGA RESTful URL call is:


http://HOST_URL/webservices/rest/{apiVersion}/{resource}/{id(s)}/{endpoint}?{options}


Where HOST_URL is as follows bioinfodev.hpc.cam.ac.uk/opencga

Sections in braces are web service parameters, so they can be treated as variables.

Quick example:

http://bioinfodev.hpc.cam.ac.uk/opencga/webservices/rest/v1/users/opencga/login?password=opencga

As is explained later in this documentation, this RESTful web service will login user opencga.

The available parameters are: *apiVersion*: indicates OpenCGA version to retrieve information from, data models and API may change between versions. resource: specifies the data type of what the user want to retrieve in the id field. This can be one of usersprojectsstudiesfilesjobsindividualssamplesvariablescohorts or tools, more information here. *id*: the resource id we want to query. endpoint: these parameters must be specified depending on the nature of your input data. For example, if we want to query all files by a specific study (e.g. 1000genomes) we should use the studies resource and files endpoint. More information here

APIVersion

ApiVersions are numbered as v1v2, etc. At this moment we are heading to first stable apiVersion which is v1. However, when more apiVersions are available in the future the latest stable apiVersion will be always coded as latest.

Resources and Endpoints

There are 10 different resources implemented:

CategoryDescriptionMain Endpoints
usersDifferent methods to work with usersinfo, create, login, ...
projectsprojects are defined for each user and contains studiesinfo, create, studies, ...
studiesstudies are the main component of catalog, the can be shared and contain files, samples and jobsinfo, create, files, samples, jobs, variants, alignments, groups, ...
filesfiles are added to the study and can be indexed to be queriedinfo, create, index, share, ...
jobsjobs are tool executions that can be queuedinfo, create, ...
familiesfamilies are connected collection of individuals based on relationshipinfo, create, ...
individualssamples come from the individualsinfo, create, ...
samplessamples are each of the experiment samples, typically matches a NGS BAM file or VCF sampleinfo, create, annotate, share, ...
cohortsthese model a group of samples that share some common properties, these are used for data analysisinfo, create, stats, samples, ...
clinical Analysisthis handles creating and search of a clinical analysisinfo, create, ...
variableSetvariables annotate samples with different information useful for data analysisinfo, crate, ...
analysis alignmentweb services to facilitate the alignment processindex, query, stats, coverage
analysis variantweb services to facilitate complete variant analysis using different handy methodsindex, stats, query, validate, ibs, facet, samples, metadata
analysis toolbioinformatics tools installed for data analysisexecute
Metagives the meta information about OpenCGA installation instanceping, about, status
GA4GHGA4GH standard web services to search genomics data in OpenCGAvariant search, reads search, responses


IDs

This is the query parameter and the type matches resources path parameter, it represents the resource about we want to retrieve the information.

NOTE: In order to improve performance in many cases ID lists can be passed together in only one REST call separated by commas. Only 200 IDs are allowed.

Options

These query parameters can modify the behaviour of the query (excludeincludelimitskip 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. 

Swagger

OpenCGA has been documented using Swagger project. Detailed information about resourcesendpoints and options is available at:

http://bioinfodev.hpc.cam.ac.uk/opencga/webservices/

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. OpenCGA supports deprecated services for two releases (Deprecated and Next one) and all deprecated web services are clearly marked as deprecated along with a warning help message for user.


Table of Contents:


  • No labels