diff --git a/lib/galaxy/datatypes/converters/fasta_to_2bit.xml b/lib/galaxy/datatypes/converters/fasta_to_2bit.xml
index a8e3bb3204f..f0e004661fb 100644
--- a/lib/galaxy/datatypes/converters/fasta_to_2bit.xml
+++ b/lib/galaxy/datatypes/converters/fasta_to_2bit.xml
@@ -2,6 +2,7 @@
+ ucsc-twobittofa
ucsc_tools
faToTwoBit '$input' '$output'
diff --git a/lib/galaxy/webapps/galaxy/api/tools.py b/lib/galaxy/webapps/galaxy/api/tools.py
index 8dc7372738c..f91081d6b82 100644
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -129,6 +129,33 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin ):
tool = self._get_tool(id)
return tool.tool_requirements_status
+ @expose_api
+ @web.require_admin
+ def install_dependencies(self, trans, id, **kwds):
+ """
+ POST /api/tools/{tool_id}/install_dependencies
+ Attempts to install requirements via the dependency resolver
+ """
+ tool = self._get_tool(id)
+ [tool._view.install_dependency(id=None, **req.to_dict()) for req in tool.requirements]
+ if kwds.get('build_dependency_cache'):
+ tool.build_dependency_cache()
+ # TODO: rework resolver install system to log and report what has been done.
+ # _view.install_dependency should return a dict with stdout, stderr and success status
+ return tool.tool_requirements_status
+
+ @expose_api
+ @web.require_admin
+ def build_dependency_cache(self, trans, id, **kwds):
+ """
+ POST /api/tools/{tool_id}/build_dependency_cache
+ Attempts to cache installed dependencies.
+ """
+ tool = self._get_tool(id)
+ tool.build_dependency_cache()
+ # TODO: Should also have a more meaningful return.
+ return tool.tool_requirements_status
+
@expose_api
@web.require_admin
def diagnostics( self, trans, id, **kwd ):
diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py
index 53d0c948383..75eee3a7d4b 100644
--- a/lib/galaxy/webapps/galaxy/buildapp.py
+++ b/lib/galaxy/webapps/galaxy/buildapp.py
@@ -262,6 +262,8 @@ def populate_api_routes( webapp, app ):
webapp.mapper.connect( '/api/tools/{id:.+?}/citations', action='citations', controller="tools" )
webapp.mapper.connect( '/api/tools/{id:.+?}/download', action='download', controller="tools" )
webapp.mapper.connect( '/api/tools/{id:.+?}/requirements', action='requirements', controller="tools")
+ webapp.mapper.connect( '/api/tools/{id:.+?}/install_dependencies', action='install_dependencies', controller="tools", conditions=dict( method=[ "POST" ] ))
+ webapp.mapper.connect( '/api/tools/{id:.+?}/build_dependency_cache', action='build_dependency_cache', controller="tools", conditions=dict( method=[ "POST" ] ))
webapp.mapper.connect( '/api/tools/{id:.+?}', action='show', controller="tools" )
webapp.mapper.resource( 'tool', 'tools', path_prefix='/api' )