getFailedWebhooks method

Future<FailedWebhooks> getFailedWebhooks({
  1. int? maxResults,
  2. int? after,
})

Returns webhooks that have recently failed to be delivered to the requesting app after the maximum number of retries.

After 72 hours the failure may no longer be returned by this operation.

The oldest failure is returned first.

This method uses a cursor-based pagination. To request the next page use the failure time of the last webhook on the list as the failedAfter value or use the URL provided in next.

Permissions required: Only Connect apps can use this operation.

Implementation

Future<FailedWebhooks> getFailedWebhooks(
    {int? maxResults, int? after}) async {
  return FailedWebhooks.fromJson(await _client.send(
    'get',
    'rest/api/3/webhook/failed',
    queryParameters: {
      if (maxResults != null) 'maxResults': '$maxResults',
      if (after != null) 'after': '$after',
    },
  ));
}