'POST /api/tool_shed_repositories/import_workflows
Import all of the exported workflows contained in the specified installed tool shed repository into Galaxy.
:param key: the API key of the Galaxy user with which the imported workflows will be associated.
:param id: the encoded id of the ToolShedRepository object'

@expose_api
def import_workflows(self, trans, **kwd):

    api_key = kwd.get('key', None)
    if (api_key is None):
        raise HTTPBadRequest(detail="Missing    required    parameter    'key'    whose    value    is    the    API    key    for    the    Galaxy    user    importing    the    specified    workflow.")
    tool_shed_repository_id = kwd.get('id', '')
    if (not tool_shed_repository_id):
        raise HTTPBadRequest(detail="Missing    required    parameter    'id'.")
    repository = repository_util.get_tool_shed_repository_by_id(self.app, tool_shed_repository_id)
    exported_workflows = json.loads(self.exported_workflows(trans, tool_shed_repository_id))
    imported_workflow_dicts = []
    for exported_workflow_dict in exported_workflows:
        workflow_name = exported_workflow_dict['workflow_name']
        (workflow, status, error_message) = workflow_util.import_workflow(trans, repository, workflow_name)
        if (status == 'error'):
            log.debug(error_message)
        else:
            imported_workflow_dicts.append(workflow.to_dict(view='element'))
    return imported_workflow_dicts
