'GET /api/workflows/{encoded_workflow_id}/download
Returns a selected workflow as a json dictionary.'

@expose_api
def workflow_dict(self, trans, workflow_id, **kwd):

    stored_workflow = self.__get_stored_accessible_workflow(trans, workflow_id)
    style = kwd.get('style', 'export')
    ret_dict = self.workflow_contents_manager.workflow_to_dict(trans, stored_workflow, style=style)
    if (not ret_dict):
        message = 'Workflow    cannot    be    exported    due    to    missing    tools.'
        raise exceptions.MessageException(message)
    return ret_dict
