Create a Proxy Endpoint Mapping Rule
- In SnapLogic Manager, go to API Management > API Manager > APIs & Proxies.
- Search for the proxy and click the proxy's name.
- Go to the Proxy Endpoints tab.
- Search for the endpoint and click the endpoint's name.
- Go to the Mapping tab.
- Click the add icon (
).
- In Create Proxy Mapping Rule, fill in the rule settings.
Field Description Rule Name A name that is unique among the rules of the endpoint. Target URL The URL to which the request is redirected if the condition is met. This can be the URL to the third-party API that the Proxy refers to. Condition The condition that must be met for this rule to apply. The condition can be:- Expression.
The Target URL is used if the specified expression resolves to
true
. - Header. The Target URL is used if the specified key-value pair appears in the header of the request.
- HTTP Method. The Target URL is used if the HTTP method of the request is one of the specified values.
- Path.
The Target URL is used if the specified path matches the tail of the URL leading to the Proxy endpoint.
For example, if Value is set to
any/path/you/want
then the API consumer must send their request tohttps://elastic.snaplogic.com/myproxy/myendpoint/any/path/you/want
to trigger this rule.The comparison is a case-sensitive exact match.
- Query Parameter. The Target URL is used if the specified key-value pair appears in the query string of the request.
Authentication The authentication scheme required to use the API at the Target URL. The authentication scheme can be:- Basic Auth.
Enter the User Name and Password of the Basic Authentication account to access the API in the Target URL.
For example, if the Target URL points to Google Sheets, enter the credentials of the Google account to use.
- Key-Based. Enter the Key required to access the API in the Target URL and indicate where the Key is expected:
- Custom Authorization Header. The request must include the key in the specified authorization header.
- Custom Header. The request must include the key in the specified custom header.
- Query Parameter. The request must include the key in the specified query parameter.
- None. No authentication is required.
- Expression.
The Target URL is used if the specified expression resolves to
- Click Create and Add Another or Create.
Tip: You can change the priorities of the rules in the list.S