def METHOD_NAME(session, criteria, target_id=None):
    """Get all URLs based on criteria and target ID
    :param criteria: Filter criteria
    :type criteria: `dict`
    :param target_id: Target ID
    :type target_id: `int`
    :return: List of URL dicts
    :rtype: `list`
    """
    query = url_gen_query(session, criteria, target_id)
    results = query.all()
    return [url_obj.to_dict() for url_obj in results]