Method
Create a webhook attached to a given deployment ID.
REQUIRED |
KEY |
TYPE |
DESCRIPTION |
Yes |
deploymentId |
str |
Unique string identifier for the deployment this webhook will attach to.
|
Yes |
endpoint |
str |
URI that the webhook will send HTTP POST requests to.
|
Yes |
webhookEventType |
str |
One of 'DEPLOYMENT_START', 'DEPLOYMENT_SUCCESS', or 'DEPLOYMENT_FAILED'.
|
No |
payloadTemplate |
dict |
Template for the body of the HTTP POST requests. Defaults to {}.
|
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.
KEY |
TYPE |
DESCRIPTION |
success |
Boolean |
true if the call succeeded, false if there was an error |
result |
Webhook |
KEY |
TYPE |
Description |
webhookId |
str |
Unique identifier for this webhook. |
deploymentId |
str |
Identifier for the deployment this webhook is attached to. |
endpoint |
str |
The URI this webhook will send HTTP POST requests to. |
webhookEventType |
str |
The event that triggers the webhook action. |
payloadTemplate |
str |
Template for JSON Dictionary to be sent as the body of the POST request. |
createdAt |
str |
The date and time this webhook was created. |
|
TYPE |
WHEN |
DataNotFoundError |
deploymentId is not found.
|
InvalidEnumParameterError |
An invalid value is passed for webhookEventType . |