Webhook
- class labelbox.schema.webhook.Webhook(client, field_values)[source]
Bases:
DbObject
,Updateable
Represents a server-side rule for sending notifications to a web-server whenever one of several predefined actions happens within a context of a Project or an Organization.
- updated_at
- Type:
datetime
- created_at
- Type:
datetime
- url
- Type:
str
- topics
LABEL_CREATED, LABEL_UPDATED, LABEL_DELETED
- Type:
str
- status
ACTIVE, INACTIVE, REVOKED
- Type:
str
- static create(client, topics, url, secret, project) Webhook [source]
Creates a Webhook.
- Parameters:
client (Client) – The Labelbox client used to connect to the server.
topics (list of str) – A list of topics this Webhook should get notifications for. Must be one of Webhook.Topic
url (str) – The URL to which notifications should be sent by the Labelbox server.
secret (str) – A secret key used for signing notifications.
project (Project or None) – The project for which notifications should be sent. If None notifications are sent for all events in your organization.
- Returns:
A newly created Webhook.
- Raises:
ValueError – If the topic is not one of Topic or status is not one of Status
- Information on configuring your server can be found here (this is where the url points to and the secret is set).