{ "swagger": "2.0", "info": { "title": "BioBB REST API", "license": { "name": "MIT License" }, "version": "1.5.0", "description": "

Tools are executed in asynchronous mode, as the time to completion is usually unknown and will depend on the tool and the available resources. Thus, endpoints should be called in three steps: launch, poll and data retrieval.

Below there is a list with the generic endpoints of the BioBB REST API. To take a look to all the endpoints available for the complete list of packages and tools, please go to the Tools Endpoints section.

" }, "host": "mmb.irbbarcelona.org", "basePath": "\/biobb-dev\/biobb-api\/public\/rest\/v1", "schemes": [ "https", "http" ], "consumes": [ "application\/json" ], "produces": [ "application\/json", "text\/plain", "application\/octet-stream", "application\/application\/x-gzip", "application\/zip" ], "tags": [ { "name": "List of Services", "description": "Provide all the information related to packages and tools" }, { "name": "Launch Tool", "description": "GET and POST operations for launching a tool" }, { "name": "Retrieve", "description": "Operations for retrieve the status of a job and the data generated by this job" }, { "name": "Sample Files", "description": "Access to all the available sample files" } ], "paths": { "\/launch": { "get": { "tags": [ "List of Services" ], "summary": "Get list of all available packages", "description": "Gets all the packages and tools available for executing through the REST API", "operationId": "getPckgList", "produces": [ "application\/json" ], "responses": { "200": { "description": "Successful operation", "schema": { "properties": { "packages": { "description": "List of all the BioBB packages available", "type": "array", "items": { "$ref": "#\/definitions\/Package" } } } } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/launch\/{package}": { "get": { "tags": [ "List of Services" ], "summary": "Get list of all available tools for a given package", "description": "Gets all the packages and tools available for executing through the REST API", "operationId": "getToolsList", "produces": [ "application\/json" ], "parameters": [ { "name": "package", "in": "path", "description": "Package identifier", "required": true, "type": "string", "default": "biobb_io" } ], "responses": { "200": { "description": "Successful operation", "schema": { "$ref": "#\/definitions\/Package" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/launch\/{package}\/{tool}": { "get": { "tags": [ "Launch Tool" ], "summary": "Get information for a given tool", "description": "Gets id, description and all the arguments (required or not) for a given tool / package", "operationId": "getLaunchTool", "produces": [ "application/json" ], "parameters": [ { "name": "package", "in": "path", "description": "Package identifier", "required": true, "type": "string", "default": "biobb_analysis" }, { "name": "tool", "in": "path", "description": "Tool identifier", "required": true, "type": "string", "default": "cpptraj_average" } ], "responses": { "200": { "description": "Successful operation", "schema": { "$ref": "#\/definitions\/Tool" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] }, "post": { "tags": [ "Launch Tool" ], "summary": "Launch a new job with a given tool", "description": "Launches a new job uploading a series of files. Click here for getting all the sample files for this tool in a compressed .zip file.

Note that this is a single example of launching a tool with BioBB REST API, the complete documentation for all the available tools is in this page.

Full examples with the complete process (launch, retrieve status and retrieve data) can be found here", "operationId": "postLaunchTool", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "parameters": [ { "name": "package", "in": "path", "description": "Package identifier", "required": true, "type": "string", "default": "biobb_analysis" }, { "name": "tool", "in": "path", "description": "Tool identifier", "required": true, "type": "string", "default": "cpptraj_average" }, { "name": "config", "in": "formData", "description": "Configuration file. Click here to get a sample file", "required": false, "type": "file" }, { "name": "input_top_path", "in": "formData", "description": "Input topology path. Click here to get a sample file", "required": true, "type": "file" }, { "name": "input_traj_path", "in": "formData", "description": "Input trajectory path. Click here to get a sample file", "required": true, "type": "file" }, { "name": "output_cpptraj_path", "in": "formData", "description": "Output trajectory path.", "required": true, "type": "string", "default": "output.average.pdb" } ], "responses": { "303": { "description": "See Other", "schema": { "$ref": "#\/definitions\/Status" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/retrieve\/status\/{token}": { "get": { "tags": [ "Retrieve" ], "summary": "Get status of a job", "description": "Gets the status of a job from a given token returned by /launch/{package}/{tool}", "operationId": "getRetrieveStatus", "produces": [ "application\/json" ], "parameters": [ { "name": "token", "in": "path", "description": "Job token", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful operation", "schema": { "$ref": "#\/definitions\/Status" } }, "202": { "description": "Accepted", "schema": { "$ref": "#\/definitions\/Status" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/retrieve\/data\/{id}": { "get": { "tags": [ "Retrieve" ], "summary": "Get file output", "description": "Gets the output file(s) generated after a job execution", "operationId": "getRetrieveData", "produces": [ "application\/octet-stream", "application\/json" ], "parameters": [ { "name": "id", "in": "path", "description": "File id", "required": true, "type": "string" } ], "responses": { "200": { "description": "Successful operation", "schema": { "type": "file" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/sample": { "get": { "tags": [ "Sample Files" ], "summary": "Get all sample files", "description": "Get all sample files in a single compressed .tgz file", "operationId": "getSample", "produces": [ "application\/application\/x-gzip" ], "parameters": [ ], "responses": { "200": { "description": "Successful operation", "schema": { "type": "file" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/sample\/{package}": { "get": { "tags": [ "Sample Files" ], "summary": "Get all package sample files", "description": "Get all package sample files in a single compressed .tgz file", "operationId": "getPackageSample", "produces": [ "application\/application\/x-gzip", "application\/json" ], "parameters": [ { "name": "package", "in": "path", "description": "Package id", "required": true, "type": "string", "default": "biobb_io" } ], "responses": { "200": { "description": "Successful operation", "schema": { "type": "file" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/sample\/{package}\/{tool}": { "get": { "tags": [ "Sample Files" ], "summary": "Get all tool sample files", "description": "Get all tool sample files in a single compressed .zip file", "operationId": "getToolSample", "produces": [ "application\/zip", "application\/json" ], "parameters": [ { "name": "package", "in": "path", "description": "Package id", "required": true, "type": "string", "default": "biobb_io" }, { "name": "tool", "in": "path", "description": "Tool id", "required": true, "type": "string", "default": "ligand" } ], "responses": { "200": { "description": "Successful operation", "schema": { "type": "file" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } }, "\/sample\/{package}\/{tool}\/{id}": { "get": { "tags": [ "Sample Files" ], "summary": "Get single sample file", "description": "Get single sample file from a tool.", "operationId": "getSingleSample", "produces": [ "application\/zip","text\/plain", "application\/octet-stream", "application\/json" ], "parameters": [ { "name": "package", "in": "path", "description": "Package id", "required": true, "type": "string", "default": "biobb_io" }, { "name": "tool", "in": "path", "description": "Tool id", "required": true, "type": "string", "default": "ligand" }, { "name": "id", "in": "path", "description": "File id", "required": true, "type": "string", "default": "config" } ], "responses": { "200": { "description": "Successful operation", "schema": { "type": "file" } }, "404": { "description": "Resource Not Found", "schema": { "$ref": "#\/definitions\/Status" } }, "503": { "description": "Database Not Found", "schema": { "$ref": "#\/definitions\/Status" } } }, "deprecated": false, "security": [ { "bearer": [] } ] } } }, "definitions": { "Package": { "required": [ "id", "tools" ], "properties": { "id": { "description": "BioBB package identifier", "type": "string" }, "tools": { "description": "Array of tools available for every package", "type": "array", "items": { "$ref": "#\/definitions\/Tool" } } }, "type": "object", "xml": { "name": "Package" } }, "Tool": { "required": [ "id", "description" ], "properties": { "id": { "description": "BioBB tool identifier", "type": "string" }, "description": { "description": "BioBB tool description", "type": "string" }, "arguments": { "description": "Array of arguments for every tool", "type": "array", "items": { "$ref": "#\/definitions\/Argument" } } }, "type": "object", "xml": { "name": "Tool" } }, "Argument": { "required": [ "id", "required" ], "properties": { "id": { "description": "BioBB tool argument identifier", "type": "string" }, "required": { "description": "BioBB tool argument required", "type": "boolean" } }, "type": "object", "xml": { "name": "Argument" } }, "Status": { "required": [ "code", "state", "message" ], "properties": { "code": { "description": "HTTP code for required status", "type": "integer" }, "state": { "description": "State of the request (RUNNING, ERROR or FINISHED)", "type": "string" }, "message": { "description": "Message describing response of the REST API server", "type": "string" }, "token": { "description": "Token given by the REST API server when a new job is launched", "type": "string" }, "output_files": { "description": "Array of output files generated by the tool", "type": "array", "items": { "$ref": "#\/definitions\/OutFile" } }, "expiration": { "description": "Date of job expiration in [Month day, YYYY HH:mm TIMEZONE] format", "type": "string", "format": "date" } }, "type": "object", "xml": { "name": "Status" } }, "OutFile": { "required": [ "id", "name", "size" ], "properties": { "id": { "description": "File identifier", "type": "string" }, "name": { "description": "File name", "type": "string" }, "size": { "description": "File size", "type": "integer" }, "mimetype": { "description": "File mime type", "type": "string" } }, "type": "object", "xml": { "name": "OutFile" } } }, "externalDocs": { "description": "BioBB REST API is powered by BioExcel Building Blocks", "url": "http:\/\/mmb.irbbarcelona.org\/biobb" } }