Hi Team,
I’m trying to enable Cloudflare log retention using the method mentioned below:
Check whether log retention is turned on:
curl -s -H “X-Auth-Email: ” -H “X-Auth-Key: <API_KEY>” GET “hxxps://api.Cloudflare.com/client/v4/zones/<ZONE_ID>/logs/control/retention/flag” | jq .
Turn on log retention:
curl -s -H “X-Auth-Email: ” -H “X-Auth-Key: <API_KEY>” POST “hxxps://api.Cloudflare.com/client/v4/zones/<ZONE_ID>/logs/control/retention/flag” -d’{“flag”:true}’ | jq .
I’m getting a 10000 authentication error while trying this. While checking online, read that this may be related to the permissions of the user(X-Auth-Email) included in the GET/POST requests. Then I tried with a user having super administrator permissions in my Cloudflare account., but still getting the same error. What could be the issue here? Thanks in advance.
Best Regards,
Anand