'POST /api/tool_shed_repositories/get_latest_installable_revision
Get the latest installable revision of a specified repository from a specified Tool Shed.
:param key: the current Galaxy admin user\'s API key
The following parameters are included in the payload.
:param tool_shed_url (required): the base URL of the Tool Shed from which to retrieve the Repository revision.
:param name (required): the name of the Repository
:param owner (required): the owner of the Repository'

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

    (tool_shed_url, name, owner) = self.__parse_repository_from_payload(payload)
    if (not trans.user_is_admin()):
        raise exceptions.AdminRequiredException('You    are    not    authorized    to    request    the    latest    installable    revision    for    a    repository    in    this    Galaxy    instance.')
    params = dict(name=name, owner=owner)
    pathspec = ['api', 'repositories', 'get_ordered_installable_revisions']
    try:
        raw_text = util.url_get(tool_shed_url, password_mgr=self.app.tool_shed_registry.url_auth(tool_shed_url), pathspec=pathspec, params=params)
    except Exception as e:
        message = ('Error    attempting    to    retrieve    the    latest    installable    revision    from    tool    shed    %s    for    repository    %s    owned    by    %s:    %s' % (str(tool_shed_url), str(name), str(owner), str(e)))
        log.debug(message)
        return dict(status='error', error=message)
    if raw_text:
        changeset_revisions = json.loads(raw_text)
        if (len(changeset_revisions) >= 1):
            return changeset_revisions[(-1)]
    return hg_util.INITIAL_CHANGELOG_HASH
