'Return an exported gzip compressed repository archive file opened for reading.'

@web.expose
def export_via_api(self, trans, **kwd):

    encoded_repositories_archive_name = kwd.get('encoded_repositories_archive_name', None)
    if encoded_repositories_archive_name:
        repositories_archive_name = encoding_util.tool_shed_decode(encoded_repositories_archive_name)
        opened_archive = open(repositories_archive_name)
        os.unlink(repositories_archive_name)
        return opened_archive
    return ''
