![]() ![]() The HTTP GET request can be used to read a resource or to list a number of resources.Ī resource's id can be submitted in the request parameters to read a specific resource. The response returns a 201 Created response code upon success with the resource's metadata, including To create a resource, you typically submit an HTTP POST request with the resource's required metadata Some endpoints have special behavior as exceptions. You can review the standards for these operations and their standard parameters below. The platform supports Create, Read, Update, and Delete operations on most resources. Resource names are used as part of endpoint URLs, as well as in API parameters and responses. The name of a resource is typically plural and expressed in camelCase. ![]() The term resource refers to a single type of object in the Airflow metadata. This means that you must usually add the following headers to your request: Content-type: application/json Most of the endpoints accept JSON as input and return JSON responses. ![]() This section provides an overview of the API design, methods, and supported use cases. Headers ( dict | None) – Additional headers to be passed through as a dict.Įxtra_options ( dict | None) – Additional kwargs to pass when creating a request.To facilitate management, Apache Airflow supports a range of REST API endpoints across its resource/v1/query?.ĭata ( dict | str | None) – Payload to be uploaded or request parameters. ParametersĮndpoint ( str | None) – Endpoint to be called, i.e. Perform an asynchronous HTTP request call. ![]() Http_conn_id ( str) – http connection id that has the baseĬonn_name_attr = 'http_conn_id' ¶ default_conn_name = 'http_default' ¶ conn_type = 'http' ¶ hook_name = 'HTTP' ¶ async run ( endpoint = None, data = None, headers = None, extra_options = None ) ¶ Interact with HTTP servers asynchronously. HttpAsyncHook ( method = 'POST', http_conn_id = default_conn_name, auth_type = aiohttp.BasicAuth, retry_limit = 3, retry_delay = 1.0 ) ¶ run_with_advanced_retry ( endpoint = "v1/test", _retry_args = retry_args ) url_from_endpoint ( endpoint ) ¶Ĭombine base url with endpoint. retry_if_exception_type ( Exception ), ) hook. stop_after_attempt ( 10 ), retry = tenacity. Hook = HttpHook ( http_conn_id = "my_conn", method = "GET" ) retry_args = dict ( wait = tenacity. _retry_args ( dict ) – Arguments which define the retry behaviour. This is useful for connectors which might be disturbed by intermittent Run_with_advanced_retry ( _retry_args, * args, ** kwargs ) ¶ to avoid checking raising exceptions on non 2XX Headers ( dict | None) – additional headers to be passed through as a dictionaryĮxtra_options ( dict | None) – additional options to be used when executing the request resource/v1/query?ĭata ( dict | str | None) – payload to be uploaded or request parameters Headers ( dict | None) – additional headers to be passed through as a dictionary run ( endpoint = None, data = None, headers = None, extra_options = None, ** request_kwargs ) ¶Įndpoint ( str | None) – the endpoint to be called i.e. Property auth_type ¶ conn_name_attr = 'http_conn_id' ¶ default_conn_name = 'http_default' ¶ conn_type = 'http' ¶ hook_name = 'HTTP' ¶ get_conn ( headers = None ) ¶Ĭreate a Requests HTTP session. Tcp_keep_alive_interval ( int) – The TCP Keep Alive interval parameter (corresponds toĪuth_args – extra arguments used to initialize the auth_type if different than default HTTPBasicAuth Tcp_keep_alive_count ( int) – The TCP Keep Alive count parameter (corresponds to socket.TCP_KEEPCNT) Tcp_keep_alive_idle ( int) – The TCP Keep Alive Idle parameter (corresponds to socket.TCP_KEEPIDLE). Tcp_keep_alive ( bool) – Enable TCP Keep Alive for the connection. Headers can also be specified in the Extra field in json format.Īuth_type ( Any) – The auth type for the service Http_conn_id ( str) – http connection that has the baseĪPI url i.e and optional authentication credentials. Method ( str) – the API method to be called HttpHook ( method = 'POST', http_conn_id = default_conn_name, auth_type = None, tcp_keep_alive = True, tcp_keep_alive_idle = 120, tcp_keep_alive_count = 20, tcp_keep_alive_interval = 30 ) ¶ Interact with HTTP servers asynchronously.Ĭlass .http. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |