get_webhook_subscriptions

toloka.client.TolokaClient.get_webhook_subscriptions | Source code

Finds all webhook subscriptions that match certain criteria.

get_webhook_subscriptions returns a generator. You can iterate over all found webhook subscriptions using the generator. Several requests to the Toloka server are possible while iterating.

If you need to sort webhook subscriptions use the find_webhook_subscriptions method.

Parameters description

ParametersTypeDescription
event_typeOptional[WebhookSubscription.EventType]

Event type. Refer to the EventType page for more information on the available event_type values.

pool_idOptional[str]

The ID of a subscribed pool.

id_ltOptional[str]

Subscriptions with IDs less than the specified value.

id_lteOptional[str]

Subscriptions with IDs less than or equal to the specified value.

id_gtOptional[str]

Subscriptions with IDs greater than the specified value.

id_gteOptional[str]

Subscriptions with IDs greater than or equal to the specified value.

created_ltOptional[datetime]

Subscriptions created before the specified date.

created_lteOptional[datetime]

Subscriptions created before or on the specified date.

created_gtOptional[datetime]

Subscriptions created after the specified date.

created_gteOptional[datetime]

Subscriptions created after or on the specified date.

batch_sizeOptional[int]

A limit of items returned by each request to Toloka. The maximum allowed value: 300.

  • Yields:

    The next matching webhook subscription.

  • Yield type:

    Generator[WebhookSubscription, None, None]

Examples:

for subscription in toloka_client.get_webhook_subscriptions(pool_id='1080020'):
print(subscription.id, subscription.event_type)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming