HTTP Retry Policy

Use this policy to set up retry logic for requests made to your Proxy and Proxy endpoints.

Important: This page describes Classic APIM. For APIM 3.0, refer to API Management 3.0.
Defines retry logic for external requests to improve the experience of external endpoint consumers. External endpoints can reject requests when resources are unavailable. This policy retries the request on behalf of the client.

Policy execution order

All other request policies run before this policy applies.

Known Issue

  • Both the HTTP Cache Response and HTTP Retry policies don't evaluate expressions. The policy always runs regardless of input in the expression fields in the policy dialog.

  • When you use the HTTP Retry policy with the Basic Auth policy, the request fails with an error message.

    Workaround: Delete the HTTP Retry policy.

Field/Field set Description
When this policy should be applied An expression that defines one or more conditions that must be true for the policy to execute.

Default value: N/A

Example: The expression request.method == "POST" causes the policy to execute only on POST requests.

Retry Condition Select one of the following retry conditions:
  • All Errors: Retries on all types of errors.
  • Connection Errors and Auth Errors (401/403/407/511): Retries on connectivity and authorization errors.
  • Connection Errors and Client Errors (4xx): Retries on connection errors on the client side.
  • Connection Errors and Server Errors (5xx): Retries on connection errors on the server side.
Default value: All Errors
Maximum Attempts Enter an integer value for the maximum number of retry attempts.

Maximum value 10.

Default value: 3
Retry Interval (seconds) Enter an integer value for the number of seconds between retry attempts. Maximum value 60. Default value: 3
Retry Timeout (seconds) Enter the number of seconds for the retry timeout.

Maximum value 300 (5 minutes)

Example: 30

Default value: 30
Automatically Retry on 429 Responses Select to continue retries for the HTTP response code 429.

Default status: Deselected

Use Retry-After Header for 429 Responses Select to continue retries when the Retry-After response header is present for the HTTP response code 429.

Default status: Deselected

Description

Required.

Default value: Requests that meet the specified criteria are being retried on failure.