WebhookCollectionClientAsync
Hierarchy
- ResourceClientAsync
- WebhookCollectionClientAsync
Index
Methods
Properties
Methods
__init__
Initialize the resource client.
Parameters
keyword-onlybase_url: str
API base URL.
keyword-onlypublic_base_url: str
Public CDN base URL.
keyword-onlyhttp_client: HttpClientAsync
HTTP client for making requests.
keyword-onlyresource_path: str
Resource endpoint path (e.g., 'actors', 'datasets').
keyword-onlyclient_registry: ClientRegistryAsync
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
create
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.
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns Webhook
The created webhook.
iterate
Iterate over the available webhooks.
Simple
listdoes only one API call, possibly not listing all items matching the criteria. This method returns an iterator that is capable of making multiple API calls to retrieve all items matching the criteria.https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/get-list-of-webhooks
Parameters
optionalkeyword-onlylimit: int | None = None
How many webhooks to retrieve.
optionalkeyword-onlyoffset: int | None = None
What webhook to include as first when retrieving the list.
optionalkeyword-onlydesc: bool | None = None
Whether to sort the webhooks in descending order based on their date of creation.
optionalkeyword-onlytimeout: Timeout = 'medium'
Timeout for the API HTTP request.
Returns AsyncIterator[WebhookShort]
list
List the available webhooks.
https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/get-list-of-webhooks
Parameters
optionalkeyword-onlylimit: int | None = None
How many webhooks to retrieve.
optionalkeyword-onlyoffset: int | None = None
What webhook to include as first when retrieving the list.
optionalkeyword-onlydesc: bool | None = None
Whether to sort the webhooks in descending order based on their date of creation.
optionalkeyword-onlytimeout: Timeout = 'medium'
Timeout for the API HTTP request.
Returns ListOfWebhooks
The list of available webhooks matching the specified filters.
Properties
resource_id
Get the resource ID.
Sub-client for the webhook collection.
Provides methods to manage the webhook collection, e.g. list or create webhooks. Obtain an instance via an appropriate method on the
ApifyClientAsyncclass.