# Expression Template # Fallthrough ## Generate fallthrough WAF expression template from a set of API hosts `client.APIGateway.ExpressionTemplate.Fallthrough.New(ctx, params) (*ExpressionTemplateFallthroughNewResponse, error)` **post** `/zones/{zone_id}/api_gateway/expression-template/fallthrough` Creates an expression template fallthrough rule for API Shield. Used for configuring default behavior when no other expression templates match. ### Parameters - `params ExpressionTemplateFallthroughNewParams` - `ZoneID param.Field[string]` Path param: Identifier. - `Hosts param.Field[[]string]` Body param: List of hosts to be targeted in the expression ### Returns - `type ExpressionTemplateFallthroughNewResponse struct{…}` - `Expression string` WAF Expression for fallthrough - `Title string` Title for the expression ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/api_gateway" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) fallthrough_, err := client.APIGateway.ExpressionTemplate.Fallthrough.New(context.TODO(), api_gateway.ExpressionTemplateFallthroughNewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Hosts: cloudflare.F([]string{"{zone}.domain1.tld", "domain2.tld"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", fallthrough_.Expression) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "expression": "(cf.api_gateway.fallthrough_detected)", "title": "Fallthrough Expression for [zone.domain.tld]" }, "success": true } ```