Hey,
I’ m trying to add a page rule using Cloudflare API but I cant managed it to work. What I’m trying is basically create a rule that will manage caches by page status code. I’m also sharing json file I use to do this. Can you guys help
{
"targets": [
{
"target": "url",
"constraint": {
"operator": "matches",
"value": "portal.dev.example.com/*"
}
}
],
"actions": [
{
"id": "cache_ttl_by_status",
"value": {
"200": 86400
}
}
],
"priority": 1,
"status": "active"
}
Error I get :
{“success”:false,“errors”:[{“code”:1004,“message”:“Page Rule validation failed: See messages for details.”}],“messages”:[{“code”:1,“message”:".settings[0]: Invalid setting cache_ttl_by_status",“type”:null}],“result”:null}Preformatted text