WebhookCollectionClient
Hierarchy
- ResourceCollectionClient
- WebhookCollectionClient
Index
Methods
__init__
Initialize the WebhookCollectionClient.
Parameters
args: Any
kwargs: Any
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: Optional[str] = None
Specification of the payload that will be sent to request_url
optionalkeyword-onlyactor_id: Optional[str] = None
Id of the actor whose runs should trigger the webhook.
optionalkeyword-onlyactor_task_id: Optional[str] = None
Id of the actor task whose runs should trigger the webhook.
optionalkeyword-onlyactor_run_id: Optional[str] = None
Id of the actor run which should trigger the webhook.
optionalkeyword-onlyignore_ssl_errors: Optional[bool] = None
Whether the webhook should ignore SSL errors returned by request_url
optionalkeyword-onlydo_not_retry: Optional[bool] = None
Whether the webhook should retry sending the payload to request_url upon failure.
optionalkeyword-onlyidempotency_key: Optional[str] = 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: Optional[bool] = 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
dict: The created webhook
list
List the available webhooks.
https://docs.apify.com/api/v2#/reference/webhooks/webhook-collection/get-list-of-webhooks
Parameters
optionalkeyword-onlylimit: Optional[int] = None
How many webhooks to retrieve
optionalkeyword-onlyoffset: Optional[int] = None
What webhook to include as first when retrieving the list
optionalkeyword-onlydesc: Optional[bool] = None
Whether to sort the webhooks in descending order based on their date of creation
Returns ListPage
ListPage: The list of available webhooks matching the specified filters.
Sub-client for manipulating webhooks.