Skip to main content

WebhookClient

Sub-client for managing a specific webhook.

Provides methods to manage a specific webhook, e.g. get, update, or delete it. Obtain an instance via an appropriate method on the ApifyClient class.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClient

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistry

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

delete

  • delete(): None

dispatches

get

test

update

  • update(*, event_types, request_url, payload_template, headers_template, actor_id, actor_task_id, actor_run_id, ignore_ssl_errors, do_not_retry, is_ad_hoc): Webhook

  • Parameters

    • optionalkeyword-onlyevent_types: list[WebhookEventType] | None = None

      List of event types that should trigger the webhook. At least one is required.

    • optionalkeyword-onlyrequest_url: str | None = None

      URL that will be invoked once the webhook is triggered.

    • optionalkeyword-onlypayload_template: str | None = None

      Specification of the payload that will be sent to request_url.

    • optionalkeyword-onlyheaders_template: str | None = None

      Headers that will be sent to the request_url.

    • optionalkeyword-onlyactor_id: str | None = None

      Id of the Actor whose runs should trigger the webhook.

    • optionalkeyword-onlyactor_task_id: str | None = None

      Id of the Actor task whose runs should trigger the webhook.

    • optionalkeyword-onlyactor_run_id: str | None = None

      Id of the Actor run which should trigger the webhook.

    • optionalkeyword-onlyignore_ssl_errors: bool | None = None

      Whether the webhook should ignore SSL errors returned by request_url.

    • optionalkeyword-onlydo_not_retry: bool | None = None

      Whether the webhook should retry sending the payload to request_url upon failure.

    • optionalkeyword-onlyis_ad_hoc: bool | None = None

      Set to True if you want the webhook to be triggered only the first time the condition is fulfilled. Only applicable when actor_run_id is filled.

    Returns Webhook

    The updated webhook.

Properties

resource_id

resource_id: str | None

Get the resource ID.