Skip to main content
Version: Next

WebhookDispatchCollectionClient

Client for managing the collection of webhook dispatches.

Webhook dispatches represent individual notifications sent by a webhook. This client provides methods to list all dispatches for a specific webhook.

@example
const client = new ApifyClient({ token: 'my-token' });
const webhookClient = client.webhook('my-webhook-id');

// List all dispatches for this webhook
const dispatchesClient = webhookClient.dispatches();
const { items } = await dispatchesClient.list();
@see

Hierarchy

  • ResourceCollectionClient
    • WebhookDispatchCollectionClient

Index

Properties

inheritedapifyClient

apifyClient: ApifyClient

inheritedbaseUrl

baseUrl: string

inheritedhttpClient

httpClient: HttpClient

optionalinheritedid

id?: string

optionalinheritedparams

params?: Record<string, unknown>

inheritedpublicBaseUrl

publicBaseUrl: string

inheritedresourcePath

resourcePath: string

optionalinheritedsafeId

safeId?: string

inheritedurl

url: string

Methods

list

  • Lists all webhook dispatches.

    Awaiting the return value (as you would with a Promise) will result in a single API call. The amount of fetched items in a single API call is limited.

    const paginatedList = await client.list(options);

    Asynchronous iteration is also supported. This will fetch additional pages if needed until all items are retrieved.

    for await (const singleItem of client.list(options)) {...}
    @see

    Parameters

    Returns PaginatedIterator<WebhookDispatch>

    A paginated iterator of webhook dispatches.