Unable to update IP Address of DNS Location in Zero Trust using API in free plan
What is the issue you’re encountering
Unable to update IP Address of DNS Location in Zero Trust using API. Here is how to navigate → Zero Trust → Gateway → DNS Location → Endpoint Protection ->IPv4 addresses
What are the steps to reproduce the issue?
Execute below API
Code 01:
curl -X PUT “https://api.cloudflare.com/client/v4/accounts/<account-id>/gateway/locations/<location-id>” -H “Authorization: Bearer <auth-token>” -H “Content-Type: application/json” --data ‘{“name”:“Home”,“networks”:[“106.51.217.45/32”],“client_default”:“true”}’
Code-02
curl -X PUT “https://api.cloudflare.com/client/v4/accounts/<account-id>/gateway/locations/<location-id>” -H “X-Auth-Email: <email-id>” -H “X-Auth-Key: <global-auth-key> ” -H “Content-Type: application/json” --data ‘{“name”:“Home”,“networks”:[“106.51.217.45”],“client_default”:“true”}’
What is the error number? 1212
What is the error message? Invalid CIDR
1 Reply
I feel the error message is self explanatory. A single ip address is not a CIDR range