airflow.providers.http.triggers.http
¶
Module Contents¶
Classes¶
HttpTrigger run on the trigger worker. |
|
A trigger that fires when the request to a URL returns a non-404 status code. |
- class airflow.providers.http.triggers.http.HttpTrigger(http_conn_id='http_default', auth_type=None, method='POST', endpoint=None, headers=None, data=None, extra_options=None)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
HttpTrigger run on the trigger worker.
- Parameters
http_conn_id (str) – http connection id that has the base API url i.e https://www.google.com/ and optional authentication credentials. Default headers can also be specified in the Extra field in json format.
auth_type (Any) – The auth type for the service
method (str) – the API method to be called
endpoint (str | None) – Endpoint to be called, i.e.
resource/v1/query?
.headers (dict[str, str] | None) – Additional headers to be passed through as a dict.
data (dict[str, Any] | str | None) – Payload to be uploaded or request parameters.
extra_options (dict[str, Any] | None) – Additional kwargs to pass when creating a request. For example,
run(json=obj)
is passed asaiohttp.ClientSession().get(json=obj)
. 2XX or 3XX status codes
- class airflow.providers.http.triggers.http.HttpSensorTrigger(endpoint=None, http_conn_id='http_default', method='GET', data=None, headers=None, extra_options=None, poke_interval=5.0)[source]¶
Bases:
airflow.triggers.base.BaseTrigger
A trigger that fires when the request to a URL returns a non-404 status code.
- Parameters
endpoint (str | None) – The relative part of the full url
http_conn_id (str) – The HTTP Connection ID to run the sensor against
method (str) – The HTTP request method to use
data (dict[str, Any] | str | None) – payload to be uploaded or aiohttp parameters
headers (dict[str, str] | None) – The HTTP headers to be added to the GET request
extra_options (dict[str, Any] | None) – Additional kwargs to pass when creating a request. For example,
run(json=obj)
is passed asaiohttp.ClientSession().get(json=obj)
poke_interval (float) – Time to sleep using asyncio