I want to control a Cloudflare Zero Trust Gateway DNS rule via the Cloudflare API. I am using the “Update Zero Trust Gateway Rule” documented here, but it’s not working as expected.
According to the documentation, the request body
has two required parameters, action
and name
. However, when I include both of those parameters, even in a basic request with a body
that looks like this:
{
"action": "allow",
"name": "My Rule Name"
}
…my request is getting rejected with the following response:
{
"result": null,
"success": false,
"errors": [
{
"message": "must include at least one condition or expression"
}
],
"messages": []
}
What “conditions” or “expressions” is it referring to in this context?