Move the knowledge of the urls for the REST API to one new file
[htsworkflow.git] / htsworkflow / pipelines / retrieve_config.py
index 0ef42a589fcdd06a90be00c4cdda4a48d10c7b02..fbd1187a5ca14e5517b4e8b455d3cf82c203a484 100644 (file)
@@ -14,6 +14,7 @@ except ImportError, e:
     import simplejson as json
 
 from htsworkflow.frontend.auth import apidata
+from htsworkflow.util import api
 from htsworkflow.util.url import normalize_url
 from htsworkflow.pipelines.genome_mapper import getAvailableGenomes
 from htsworkflow.pipelines.genome_mapper import constructMapperDict
@@ -36,7 +37,7 @@ def retrieve_flowcell_info(base_host_url, flowcell):
     """
     Return a dictionary describing a 
     """
-    url = base_host_url + '/experiments/config/%s/json' % (flowcell)
+    url = api.flowcell_url(base_host_url, flowcell)
   
     try:
         apipayload = urllib.urlencode(apidata)