I know Argo Tiered Cache is new in terms of being able to enable it for free on all plans, I have not been able to find a way to enable via API, is this available yet and just not documented?
I’m going to say that it is not currently available through the API as it is not documented and Cloudflare is pretty good with their API documentation.
See below
Probably this. I know I’ve scripted tiered cache in my setup, but I might have sniffed the API call using developer tools.
As far as I know, the Dashboard is just a UI to the API, and everything you see in the Dashboard is available via API.
Toggling the option in dashboard creates a PATCH request to https://dash.cloudflare.com/api/v4/zones/<zone>/argo/tiered_caching
. Trying to switch to https://api.cloudflare.com/client/v4/zones/<zone>/argo/tiered_caching
returns a 403 error with a token that has full edit access to my zone:
{
"success": false,
"errors": [
{
"code": 9109,
"message": "Unauthorized to access requested resource"
}
],
"messages": [],
"result": null
}
This lead me to believe that it is not currently available
Works for me:
curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/:zoneid/argo/tiered_caching" \
-H "Content-Type: application/json" \
--data '{"value":"on"}'
{
"result": {
"id": "tiered_caching",
"value": "on",
"modified_on": "2021-11-11T21:56:46.584181Z",
"editable": true
},
"success": true,
"errors": [],
"messages": []
}
Yup. I was wrong it is an undocumented API call. You need an API token with Zone:Zone Settings:Edit
Appreciate it
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.