def get_subject_url(endpoint_dict, subject):
    """Get the Ingest service url for a given subject.

    Args:
        endpoint_dict (dict): Dict representing the JSON response from the root Ingest service url.
        subject (str): The name of the subject to look for. (e.g. 'submissionEnvelope', 'add-file-reference')

    Returns:
        subject_url (str): A string giving the url for the given subject.
    """
    subject_url = endpoint_dict['_links'][subject]['href'].split('{')[0]
    print(
        'Got {subject} URL: {subject_url}'.format(
            subject=subject, subject_url=subject_url
        )
    )
    return subject_url