#API Request for specific IP Access rule by configuration value and target

4 messages · Page 1 of 1 (latest)

empty relic
#

I am attempting to use the cf api to get an ip access rule from a worker by the value, I see the api documentation here https://developers.cloudflare.com/api/operations/ip-access-rules-for-an-account-list-ip-access-rules however including json on the request returns a fail with the message firewallaccessrules.api.bad_json. the request json is as follows { "configuration": { "target": "ip", "value": "1.2.3.4" } }, this matches the json returned for the entire list an the docs, the only thing odd to me is the second Query Parameters, does it want me to urlencode the json?

vivid python
#

If you are listing then you don't need a JSON body as GET requests don't support requests bodies

empty relic
vivid python