Update URL Normalization settings | Cloudflare API
Skip to content API Reference URL Normalization Update URL Normalization settings PUT /zones/{zone_id}/url_normalization Updates the URL Normalization settings. Security API Token The preferred authorization scheme for interacting with the Cloudflare API. Create a token . Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY API Email + API Key The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example: X-Auth-Email: user@example.com The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194 Accepted Permissions (at least one required) Response Compression Write Config Settings Write Dynamic URL Redirects Write Cache Settings Write Custom Errors Write Origin Write Managed headers Write Zone Transform Rules Write Mass URL Redirects Write Magic Firewall Write L4 DDoS Managed Ruleset Write HTTP DDoS Managed Ruleset Write Sanitize Write Transform Rules Write Select Configuration Write Bot Management Write Zone WAF Write Account WAF Write Account Rulesets Write Logs Write Logs Write P ath Parameters Expand Collapse zone_id : string The unique ID of the zone.
Body Parameters JSON Expand Collapse scope : "incoming" or "both" or "none" The scope of the URL normalization. One of the following: "incoming" "both" "none" type : "cloudflare" or "rfc3986" The type of URL normalization performed by Cloudflare. One of the following: "cloudflare" "rfc3986" Returns Expand Collapse errors : array of object { message , code , source } A list of error messages. message : string A text description of this message. minLength 1 code : optional number A unique code for this message. source : optional object { pointer } The source of this message. pointer : string A JSON pointer to the field that is the source of the message. minLength 1 messages : array of object { message , code , source } A list of warning messages. message : string A text description of this message. minLength 1 code : optional number A unique code for this message. source : optional object { pointer } The source of this message. pointer : string A JSON pointer to the field that is the source of the message. minLength 1 result : object { scope , type } A result. scope : "incoming" or "both" or "none" The scope of the URL normalization.
One of the following: "incoming" "both" "none" type : "cloudflare" or "rfc3986" The type of URL normalization performed by Cloudflare. One of the following: "cloudflare" "rfc3986" success : true Whether the API call was successful. Update URL Normalization settings curl https://api.cloudflare.com/client/v4/zones/ $ZONE_ID /url_normalization \ -X PUT \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN " \ -d '{ "scope": "incoming", "type": "cloudflare" }' { "errors" : [ { "message" : "something bad happened" , "code" : 10000 , "source" : { "pointer" : "/rules/0/action" } } ], "messages" : [ { "message" : "something bad happened" , "code" : 10000 , "source" : { "pointer" : "/rules/0/action" } } ], "result" : { "scope" : "incoming" , "type" : "cloudflare" }, "success" : true } Returns Examples { "errors" : [ { "message" : "something bad happened" , "code" : 10000 , "source" : { "pointer" : "/rules/0/action" } } ], "messages" : [ { "message" : "something bad happened" , "code" : 10000 , "source" : { "pointer" : "/rules/0/action" } } ], "result" : { "scope" : "incoming" , "type" : "cloudflare" }, "success" : true }