Cloudflare API: Deleting an item from List


Need a little help with Cloudflare API

Task: I want to DELETE an item from IP List using API

I read the docs Cloudflare API v4 Documentation And found that to delete an IP from the List we need to pass the item ID which we can get from GET list items API Cloudflare API v4 Documentation Now the issue is about complexity.

Problem: Do, I need to first scan the whole array which is returned by get list items API where the IP Matches the one which needs to be deleted and then get its ID and make the API Call? Isn’t that a problem? Like if I am missing some API which could easily do this thing, Or even if I add an IP to the List it doesn’t returns it ID but rather operation ID Kindly help me get the solution to this problem.


1 Like

I’m also facing the similar issue in getting the ID of the created redirect list items.
I have also posted my question in the community.

Since it is been a year now, were you able to address this issue? If so can you share your solution?

Probably looking for How-to Download my list of blocked IPs? - #2 by eva2000