## Get an AI Gateway Dynamic Route Version. `client.AIGateway.DynamicRouting.GetVersion(ctx, gatewayID, id, versionID, query) (*DynamicRoutingGetVersionResponse, error)` **get** `/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions/{version_id}` Get an AI Gateway Dynamic Route Version. ### Parameters - `gatewayID string` - `id string` - `versionID string` - `query DynamicRoutingGetVersionParams` - `AccountID param.Field[string]` ### Returns - `type DynamicRoutingGetVersionResponse struct{…}` - `ID string` - `Active DynamicRoutingGetVersionResponseActive` - `const DynamicRoutingGetVersionResponseActiveTrue DynamicRoutingGetVersionResponseActive = "true"` - `const DynamicRoutingGetVersionResponseActiveFalse DynamicRoutingGetVersionResponseActive = "false"` - `CreatedAt string` - `Data string` - `Elements []DynamicRoutingGetVersionResponseElement` - `type DynamicRoutingGetVersionResponseElementsObject struct{…}` - `ID string` - `Outputs DynamicRoutingGetVersionResponseElementsObjectOutputs` - `Next DynamicRoutingGetVersionResponseElementsObjectOutputsNext` - `ElementID string` - `Type DynamicRoutingGetVersionResponseElementsObjectType` - `const DynamicRoutingGetVersionResponseElementsObjectTypeStart DynamicRoutingGetVersionResponseElementsObjectType = "start"` - `type DynamicRoutingGetVersionResponseElementsObject struct{…}` - `ID string` - `Outputs DynamicRoutingGetVersionResponseElementsObjectOutputs` - `False DynamicRoutingGetVersionResponseElementsObjectOutputsFalse` - `ElementID string` - `True DynamicRoutingGetVersionResponseElementsObjectOutputsTrue` - `ElementID string` - `Properties DynamicRoutingGetVersionResponseElementsObjectProperties` - `Conditions unknown` - `Type DynamicRoutingGetVersionResponseElementsObjectType` - `const DynamicRoutingGetVersionResponseElementsObjectTypeConditional DynamicRoutingGetVersionResponseElementsObjectType = "conditional"` - `type DynamicRoutingGetVersionResponseElementsObject struct{…}` - `ID string` - `Outputs map[string, DynamicRoutingGetVersionResponseElementsObjectOutput]` - `ElementID string` - `Type DynamicRoutingGetVersionResponseElementsObjectType` - `const DynamicRoutingGetVersionResponseElementsObjectTypePercentage DynamicRoutingGetVersionResponseElementsObjectType = "percentage"` - `type DynamicRoutingGetVersionResponseElementsObject struct{…}` - `ID string` - `Outputs DynamicRoutingGetVersionResponseElementsObjectOutputs` - `Fallback DynamicRoutingGetVersionResponseElementsObjectOutputsFallback` - `ElementID string` - `Success DynamicRoutingGetVersionResponseElementsObjectOutputsSuccess` - `ElementID string` - `Properties DynamicRoutingGetVersionResponseElementsObjectProperties` - `Key string` - `Limit float64` - `LimitType DynamicRoutingGetVersionResponseElementsObjectPropertiesLimitType` - `const DynamicRoutingGetVersionResponseElementsObjectPropertiesLimitTypeCount DynamicRoutingGetVersionResponseElementsObjectPropertiesLimitType = "count"` - `const DynamicRoutingGetVersionResponseElementsObjectPropertiesLimitTypeCost DynamicRoutingGetVersionResponseElementsObjectPropertiesLimitType = "cost"` - `Window float64` - `Type DynamicRoutingGetVersionResponseElementsObjectType` - `const DynamicRoutingGetVersionResponseElementsObjectTypeRate DynamicRoutingGetVersionResponseElementsObjectType = "rate"` - `type DynamicRoutingGetVersionResponseElementsObject struct{…}` - `ID string` - `Outputs DynamicRoutingGetVersionResponseElementsObjectOutputs` - `Fallback DynamicRoutingGetVersionResponseElementsObjectOutputsFallback` - `ElementID string` - `Success DynamicRoutingGetVersionResponseElementsObjectOutputsSuccess` - `ElementID string` - `Properties DynamicRoutingGetVersionResponseElementsObjectProperties` - `Model string` - `Provider string` - `Retries float64` - `Timeout float64` - `Type DynamicRoutingGetVersionResponseElementsObjectType` - `const DynamicRoutingGetVersionResponseElementsObjectTypeModel DynamicRoutingGetVersionResponseElementsObjectType = "model"` - `type DynamicRoutingGetVersionResponseElementsObject struct{…}` - `ID string` - `Outputs map[string, DynamicRoutingGetVersionResponseElementsObjectOutput]` - `ElementID string` - `Type DynamicRoutingGetVersionResponseElementsObjectType` - `const DynamicRoutingGetVersionResponseElementsObjectTypeEnd DynamicRoutingGetVersionResponseElementsObjectType = "end"` - `GatewayID string` - `ModifiedAt Time` - `Name string` - `VersionID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/ai_gateway" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.AIGateway.DynamicRouting.GetVersion( context.TODO(), "54442216", "54442216", "54442216", ai_gateway.DynamicRoutingGetVersionParams{ AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "result": { "id": "id", "active": "true", "created_at": "created_at", "data": "data", "elements": [ { "id": "id", "outputs": { "next": { "elementId": "elementId" } }, "type": "start" } ], "gateway_id": "gateway_id", "modified_at": "2019-12-27T18:11:19.117Z", "name": "name", "version_id": "version_id" }, "success": true } ```