Default BehaviorsUpdate HTTP Push Default Behavior

Update HTTP Push Default Behavior

Saves changes to the zone's default behavior entry. The payload structure is identical to a rule update (RulePayload) but the name and rule fields are effectively ignored — only options is applied. behaviorId is the id from the behaviors array returned by GET rules.

curl -X POST "https://api.5centscdn.com/v2/zones/http/push/12345/rules/behavior/1" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "default",
  "rule": "/",
  "options": {
    "edge_cache_settings": {
      "enabled": null,
      "control": "default",
      "default": "345600s",
      "value": "345600s",
      "revalidate": null,
      "custom": {
        "default": "",
        "value": ""
      },
      "custom_values": {
        "codes": [],
        "value": []
      }
    },
    "midgress_cache_settings": {
      "enabled": null,
      "control": "default",
      "default": "345600s",
      "value": "345600s",
      "revalidate": null,
      "custom": {
        "default": "",
        "value": ""
      },
      "custom_values": {
        "codes": [],
        "value": []
      }
    },
    "browser_cache_settings": {
      "enabled": null,
      "control": "default",
      "value": "345600s",
      "custom": {
        "value": ""
      }
    },
    "ignore_cookie": {
      "enabled": null
    },
    "ignoreQueryString": {
      "enabled": null,
      "control": null,
      "value": null
    },
    "query_params_blacklist": {
      "enabled": null,
      "value": null
    },
    "query_params_whitelist": {
      "enabled": null,
      "value": null
    },
    "country_acl": {
      "enabled": null,
      "policy_type": "allow",
      "excepted_values": [],
      "ip_whitelists": []
    },
    "ip_address_acl": {
      "enabled": null,
      "policy_type": "allow",
      "excepted_values": [],
      "ip_whitelists": []
    },
    "user_agent_acl": {
      "enabled": null,
      "policy_type": "allow",
      "excepted_values": [],
      "ip_whitelists": [],
      "casesensitive": false
    },
    "referrer_acl": {
      "enabled": null,
      "policy_type": "allow",
      "noreferer": false,
      "excepted_values": [],
      "ip_whitelists": []
    },
    "secure_key": {
      "enabled": null,
      "policy_type": 0,
      "session": 0,
      "key": "",
      "ip_whitelists": [],
      "type": false
    },
    "gzipOn": {
      "enabled": null
    },
    "fetch_compressed": {
      "enabled": null
    },
    "brotli_compression": {
      "enabled": null,
      "value": ""
    },
    "slice": {
      "enabled": null
    },
    "limit_bandwidth": {
      "enabled": null,
      "limit_type": "static",
      "speed": 12000,
      "buffer": 1024
    },
    "disposition": {
      "enabled": null,
      "value": 0
    },
    "limit_request": {
      "enabled": null,
      "rate": 9,
      "burst": 98,
      "delay": 96,
      "ip_whitelists": []
    },
    "rewrite": {
      "enabled": null,
      "body": "",
      "flag": "break"
    },
    "host_redirect": {
      "enabled": null,
      "to": "",
      "value": []
    },
    "redirect_http_to_https": {
      "enabled": null
    },
    "allowedHttpMethods": {
      "enabled": null,
      "value": null
    },
    "follow_origin_redirect": {
      "enabled": null,
      "codes": []
    },
    "hsts": {
      "enabled": null,
      "referrerPolicy": "no-referrer",
      "includeSubDomains": true,
      "preload": true
    },
    "xff": {
      "enabled": null
    },
    "sni": {
      "enabled": null,
      "sni_type": "dynamic",
      "custom_hostname": ""
    },
    "tls_versions": {
      "enabled": null,
      "value": []
    },
    "image_stack": {
      "enabled": null,
      "quality": "Disabled",
      "webp": "Disabled",
      "avif": "Disabled",
      "png_loseless": "true"
    },
    "asset_stack": {
      "enabled": null,
      "combine_css": false,
      "MaxCombinedCssBytes": -1,
      "flatten_css_imports": false,
      "CssFlattenMaxBytes": null,
      "inline_css": false,
      "CssInlineMaxBytes": null,
      "outline_css": false,
      "CssOutlineMinBytes": null,
      "rewrite_css": false,
      "fallback_rewrite_css_urls": false,
      "combine_javascript": false,
      "MaxCombinedJsBytes": null,
      "defer_javascript": false,
      "inline_javascript": false,
      "JsInlineMaxBytes": null,
      "rewrite_javascript": false,
      "outline_javascript": false,
      "JsOutlineMinBytes": null,
      "collapse_whitespace": false,
      "remove_comments": false,
      "remove_quotes": false,
      "CombineAcrossPaths": false
    },
    "cms": {
      "enabled": null,
      "value": []
    },
    "force_return": {
      "enabled": null,
      "code": 200,
      "body": ""
    },
    "stale": {
      "enabled": null,
      "value": ""
    },
    "staticHeaders": {
      "enabled": null,
      "keys": [],
      "values": []
    },
    "staticRequestHeaders": {
      "enabled": null,
      "keys": [],
      "values": []
    },
    "response_headers_hiding_policy": {
      "enabled": null,
      "mode": "hide",
      "expected": {
        "hide": [],
        "show": []
      }
    },
    "hostHeader": {
      "enabled": null,
      "control": "forward",
      "custom": ""
    },
    "forward_host_header": {
      "enabled": null
    },
    "honor_vary": {
      "enabled": null
    },
    "cors": {
      "enabled": null,
      "control": "*",
      "always": false,
      "value": "*",
      "custom": ""
    }
  }
}'
{
  "result": "success",
  "message": "Zone Behavior Updated. Please wait till the rules validation & deployment completes."
}
POST
/zones/http/push/{zoneId}/rules/behavior/{behaviorId}
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

path
zoneIdinteger
Required

Numeric ID of the zone

path
behaviorIdinteger
Required

Numeric identifier of the default behavior record

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

Pre-populated behavior name. Send back as received.

rulestring
Required

Pre-populated behavior rule pattern. Send back as received.

optionsobject
Required

Container for all behavior option groups.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

zoneIdinteger
Required

Numeric ID of the zone

Example:
12345
behaviorIdinteger
Required

Numeric identifier of the default behavior record

Example:
1

Body

application/json
namestring
Required

Pre-populated behavior name. Send back as received.

Example:
default
rulestring
Required

Pre-populated behavior rule pattern. Send back as received.

Example:
/
optionsobject
Required

Container for all behavior option groups.

Responses

resultstring
Required

Status of the API response.

Allowed values:success
messagestring
Required