Skip to content
Start here

Get URL Normalization settings

url_normalization.get(URLNormalizationGetParams**kwargs) -> URLNormalizationGetResponse
GET/zones/{zone_id}/url_normalization

Fetches the current 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 WriteResponse Compression ReadConfig Settings WriteConfig Settings ReadDynamic URL Redirects WriteDynamic URL Redirects ReadCache Settings WriteCache Settings ReadCustom Errors WriteCustom Errors ReadOrigin WriteOrigin ReadManaged headers WriteManaged headers ReadZone Transform Rules WriteZone Transform Rules ReadMass URL Redirects WriteMass URL Redirects ReadMagic Firewall WriteMagic Firewall ReadL4 DDoS Managed Ruleset WriteL4 DDoS Managed Ruleset ReadHTTP DDoS Managed Ruleset WriteHTTP DDoS Managed Ruleset ReadSanitize WriteSanitize ReadTransform Rules WriteTransform Rules ReadSelect Configuration WriteSelect Configuration ReadBot Management WriteBot Management ReadZone WAF WriteZone WAF ReadAccount WAF WriteAccount WAF ReadAccount Rulesets ReadAccount Rulesets WriteLogs WriteLogs ReadLogs WriteLogs Read
ParametersExpand Collapse
zone_id: str

The unique ID of the zone.

ReturnsExpand Collapse
class URLNormalizationGetResponse:

A result.

scope: Literal["incoming", "both", "none"]

The scope of the URL normalization.

One of the following:
"incoming"
"both"
"none"
type: Literal["cloudflare", "rfc3986"]

The type of URL normalization performed by Cloudflare.

One of the following:
"cloudflare"
"rfc3986"

Get URL Normalization settings

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
url_normalization = client.url_normalization.get(
    zone_id="9f1839b6152d298aca64c4e906b6d074",
)
print(url_normalization.scope)
{
  "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
}