The DeCIFR REST API service allows access to results of a previous run of T-BAS v2 via HTTP with a browser request, programmatically, or using a command line tool such as CURL.
REST allows the user to submit a query to retrieve specific metadata associated with a leaf on T-BAS reference tree or to retrieve the taxonomic assignment and metadata of an unknown placement on the tree.
For retrieving data using HTML requests the query of a resource starts with https://tools.decifr.hpc.ncsu.edu/rest/html/ in the URL name, followed by the T-BAS run number (e.g. YJCK3WI4) and a keyword of the type of data retrieved (e.g. placements). The full HTML request to retrieve the placement results in this example would look like this:
This will return the taxonomic assignments of all unknowns that were placed using the Pezizomycotina reference tree in run YJCK3WI4. The placements are shown in a web page as formatted JSON output files embedded in HTML. Other examples of information that can be retrieved are shown below.
|List of placements on a tree||https://tools.decifr.hpc.ncsu.edu/rest/html/YJCK3WI4/placements|
|List of leaves (terminals) on a tree||https://tools.decifr.hpc.ncsu.edu/rest/html/YJCK3WI4/leaves|
|Metadata of a leaf||https://tools.decifr.hpc.ncsu.edu/rest/html/YJCK3WI4?query=Schizosaccharomyces_pombe|
|Metadata and taxonomy of a specific placement||https://tools.decifr.hpc.ncsu.edu/rest/html/YJCK3WI4?placement=6407_endo|
A query of a resource starting with https://tools.decifr.hpc.ncsu.edu/rest/json/ will return the requested data in JSON format. Authorization is by authentication header credentials submitted in the request.
|List of placements on a tree as JSON||https://tools.decifr.hpc.ncsu.edu/rest/json/YJCK3WI4/placements|
|List of leaves (terminals) on a tree as JSON||https://tools.decifr.hpc.ncsu.edu/rest/json/YJCK3WI4/leaves|
CURL is a command line tool that can be used to transfer data with URLs. CURL makes it easy to retrieve taxonomic assignment results from T-BAS into other tools and pipelines.
|List of placements on a tree as JSON||curl https://user:email@example.com/rest/json/YJCK3WI4/placements|
|List of leaves (terminals) on a tree as JSON||curl https://user:firstname.lastname@example.org/rest/json/YJCK3WI4/leaves|
|list of leaves or terminals||list of placements|