Unban ip using api

Hello,
I don’t understand how remove block to some ip using api.
I can do it with rule id but not with ip address.

Is there a way to get id rule of an ip blocked or unblock using ip address?

You would probably need to get all your rules, then go through all of them and find where the IP address is.

But what is the endpoint to get all the IP block details and their ID’s using api.

Tried the items and it is showing only blank details.

If this is from a Firewall Event, you’d have to query the GraphQL endpoint:

https://developers.cloudflare.com/analytics/graphql-api/

It is not a firewall event, It is a ip unblock rule which need to be accessed to get the rule id to unban the same.

Then the endpoint is described here:

https://api.cloudflare.com/

It asks for the rule id . How to find the rule id for the ip blocks?