

You will see the following configuration.

Now observe the XML configuration for the ProxyEndpoint. The new flow, called Flow-1, now appears in the Navigator menu.
EDGE PIPELINE APP HOW TO
(Learn how to construct conditional statements in Flow variables and In theįollowing example, you add a simple condition that evaluates the HTTP of the request message forĪ GET verb (as opposed to PUT, POST, etc.) on any URI after the base path. The New Conditional Flow form lets you name the flow and configure a condition. To add a conditional flow, select the Develop tab in the API proxy builder.Ĭlick the + icon in the desired endpoint. In this brief example, you set up a flow that executes only when the request message is an You can then attachĭifferent policies to the conditional flow for each resource. Which contains the suffix portion of the URL used to access the API proxy. In this example, you reference the proxy.pathsuffix flow variable, (proxy.pathsuffix MatchesPath "/forecasts") (proxy.pathsuffix MatchesPath "/reports") In an API proxy, you can define a conditional flow that corresponds to a specific Includes one of those resources in the URL, the condition evaluates to true and the logicĪttached to the conditional flow is executed.Īpp developers then access your resources by making requests to a URL in the form: Service backend provides weather reports and weather forecasts, your API might define two That identifies some entity that developers can access by calling your API. RESTful services are collections of API resources. Edge defines many state variables that you can With an API transaction processed by Edge. A flow variable is named references that hold state information associated Notice that the condition references the request.verb flow That means you can have oneĬonditional flow executed as part of each of the:įor example, the following ProxyEndpoint definition shows a conditional flow that is executedīy the ProxyEndpoint on any HTTP GET request to the API proxy: Segment-the first flow whose condition evaluates to true. Policies in a conditional flow are executed only if the flow's condition evaluates to true.ĭuring the processing of a request and response, only one conditional flow is executed per About conditional flowsĪny policies attached to the PreFlow or PostFlow are always executed. Slash), quota is enforced on that API call. issue/** (/issue/ with anything in the URI after the last forward In this configuration, if a GET request comes in on the API proxy with a URI (proxy.pathsuffix MatchesPath "/issue/**") and (request.verb = "GET")
EDGE PIPELINE APP CODE
Generated in the code view of the proxy editor: For example, if youĪttach the policy to the learn flow in the request, the following XML is Quota policy only for requests made to that flow URI and verb combination. Selected, click the + Step icon in the request or response diagram to add aīy attaching the policy to the selected flow, you are configuring the API proxy to enforce the Once you have created a conditional flow, it is available for policy attachment.
