Okay, so I’m not familiar with this.
I need to figure out a way to get all of the “IP access rules” out of Cloudflare, the IPs we have manually blocked under Firewall > Tools > IP Access Rules. All the posts I found on this topic say “use the API” except, I’m not familiar with this. The labeling of some items is not clear.
Any chance someone can provide an example of how to do this that I can wrap my MS-riddled head around?
If so, thanks, you’re my hero!
I’m trying to read the docs and find out which kind of tokens I need to create, stuck on step one. Which of these relates to the one I want?
Edit: Also I’m assuming the curl commands are going into ssh?
Edit: Tried connecting, success, valid and active.
Edit: Okay so I think I need?:
The documentation says:
API Key X-Auth-Key API key generated on the “My Account” page
First of all there is no “My Account” page
And I tried the Global API Key there, no success.
I’m a privileged user on another account, maybe this is the issue?
Edit: Was finally able to connect (using primary account and his global key) and it spit out empty information… which can’t be the case because we have more than 12 pages of blocks…
Edit: I’m using this:
curl -X GET “https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules?page=1&per_page=20&mode=block”
-H “X-Auth-Email: [email protected]”
-H “X-Auth-Key: redacted”
-H “Content-Type: application/json”
Any help on if I’m using the right one? Pretty please?