List IP Access rules - GET Query Parameters

following the api docs at Cloudflare API Documentation

I want to get a list of all IP access rules that match notes containing “cloud”.

According to the docs, I can list IP access rules using a GET request to https://api.cloudflare.com/client/v4/accounts/{account_identifier}/firewall/access_rules/rules

However, if i want to add a filter, the docs suggest a query parameter, but there are no examples on how this is formed or passed.

I tried a POST request with json body, but no luck. I have no idea how to pass data via a GET request.

Thanks!

json body:

{“filters”:[{“notes”:“cloud”}]}

or

{“filters”:{“notes”:“cloud”}}

  • doesnt matter which, it just returns the complete json of rules, no filter.

im using php/curl, being sure to use GET custom_request and sending body.

Add to the end of the query…
https://api.cloudflare.com/client/v4/accounts/{account_identifier}/firewall/access_rules/rules?page=1&per_page=10

1 Like

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