airflow.providers.http.notifications.http

Attributes

send_http_notification

Classes

HttpNotifier

HTTP Notifier.

Module Contents

class airflow.providers.http.notifications.http.HttpNotifier(*, http_conn_id=HttpHook.default_conn_name, endpoint=None, method='POST', data=None, json=None, headers=None, extra_options=None, **kwargs)[source]

Bases: airflow.providers.common.compat.notifier.BaseNotifier

HTTP Notifier.

Sends HTTP requests to notify external systems.

Parameters:
  • http_conn_id (str) – HTTP connection id that has the base URL and optional authentication credentials.

  • endpoint (str | None) – The endpoint to be called i.e. resource/v1/query?

  • method (str) – The HTTP method to use. Defaults to POST.

  • data (dict[str, Any] | str | None) – Payload to be uploaded or request parameters

  • json (dict[str, Any] | str | None) – JSON payload to be uploaded

  • headers (dict[str, Any] | None) – Additional headers to be passed through as a dictionary

  • extra_options (dict[str, Any] | None) – Additional options to be used when executing the request

template_fields = ('http_conn_id', 'endpoint', 'data', 'json', 'headers', 'extra_options')[source]
http_conn_id = 'http_default'[source]
endpoint = None[source]
method = 'POST'[source]
data = None[source]
json = None[source]
headers = None[source]
extra_options[source]
property hook: airflow.providers.http.hooks.http.HttpHook[source]

HTTP Hook.

property async_hook: airflow.providers.http.hooks.http.HttpAsyncHook[source]

HTTP Async Hook.

notify(context)[source]

Send HTTP notification (sync).

async async_notify(context)[source]

Send HTTP notification (async).

airflow.providers.http.notifications.http.send_http_notification[source]

Was this entry helpful?