Webhook
Send custom HTTP webhook notifications (most flexible option).
Attributes
| Attribute | Type | Description |
|---|---|---|
| url | str | Webhook URL (supports template variables) |
| method | Literal["POST", "PUT", "PATCH", "GET", "DELETE", "HEAD", "OPTIONS", "TRACE", "CONNECT"] = "POST" | HTTP method (default: "POST") |
| headers | Optional[Dict[str, str]] = null | Optional HTTP headers (values support template variables) |
| body | Optional[Dict[str, Any]] = null | Optional request body as dict (all string values support template variables recursively) |
Constructor
Signature
def Webhook(
on_phase: Union[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase), List[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase)]] = null,
url: str = null,
method: str = "POST",
headers: Optional[Dict[str, str]] = None,
body: Optional[Dict[str, Any]] = None
) -> null
Parameters
| Name | Type | Description |
|---|---|---|
| on_phase | Union[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase), List[[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase)]] = null | The execution phase or phases that trigger the notification. |
| url | str = null | The destination URL for the webhook request, supporting template variables. |
| method | str = "POST" | The HTTP method to use for the request (e.g., POST, PUT, PATCH). |
| headers | Optional[Dict[str, str]] = None | A dictionary of HTTP headers to include in the request. |
| body | Optional[Dict[str, Any]] = None | A dictionary representing the request body, which can contain nested template variables. |