GET /api/
HTTP 200 OK
Allow: OPTIONS, GET
Content-Type: application/json
Vary: Accept

{
    "version": "http://detspace.i2sysbio.uv.es/api/version/",
    "prod": "http://detspace.i2sysbio.uv.es/api/prod/",
    "det": "http://detspace.i2sysbio.uv.es/api/det/",
    "chassis": "http://detspace.i2sysbio.uv.es/api/chassis/",
    "paths/prod_id/det_id": "http://detspace.i2sysbio.uv.es/api/paths/",
    "json_paths/prod_id/det_id": "http://detspace.i2sysbio.uv.es/api/json_paths/",
    "det_info/det_id": "http://detspace.i2sysbio.uv.es/api/det_info/"
}

API usage

DetSpace provides an API for easy access to the main functionalities of the tool. The code is freely available at the GitHub repository.


   import requests
   import urllib.parse

   url = "https://detspace.i2sysbio.uv.es"

   def version():
   """ Returns API version"""
   api_url = urllib.parse.urljoin(url,"api/version")
   response = requests.get(api_url)
   return response.json()

   def prod():
      """ Returns producibles"""
      api_url = urllib.parse.urljoin(url,"api/prod")
      response = requests.get(api_url)
      return response.json()

   def det():
      """ Returns detectables"""
      api_url = urllib.parse.urljoin(url,"api/det")
      response = requests.get(api_url)
      return response.json()

   def chassis():
      """ Returns chassis"""
      api_url = urllib.parse.urljoin(url,"api/chassis")
      response = requests.get(api_url)
      return response.json()

   def prod_det(det):
      """ Returns producibles connected to given detectable"""
      api_url = urllib.parse.urljoin(url,"/".join(["api/prod",str(det)]))
      response = requests.get(api_url)
      return response.json()

   def det_prod(prod):
      """ Returns detectables connected to given producible"""
      api_url = urllib.parse.urljoin(url,"/".join(["api/det",str(prod)]))
      response = requests.get(api_url)
      return response.json()

   def paths_prod_det(prod,det):
      """ Returns pathways from producible to detectable in SBML format"""
      api_url = urllib.parse.urljoin(url,"/".join(["api/paths",str(prod),str(det)]))
      response = requests.get(api_url)
      return response

   def paths_json_prod_det(prod,det):
      """ Returns pathways from producible to detectable in JSON format"""
      api_url = urllib.parse.urljoin(url,"/".join(["api/json_paths",str(prod),str(det)]))
      response = requests.get(api_url)
      return response

   def det_info(det):
      """ Returns Sensbio information about the detectable compound"""
      api_url = urllib.parse.urljoin(url,"/".join(["api/det_info",str(det)]))
      response = requests.get(api_url)
      return response