Edit the Configuration Template
The downloaded folder structure contains a series of XML files and directories.
Configuring Proxy Settings
Proxy Settings like API endpoint and basepath are added to the default.xml file within the Proxy folder.
Points to Note
-
Basepath of the APIs should be provided in the element. Basepath must be unique for each API Proxy.
-
The element contains the endpoint that will be displayed to the consumer for consumption.
-
The element refers to xml file provided in the Targets folder.
-
If you add custom policies to the Policies folder, the name of the policy files must be included in the element.
Without Throttling Policies
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ProxyEndpoint name="default"> <PreFlow name="PreFlow"> <Request> <Step> <Name>FlowCallout-Authorizer</Name> <Condition>request.verb != "OPTIONS"</Condition> </Step> </Request> <Response/> </PreFlow> <Flows/> <PostFlow name="PostFlow"> <Request/> <Response/> </PostFlow> <HTTPProxyConnection> <BasePath>ProxyLoadTest1</BasePath> <VirtualHost>secure</VirtualHost> </HTTPProxyConnection> <RouteRule name="default"> <TargetEndpoint>default</TargetEndpoint> </RouteRule></ProxyEndpoint>With Throttling Policies
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ProxyEndpoint name="default"> <PreFlow name="PreFlow"> <Request> <Step> <Name>fc-authorizer</Name> </Step> <Step> <Name>SpikeArrest-ApiSpike</Name> </Step> <Step> <Name>Quota-ApiQuota</Name> </Step> </Request> <Response/> </PreFlow> <Flows/> <PostFlow name="PostFlow"> <Request/> <Response/> </PostFlow> <HTTPProxyConnection> <BasePath>v1/Sprint2DemoApi</BasePath> <VirtualHost>trimblecloud</VirtualHost> </HTTPProxyConnection> <RouteRule name="default"> <TargetEndpoint>default</TargetEndpoint> </RouteRule></ProxyEndpoint>Configuring Target Settings
Target Settings like API the Backend end URL of the service must be defined in the default.xml file within the targets folder.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><TargetEndpoint name="default"> <PreFlow name="PreFlow"> <Request/> <Response/> </PreFlow> <Flows/> <PostFlow name="PostFlow"> <Request/> <Response/> </PostFlow> <HTTPTargetConnection> <URL>https://petstore-demo-endpoint.execute-api.com/petstore</URL> </HTTPTargetConnection></TargetEndpoint>Configuring Policies
For more details on configuring policies like quota and spike arrest, see Configure Custom Policies.