Hi,
I’m trying to update my IP Access Rule IP address via API with:
curl -X PATCH "https://api.cloudflare.com/client/v4/accounts/MYDATA/firewall/access_rules/rules/MYDATA" \
-H "X-Auth-Email: MYMAIL" \
-H "X-Auth-Key: MYKEY" \
-H "Content-Type: application/json" \
--data '{"id":"MYID","notes":"MYNAME","allowed_modes":["whitelist","block","challenge","js_challenge","managed_challenge"],"mode":"whitelist","configuration":{"target":"ip","value":"MYIP"},"scope":{"id":"MYSCOPEiD","email":"MYMAIL","type":"user"}}'
I can change the note, the mode but not the IP.
I get no error from the API, it simply doesn’t change the IP address. The documentation gives this exact example:
curl -X PATCH "https://api.cloudflare.com/client/v4/accounts/01a7362d577a6c3019a474fd6f485823/firewall/access_rules/rules/92f17202ed8bd63d69a66b86a49a8f6b" \
-H "X-Auth-Email: [email protected]" \
-H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
-H "Content-Type: application/json" \
--data '{"id":"92f17202ed8bd63d69a66b86a49a8f6b","notes":"This rule is enabled because of an event that occurred on date X.","allowed_modes":["whitelist","block","challenge","js_challenge","managed_challenge"],"mode":"challenge","configuration":{"target":"ip","value":"198.51.100.4"},"created_on":"2014-01-01T05:20:00.12345Z","modified_on":"2014-01-01T05:20:00.12345Z","scope":{"id":"7c5dae5552338874e5053f2534d2767a","email":"[email protected]","type":"user"}}'
Any hint?
Thank you!