pip install git+https://github.com/epilot-dev/sdk-python.git#subdirectory=webhooks
import epilot
from epilot.models import operations, shared
s = epilot.Epilot(
security=shared.Security(
epilot_auth="Bearer YOUR_BEARER_TOKEN_HERE",
),
)
req = shared.WebhookConfig(
auth=shared.Auth(
api_key_config=shared.APIKeyConfig(
key_name="unde",
key_value="deserunt",
),
auth_type="API_KEY",
basic_auth_config=shared.BasicAuthConfig(
password="nulla",
username="Leatha_Stiedemann",
),
oauth_config=shared.OAuthConfig(
client_id="nihil",
client_secret="fuga",
endpoint="facilis",
http_method="PUT",
),
),
creation_time="2021-04-27T12:01:13.000Z",
enabled=False,
event_name="iusto",
filter=shared.Filter(
key_to_filter="ullam",
supported_values=[
"inventore",
"sapiente",
"enim",
"eum",
],
),
http_method="PATCH",
id="autem",
url="vel",
)
res = s.webhooks.create_config(req)
if res.webhook_config is not None:
# handle response
create_config - createConfig
delete_config - deleteConfig
get_config - getConfig
get_configs - getConfigs
get_configured_events - getConfiguredEvents
get_failures - getFailures
resend_failure - resendFailure
update_config - updateConfig