Last active
December 12, 2015 07:08
-
-
Save ApigeeSamples/4734267 to your computer and use it in GitHub Desktop.
RouteRule-condition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<ProxyEndpoint name="default"> | |
<Description>Default Proxy to create flows on an API</Description> | |
<FaultRules/> | |
<Flows> | |
<Flow name="forecast weather"> | |
<Description>Weather forecast endpoint</Description> | |
<Request/> | |
<Response/> | |
<Condition>(proxy.pathsuffix MatchesPath "forecastrss") and (request.verb = "GET")</Condition> | |
</Flow> | |
</Flows> | |
<PreFlow name="PreFlow"> | |
<Request> | |
<Step> | |
<FaultRules/> | |
<Name>OAuthV20-1360270147385</Name> | |
</Step> | |
</Request> | |
<Response/> | |
</PreFlow> | |
<HTTPProxyConnection> | |
<BasePath>/v0/weather1</BasePath> | |
<Properties/> | |
<VirtualHost>default</VirtualHost> | |
</HTTPProxyConnection> | |
<RouteRule name="default"> | |
<TargetEndpoint>default</TargetEndpoint> | |
</RouteRule> | |
<!--this RouteRule sends traffic to a different endpoint depending on the day of the week--> | |
<RouteRule name="default"> | |
<Condition>system.time.dayofweek = 3</Condition> | |
<TargetEndpoint>XmlTargetEndpoint</TargetEndpoint> | |
</RouteRule> | |
</ProxyEndpoint> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment