Skip to content
Start here

Delete a WAF override

Deprecated
client.Firewall.WAF.Overrides.Delete(ctx, overridesID, body) (*WAFOverrideDeleteResponse, error)
DELETE/zones/{zone_id}/firewall/waf/overrides/{overrides_id}

Deletes an existing URI-based WAF override.

Note: Applies only to the previous version of WAF managed rules.

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)
Zone Settings Write
ParametersExpand Collapse
overridesID string

The unique identifier of the WAF override.

maxLength32
body WAFOverrideDeleteParams
ZoneID param.Field[string]

Defines an identifier.

maxLength32
ReturnsExpand Collapse
type WAFOverrideDeleteResponse struct{…}
ID stringOptional

The unique identifier of the WAF override.

maxLength32

Delete a WAF override

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/firewall"
  "github.com/stainless-sdks/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  override, err := client.Firewall.WAF.Overrides.Delete(
    context.TODO(),
    "de677e5818985db1285d0e80225f06e5",
    firewall.WAFOverrideDeleteParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", override.ID)
}
{
  "result": {
    "id": "de677e5818985db1285d0e80225f06e5"
  }
}
Returns Examples
{
  "result": {
    "id": "de677e5818985db1285d0e80225f06e5"
  }
}