An Async API Connector will re-try requests based on an API response at a scheduled time. This is useful if you require a high degree of reliability without immediate delivery.
To enable async requests use the type async-private-api-connector
. This will operate the same as a private api connector but will retry the request if it fails. The retry logic is based on the
configuration in the Async
object.
{
"Async": {
"MaxAttempts": 3, // optional - default 3, The amount of times to attempt this request
"RetryDelay": 5, // optional - default 5, The amount of time in minutes to wait before retrying the request
"SuccessCodes": [200] // optional - default [200], The response codes that are considered successful
},
"Method": "POST",
"Endpoint": "https://myApi.net",
"Headers": {},
"Alias": "myApi",
"Organization": "acme",
"Updated": 1714567399195,
"RequestMapping": {
"bodyMapping1": {
"type": "requestBody",
"requestBodyPath": "$.Summary",
"inputPath": "$.summary"
}
},
"ResponseMapping": {},
"Type": "async-private-api-connector",
"Body": {},
}
The above example contains the system defaults.
MaxAttempts
- Is set to 3, this means that the request will be attempted 3 times.
RetryDelay
has passed.RetryDelay
has passed.RetryDelay
- Is set to 5, this means that the request will be retried 5 minutes after the previous request.SuccessCodes
- Is set to [200], this means that the request will be considered successful and will not retry if the response code is 200.Currently, the following connector types are supported for async requests: