How do i bulk delete records in cloudflare

Hi

i have around 150 records in a domain
how can i bulk delete [140] of those records

Not via the UI, but you can script it. Basic framework…

If anyone needs a script, I’ve used the below in the browser console to delete 200 records.

(() => {
    const deleteTopRecord = () => {
        document.querySelector('a.c_ba.c_mh.c_v.c_mi.c_mj.c_mk.c_ml.c_mm.c_mn.c_mo.c_uc.c_mp.c_al').click();
        setTimeout(() => {
            var tabs = document.querySelectorAll(".c_bh.c_c.c_j.c_tz.c_q.c_d");
            if(tabs.length) {
                tabs[0].firstChild.click();
                setTimeout(() => {
                	document.querySelector('.c_cm.c_tz.c_xi.c_br.c_id.c_xj button.c_xm').click();
                }, 200);
                setTimeout(deleteTopRecord, 500);
            } else {
                setTimeout(deleteTopRecord, 100);
            }
        }, 500);
    };
    deleteTopRecord();
})();

If you have issues, just check the classnames - for some reason they appear to be regenerated each time the grid displays a new page.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.