Error while trying to enable Cloudflare Log retention

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

Hi Anand,

Apologies for the issues you’re facing. Log Retention is an Enterprise feature. I would recommend if you are an enterprise customer to raise a support ticket with us, and we can take a look at why this is working for you.

If you are not an Enterprise customer currently and interested in this feature, I would recommend reaching out to our Sales team, and they can discuss your requirements and advise pricing.

regards,
Damian

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