...
Use this policy to manage HTTP redirect behavior redirection for API requests. When an HTTP response status is returned with a 3xx HTTP status code, the client side handles the redirect as defined in the policy.
...
Transformation of request headers works in the following policy sequence for both APIs and Proxies:
Authorize By Role ➡️ Authentication Policy ➡️ Traffic Policy ➡️ HTTP Redirect
Expression Enabled Fields in API Policies
All expression-enabled fields take expressions from the SnapLogic Expression Language and the API Policy Manager functions.
...
For this article, the client side is called the user-agent. For APIM, the user-agent might be a web browser, HTTP client, or curl cURL application. Since the user-agent is responsible for handling the response, the policy assumes that the user-agent (and not the server) performs the redirects; this includes processing follow-on HTTP methods, payload content, and redirect addresses. The server (Snaplex) is only responsible for setting the Response status type, status code, location header, and, where defined, the message content.
...
Limitations
Only message bodies for content types for application/json and application/xml content types are validated by the UI.
Settings
Parameter Name | Description | Default Value | ||
---|---|---|---|---|
Label | Required. The name for the API policy. | HTTP Redirect | ||
When this policy should be applied | An expression enabled field that determines the condition to be fulfilled for the API policy to execute. For example, if the value in this field is | N/A | ||
HTTP Redirect Properties | The controls for HTTP redirection. Click to add redirect properties to the policy. If none are entered, the policy uses the original message body originating from the client. To remove the redirect property, click - and click Validate and Save. | N/A | ||
Use User-Agent Content | Select this checkbox to redirect an HTTP user-agent with the user-agent’s original request contents, such as the content type, message body, and query parameters. Note: Deselecting the policy nulifies the conditions set by the policy ownerthis checkbox does not remove the redirect property. | N/A | ||
Condition* | Enter an expression to prompt an HTTP redirect when it evaluates to | N/A | ||
Response Status* | Select one of the following:
| N/A | ||
Redirect URL | Enter the URL for the redirection. Alternatively, click Click to specify a function. Note: Some functions in the dropdown list might not be applicable and therefore will not work. Alternatively, you can disable the Expression field to enter the URL for the redirection. Example: | N/A | ||
Content-Type | Select Click to specify a function. For expressions containing a semi-colon ( You can add other content types recognized by IANA, such as: Note: Some functions in the dropdown list might not be applicable and therefore will not work. Alternatively, select the content type from the dropdown:
| N/A | ||
Message Body | Enter a message for the API caller. Click to specify a function. Some functions in the dropdown list might not be applicable and therefore will not work. Example:
| N/A | ||
Status | Specifies whether the API policy is enabled or disabled. | Enabled |
...