The default rule

The JSON object for the API's Rules interface opens up with a top-level rules element that specifies a default rule object. The default rule includes features that are mandatory for the product you're implementing. The top-level rule in your configuration must have its name set to defualt.

{
    "rules": {
        "name": "default",
        "options": {
            "is_secure": false
        }
    }
}

As discussed in the Errors section, responses may also include top-level warnings, errors, and other contextual members as the additional layer of data. In the interest of clarity, extraneous data members are removed from the JSON examples in this section.

The only nominally mandatory member when saving a rule is its name, so you don't have to pass in the options object, as in this example that displays default behavior. The Create a new edge hostname operation shows how to specify hostnames as secure.

Secure property requirements

When the property's is_secure is set to true, it means you want to apply a shared certificate for all hostnames, possibly supplementing hostname-specific certificates. With is_secure enabled within the rule tree, you may receive warnings about any non-secure hostnames to which the rule applies. Note that some behaviors may only be available within the rule when is_secure is true.