'POST /api/tool_shed_repositories/install_repository_revisions
Install one or more specified repository revisions from one or more specified tool sheds into Galaxy.  The received parameters
must be ordered lists so that positional values in tool_shed_urls, names, owners and changeset_revisions are associated.
It\'s questionable whether this method is needed as the above method for installing a single repository can probably cover all
desired scenarios.  We\'ll keep this one around just in case...
:param key: the current Galaxy admin user\'s API key
The following parameters are included in the payload.
:param tool_shed_urls: the base URLs of the Tool Sheds from which to install a specified Repository
:param names: the names of the Repositories to be installed
:param owners: the owners of the Repositories to be installed
:param changeset_revisions: the changeset_revisions of each RepositoryMetadata object associated with each Repository to be installed
:param new_tool_panel_section_label: optional label of a new section to be added to the Galaxy tool panel in which to load
tools contained in the Repository.  Either this parameter must be an empty string or
the tool_panel_section_id parameter must be an empty string, as both cannot be used.
:param tool_panel_section_id: optional id of the Galaxy tool panel section in which to load tools contained in the Repository.
If not set, tools will be loaded outside of any sections in the tool panel.  Either this
parameter must be an empty string or the tool_panel_section_id parameter must be an empty string,
as both cannot be used.
:param install_repository_dependencies (optional): Set to True if you want to install repository dependencies defined for the specified
repository being installed.  The default setting is False.
:param install_tool_dependencies (optional): Set to True if you want to install tool dependencies defined for the specified repository being
installed.  The default setting is False.
:param shed_tool_conf (optional): The shed-related tool panel configuration file configured in the "tool_config_file" setting in the Galaxy config file
(e.g., galaxy.ini).  At least one shed-related tool panel config file is required to be configured. Setting
this parameter to a specific file enables you to choose where the specified repository will be installed because
the tool_path attribute of the <toolbox> from the specified file is used as the installation location
(e.g., <toolbox tool_path="../shed_tools">).  If this parameter is not set, a shed-related tool panel configuration
file will be selected automatically.'

@expose_api
def install_repository_revisions(self, trans, payload, **kwd):

    self.__ensure_can_install_repos(trans)
    tool_shed_urls = util.listify(payload.get('tool_shed_urls', ''))
    names = util.listify(payload.get('names', ''))
    owners = util.listify(payload.get('owners', ''))
    changeset_revisions = util.listify(payload.get('changeset_revisions', ''))
    num_specified_repositories = len(tool_shed_urls)
    if ((len(names) != num_specified_repositories) or (len(owners) != num_specified_repositories) or (len(changeset_revisions) != num_specified_repositories)):
        message = 'Error    in    tool_shed_repositories    API    in    install_repository_revisions:    the    received    parameters    must    be    ordered    '
        message += 'lists    so    that    positional    values    in    tool_shed_urls,    names,    owners    and    changeset_revisions    are    associated.'
        log.debug(message)
        return dict(status='error', error=message)
    install_repository_dependencies = payload.get('install_repository_dependencies', False)
    install_resolver_dependencies = payload.get('install_resolver_dependencies', False)
    install_tool_dependencies = payload.get('install_tool_dependencies', False)
    new_tool_panel_section_label = payload.get('new_tool_panel_section_label', '')
    shed_tool_conf = payload.get('shed_tool_conf', None)
    tool_panel_section_id = payload.get('tool_panel_section_id', '')
    all_installed_tool_shed_repositories = []
    for (tool_shed_url, name, owner, changeset_revision) in zip(tool_shed_urls, names, owners, changeset_revisions):
        current_payload = dict(tool_shed_url=tool_shed_url, name=name, owner=owner, changeset_revision=changeset_revision, new_tool_panel_section_label=new_tool_panel_section_label, tool_panel_section_id=tool_panel_section_id, install_repository_dependencies=install_repository_dependencies, install_resolver_dependencies=install_resolver_dependencies, install_tool_dependencies=install_tool_dependencies, shed_tool_conf=shed_tool_conf)
        installed_tool_shed_repositories = self.install_repository_revision(trans, **current_payload)
        if isinstance(installed_tool_shed_repositories, dict):
            return installed_tool_shed_repositories
        elif isinstance(installed_tool_shed_repositories, list):
            all_installed_tool_shed_repositories.extend(installed_tool_shed_repositories)
    return all_installed_tool_shed_repositories
