def iterate_cf_resource(session, first_request):
    """
    iterates over a v3-style, paginated resource, returning the full list of the resources
    """
    resources = []
    data = session.get(first_request).json()
    resources.extend(data["resources"])
    while data["pagination"]["next"] is not None:
        data = session.get(data["pagination"]["next"]["href"]).json()
        resources.extend(data["resources"])
    return resources