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

Version 1 Next »

Under construction

Web Services end points: Swagger

A list of all available web services end points is available at:

http://bioinfo.hpc.cam.ac.uk/cellbase/webservices/

powered by the Swagger project.

Understanding the URL

The general structure of a CellBase RESTful call is:

http://HOST_URL/{version}/{species}/{category}/{subcategory}/{id}/{resource}?{filters}

Where HOST_URL is 

http://bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest

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

Example:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/info

As is explained later in this documentation, this RESTful WS will get all the information available for the gene BRCA2 in human using the latest version.

The available parameters are:

Version

Indicate the CellBase version to retrieve information from. Versions are numbered as v1, v2, v3, v4, etc. At this moment the latest stable version is v4. However, the latest stable version will be always coded as latest.

Species

Species to get information from. A list of the species available for version v3 can be found [[here | species-list]] Use the abbreviated code to indicate the species. For example, hsapiens for Homo sapiens or mmusculus for Mus musculus.

Category and subcategory

These parameters must be specified depending on the nature of your input data. For example, if we want to query CellBase by a genomic region (e.g. 13:32889575-32889763) we should use the genomic category and region subcategory. There are 4 main categories:

| Category | Description | Subcategories | |:-:|---|---| | Genomic | Genomic category makes reference to genomic coordinates | Position, Variant, Region | | Feature | Feature category involve all elements which have a defined location on the genome and provides an easy way to retrieve cross references for an ID | Gene, SNP, Transcript, Protein, Xref, ... | | Regulatory | Regulatory category refers to all regulatory interactions involving transcription factors and microRNAs | TFBSs, miRNAs | | Network | Network category makes reference to all types of networks and pathways, including the protein interactome, the regulatory network and Reactome | Pathway |

Id

What the user wants to retrieve from the id. This is the query parameter, it is the feature or term about we want to retrieve the information (resource). Its type must correspond with the subcategory.

NOTE: In order to improve performance, ID lists can be passed together in only one REST call separated by commas. Only 200 IDs are allowed. For larger queries user the CellBase client.


Examples:

Resources

Each Category and Subcategory can have different resources and actions allowed. They specify the type of result we want to obtain from the ID.

Examples:

NOTE: Resources must always be written in singular.

Filters and extra options

Filters and extra options can be added at the end of the REST query followed by ?. They are optional and can be combined using the & sign. E.g:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/info?of=json&include=id,name,biotype

These are the available filters and options: output format: coded as *of**, the only allowed value now is json (default), others such as protobuf are being developed. E.g.:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/info?of=json * exclude: name of the fields to be excluded in the output. E.g:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/info?exclude=transcripts * include: name of the fields to be included in the output, the rest will be excluded. E.g:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/info?include=id,name,biotype * limit: maximum number of results to be returned. By default, all results are returned. E.g:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/snp?limit=3 * skip: number of results to be skipped. By default, no result is omitted. E.g:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/snp?skip=50 * count: get the number of results obtained. By default, false. E.g:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/BRCA2/snp?count=true

Help and metadata

The available main categories are listed at:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens

And the available subcategories for a main category are listed at: bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/genomic bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/regulatory bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/network

Subcategories should specify the type of the id. Subcategories can be different for each category and are described within each of the categories mentioned above.

Each subcategory usage is shown by writing the subcategory name followed by /help, for example:

bioinfo.hpc.cam.ac.uk/cellbase/webservices/rest/latest/hsapiens/feature/gene/help


  • No labels