WebhookSubscriptionBatchCreateResult

toloka.client.batch_create_results.WebhookSubscriptionBatchCreateResult

WebhookSubscriptionBatchCreateResult(
self,
*,
items: Optional[Dict[str, WebhookSubscription]] = None,
validation_errors: Optional[Dict[str, Dict[str, FieldValidationError]]] = None
)

The result of creating webhook subscriptions.

WebhookSubscriptionBatchCreateResult is returned by the upsert_webhook_subscriptions method.

Parameters description

ParametersTypeDescription
itemsOptional[Dict[str, WebhookSubscription]]

A dictionary with created subscriptions. The indexes of a upsert_webhook_subscriptions input list are used as keys in the dictionary.

validation_errorsOptional[Dict[str, Dict[str, FieldValidationError]]]

A dictionary with validation errors.

Examples:

result = toloka_client.upsert_webhook_subscriptions([
{
'webhook_url': 'https://awesome-requester.com/toloka-webhook',
'event_type': toloka.client.webhook_subscription.WebhookSubscription.EventType.ASSIGNMENT_CREATED,
'pool_id': '1240045'
}
])
print(result.items['0'].created)

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