Skip to main content

WebhookCollectionClientAsync

Async sub-client for manipulating webhooks.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, root_client, http_client, resource_id, resource_path, params): None
  • Initialize a new instance.


    Parameters

    • keyword-onlybase_url: str

      Base URL of the API server.

    • keyword-onlyroot_client: ApifyClientAsync

      The ApifyClientAsync instance under which this resource client exists.

    • keyword-onlyhttp_client: HTTPClientAsync

      The HTTPClientAsync instance to be used in this client.

    • optionalkeyword-onlyresource_id: str | None = None

      ID of the manipulated resource, in case of a single-resource client.

    • keyword-onlyresource_path: str

      Path to the resource's endpoint on the API server.

    • optionalkeyword-onlyparams: dict | None = None

      Parameters to include in all requests from this client.

    Returns None

create

  • async create(*, event_types, request_url, payload_template, headers_template, actor_id, actor_task_id, actor_run_id, ignore_ssl_errors, do_not_retry, idempotency_key, is_ad_hoc): dict
  • Create a new webhook.

    You have to specify exactly one out of actor_id, actor_task_id or actor_run_id.

    https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/create-webhook


    Parameters

    • keyword-onlyevent_types: list[WebhookEventType]

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

    • keyword-onlyrequest_url: str

      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-onlyidempotency_key: str | None = None

      A unique identifier of a webhook. You can use it to ensure that you won't create the same webhook multiple times.

    • 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 dict

list

  • async list(*, limit, offset, desc): ListPage[dict]

Properties

http_client

params

params: dict

resource_id

resource_id: str | None

root_client

url

url: str