get the data url for a specified endpoint_type, currently supported types
    are:

     * http-import: for importing data points
     * juttle: for running juttle programs

def get_data_url(deployment_name,
                 endpoint_type='juttle',
                 token_manager=None,
                 app_url=defaults.APP_URL):
    """
    get the data url for a specified endpoint_type, currently supported types
    are:

     * http-import: for importing data points
     * juttle: for running juttle programs

    """
    deployment_details = deployments.get_deployment_details(deployment_name,
                                                            token_manager=token_manager,
                                                            app_url=app_url)

    # use a random juttle endpoint
    endpoints = []
    for endpoint in deployment_details['endpoints']:
        if endpoint_type in endpoint['type']:
            endpoints.append(endpoint)

    if len(endpoints) == 0:
        raise JutException('No data engine currently configured for '
                           'deployment "%s"' % deployment_name)

    return random.choice(endpoints)['uri']