blob: 23aeac85914d072a25f9caba9fd6ece0fbade32d [file] [log] [blame]
:py:mod:`airflow.providers.http.operators.http`
===============================================
.. py:module:: airflow.providers.http.operators.http
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.http.operators.http.SimpleHttpOperator
.. py:class:: SimpleHttpOperator(*, endpoint = None, method = 'POST', data = None, headers = None, response_check = None, response_filter = None, extra_options = None, http_conn_id = 'http_default', log_response = False, auth_type = HTTPBasicAuth, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Calls an endpoint on an HTTP system to execute an action
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SimpleHttpOperator`
:param http_conn_id: The :ref:`http connection<howto/connection:http>` to run
the operator against
:param endpoint: The relative part of the full url. (templated)
:param method: The HTTP method to use, default = "POST"
:param data: The data to pass. POST-data in POST/PUT and params
in the URL for a GET request. (templated)
:param headers: The HTTP headers to be added to the GET request
:param response_check: A check against the 'requests' response object.
The callable takes the response object as the first positional argument
and optionally any number of keyword arguments available in the context dictionary.
It should return True for 'pass' and False otherwise.
:param response_filter: A function allowing you to manipulate the response
text. e.g response_filter=lambda response: json.loads(response.text).
The callable takes the response object as the first positional argument
and optionally any number of keyword arguments available in the context dictionary.
:param extra_options: Extra options for the 'requests' library, see the
'requests' documentation (options to modify timeout, ssl, etc.)
:param log_response: Log the response (default: False)
:param auth_type: The auth type for the service
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['endpoint', 'data', 'headers']
.. py:attribute:: template_fields_renderers
.. py:attribute:: template_ext
:annotation: :Sequence[str] = []
.. py:attribute:: ui_color
:annotation: = #f4a460
.. py:method:: execute(self, context)
This is the main method to derive when creating an operator.
Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.