getWebhookByIdDeliveriesWithHttpInfo method

Future<Response> getWebhookByIdDeliveriesWithHttpInfo(
  1. String id, {
  2. int? limit,
  3. String? status,
})

Returns one endpoint's per-attempt delivery log, newest first — the record of what was sent, what the subscriber answered, and how long it took.

Returns one endpoint's per-attempt delivery log, newest first — the record of what was sent, what the subscriber answered, and how long it took. One event that retried three times appears as three rows sharing a delivery id. It is org-scoped exactly like every other route here: the endpoint lookup only ever finds THIS org's endpoint, so another org's id is a 404 and never a window onto its logs.

Note: This method returns the HTTP Response.

Parameters:

  • String id (required):

  • int limit: Limit caps how many attempts come back: default 50, maximum 200. A value that is not a positive integer reads as the default.

  • String status: Status narrows the log to one outcome: "ok", "retrying" or "failed". Empty returns every attempt.

Implementation

Future<Response> getWebhookByIdDeliveriesWithHttpInfo(String id, { int? limit, String? status, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/webhook/{id}/deliveries'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (status != null) {
    queryParams.addAll(_queryParams('', 'status', status));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}