def _get_rest_api_url_from_creds(session, credentials):
    """Retrieves the Streams REST API URL from the provided credentials.
    Args:
        session (:py:class:`requests.Session`): A Requests session object for making REST calls
        credentials (dict): A dict representation of the credentials.
    Returns:
        str: The remote Streams REST API URL.
    """
    resources_url = credentials['rest_url'] + credentials['resources_path']
    try:
        response_raw = session.get(resources_url, auth=(credentials['userid'], credentials['password']))
        response = response_raw.json()
    except:
        logger.error("Error while retrieving rest REST url from: " + resources_url)
        raise

    response_raw.raise_for_status()

    rest_api_url = response['streams_rest_url'] + '/resources'
    return rest_api_url
def _get_rest_api_url_from_creds ( session , credentials ) : resources_url = credentials [ 'rest_url' ] + credentials [ 'resources_path' ] try : response_raw = session . get ( resources_url , auth = ( credentials [ 'userid' ] , credentials [ 'password' ] ) ) response = response_raw . json ( ) except : logger . error ( "Error while retrieving rest REST url from: " + resources_url ) raise response_raw . raise_for_status ( ) rest_api_url = response [ 'streams_rest_url' ] + '/resources' return rest_api_url
Retrieves the Streams REST API URL from the provided credentials.
    Args:
        session (:py:class:`requests.Session`): A Requests session object for making REST calls
        credentials (dict): A dict representation of the credentials.
    Returns:
        str: The remote Streams REST API URL.