Skip to main content

Webhook

Send custom HTTP webhook notifications (most flexible option).

Attributes

AttributeTypeDescription
urlstrWebhook URL (supports template variables)
methodLiteral["POST", "PUT", "PATCH", "GET", "DELETE", "HEAD", "OPTIONS", "TRACE", "CONNECT"] = POSTHTTP method (default: "POST")
headersOptional[Dict[str, str]] = NoneOptional HTTP headers (values support template variables)
bodyOptional[Dict[str, Any]] = NoneOptional request body as dict (all string values support template variables recursively)

Constructor

Signature

def Webhook(
on_phase: [ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase) = null,
url: str = null,
method: Literal["POST", "PUT", "PATCH", "GET", "DELETE", "HEAD", "OPTIONS", "TRACE", "CONNECT"] = "POST",
headers: Optional[Dict[str, str]] = None,
body: Optional[Dict[str, Any]] = None
) - > null

Parameters

NameTypeDescription
on_phase[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase) = nullActionPhase(s) to trigger notification
urlstr = nullWebhook URL (supports template variables)
methodLiteral["POST", "PUT", "PATCH", "GET", "DELETE", "HEAD", "OPTIONS", "TRACE", "CONNECT"] = "POST"HTTP method (default: "POST")
headersOptional[Dict[str, str]] = NoneOptional HTTP headers (values support template variables)
bodyOptional[Dict[str, Any]] = NoneOptional request body as dict (all string values support template variables recursively)