blob: df0a7510616d5f57af3eb6b51337c23a39407042 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>InvokeHTTP</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">InvokeHTTP</h1><h2>Description: </h2><p>An HTTP client processor which can interact with a configurable HTTP Endpoint. The destination URL and HTTP Method are configurable. FlowFile attributes are converted to HTTP headers and the FlowFile contents are included as the body of the request (if the HTTP Method is PUT, POST or PATCH).</p><h3>Tags: </h3><p>http, https, rest, client</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>HTTP Method</strong></td><td>HTTP Method</td><td id="default-value">GET</td><td id="allowable-values"></td><td id="description">HTTP request method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS). Arbitrary methods are also supported. Methods other than POST, PUT and PATCH will be sent without a message body.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>HTTP URL</strong></td><td>Remote URL</td><td></td><td id="allowable-values"></td><td id="description">HTTP remote URL including a scheme of http or https, as well as a hostname or IP address with optional port and path elements.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name"><strong>HTTP/2 Disabled</strong></td><td>disable-http2</td><td id="default-value">False</td><td id="allowable-values"><ul><li>True</li><li>False</li></ul></td><td id="description">Disable negotiation of HTTP/2 protocol. HTTP/2 requires TLS. HTTP/1.1 protocol supported is required when HTTP/2 is disabled.</td></tr><tr><td id="name">SSL Context Service</td><td>SSL Context Service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>SSLContextService<br/><strong>Implementations: </strong><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardRestrictedSSLContextService/index.html">StandardRestrictedSSLContextService</a><br/><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardSSLContextService/index.html">StandardSSLContextService</a></td><td id="description">SSL Context Service provides trusted certificates and client certificates for TLS communication.</td></tr><tr><td id="name"><strong>Socket Connect Timeout</strong></td><td>Connection Timeout</td><td id="default-value">5 secs</td><td id="allowable-values"></td><td id="description">Maximum time to wait for initial socket connection to the HTTP URL.</td></tr><tr><td id="name"><strong>Socket Read Timeout</strong></td><td>Read Timeout</td><td id="default-value">15 secs</td><td id="allowable-values"></td><td id="description">Maximum time to wait for receiving responses from a socket connection to the HTTP URL.</td></tr><tr><td id="name"><strong>Socket Idle Timeout</strong></td><td>idle-timeout</td><td id="default-value">5 mins</td><td id="allowable-values"></td><td id="description">Maximum time to wait before closing idle connections to the HTTP URL.</td></tr><tr><td id="name"><strong>Socket Idle Connections</strong></td><td>max-idle-connections</td><td id="default-value">5</td><td id="allowable-values"></td><td id="description">Maximum number of idle connections to the HTTP URL.</td></tr><tr><td id="name">Proxy Configuration Service</td><td>proxy-configuration-service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>ProxyConfigurationService<br/><strong>Implementation: </strong><a href="../../../nifi-proxy-configuration-nar/1.19.1/org.apache.nifi.proxy.StandardProxyConfigurationService/index.html">StandardProxyConfigurationService</a></td><td id="description">Specifies the Proxy Configuration Controller Service to proxy network requests. If set, it supersedes proxy settings configured per component. Supported proxies: HTTP + AuthN, SOCKS In case of SOCKS, it is not guaranteed that the selected SOCKS Version will be used by the processor.</td></tr><tr><td id="name">Proxy Host</td><td>Proxy Host</td><td></td><td id="allowable-values"></td><td id="description">Proxy Host and dependent properties are deprecated in favor of Proxy Configuration Service. Proxy Host can be configured using an IP address or DNS address.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name">Proxy Port</td><td>Proxy Port</td><td></td><td id="allowable-values"></td><td id="description">Proxy Port and dependent properties are deprecated in favor of Proxy Configuration Service. Port number for the configured Proxy Host address.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Proxy Host] Property has a value specified.</strong></td></tr><tr><td id="name">Proxy Type</td><td>Proxy Type</td><td id="default-value">http</td><td id="allowable-values"></td><td id="description">Proxy Type and dependent properties are deprecated in favor of Proxy Configuration Service. Proxy protocol type is not used<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Proxy Host] Property has a value specified.</strong></td></tr><tr><td id="name">Proxy Username</td><td>invokehttp-proxy-user</td><td></td><td id="allowable-values"></td><td id="description">Proxy Username and dependent properties are deprecated in favor of Proxy Configuration Service. Username to set when authenticating with a Proxy server.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Proxy Host] Property has a value specified.</strong></td></tr><tr><td id="name">Proxy Password</td><td>invokehttp-proxy-password</td><td></td><td id="allowable-values"></td><td id="description">Proxy Password and dependent properties are deprecated in favor of Proxy Configuration Service. Password to set when authenticating with a Proxy server.<br/><strong>Sensitive Property: true</strong><br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Proxy Host] Property has a value specified.</strong></td></tr><tr><td id="name">Request OAuth2 Access Token Provider</td><td>oauth2-access-token-provider</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>OAuth2AccessTokenProvider<br/><strong>Implementation: </strong><a href="../../../nifi-oauth2-provider-nar/1.19.1/org.apache.nifi.oauth2.StandardOauth2AccessTokenProvider/index.html">StandardOauth2AccessTokenProvider</a></td><td id="description">Enables managed retrieval of OAuth2 Bearer Token applied to HTTP requests using the Authorization Header.</td></tr><tr><td id="name">Request Username</td><td>Basic Authentication Username</td><td></td><td id="allowable-values"></td><td id="description">The username provided for authentication of HTTP requests. Encoded using Base64 for HTTP Basic Authentication as described in RFC 7617.</td></tr><tr><td id="name">Request Password</td><td>Basic Authentication Password</td><td></td><td id="allowable-values"></td><td id="description">The password provided for authentication of HTTP requests. Encoded using Base64 for HTTP Basic Authentication as described in RFC 7617.<br/><strong>Sensitive Property: true</strong></td></tr><tr><td id="name">Request Digest Authentication Enabled</td><td>Digest Authentication</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable Digest Authentication on HTTP requests with Username and Password credentials as described in RFC 7616.<br/><br/><strong>This Property is only considered if </strong><strong>the [Request Username] Property has a value specified.</strong></td></tr><tr><td id="name">Request Failure Penalization Enabled</td><td>Penalize on "No Retry"</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable penalization of request FlowFiles when receiving HTTP response with a status code between 400 and 499.</td></tr><tr><td id="name">Request Body Enabled</td><td>send-message-body</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable sending HTTP request body for PATCH, POST, or PUT methods.<br/><br/><strong>This Property is only considered if </strong><strong>the [HTTP Method] Property is set to one of the following values: [POST], [PATCH], [PUT]</strong></td></tr><tr><td id="name">Request Multipart Form-Data Name</td><td>form-body-form-name</td><td></td><td id="allowable-values"></td><td id="description">Enable sending HTTP request body formatted using multipart/form-data and using the form name configured.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [Request Body Enabled] Property has a value of "true".</strong></td></tr><tr><td id="name">Request Multipart Form-Data Filename Enabled</td><td>set-form-filename</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable sending the FlowFile filename attribute as the filename parameter in the Content-Disposition Header for multipart/form-data HTTP requests.<br/><br/><strong>This Property is only considered if </strong><strong>the [Request Multipart Form-Data Name] Property has a value specified.</strong></td></tr><tr><td id="name"><strong>Request Chunked Transfer-Encoding Enabled</strong></td><td>Use Chunked Encoding</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable sending HTTP requests with the Transfer-Encoding Header set to chunked, and disable sending the Content-Length Header. Transfer-Encoding applies to the body in HTTP/1.1 requests as described in RFC 7230 Section 3.3.1<br/><br/><strong>This Property is only considered if </strong><strong>the [HTTP Method] Property is set to one of the following values: [POST], [PATCH], [PUT]</strong></td></tr><tr><td id="name"><strong>Request Content-Encoding</strong></td><td>Content-Encoding</td><td id="default-value">DISABLED</td><td id="allowable-values"><ul><li>DISABLED <img src="../../../../../html/images/iconInfo.png" alt="Content encoding not applied during transmission" title="Content encoding not applied during transmission"></img></li><li>GZIP <img src="../../../../../html/images/iconInfo.png" alt="Gzip content encoding and HTTP Content-Encoding header applied during transmission" title="Gzip content encoding and HTTP Content-Encoding header applied during transmission"></img></li></ul></td><td id="description">HTTP Content-Encoding applied to request body during transmission. The receiving server must support the selected encoding to avoid request failures.<br/><br/><strong>This Property is only considered if </strong><strong>the [HTTP Method] Property is set to one of the following values: [POST], [PATCH], [PUT]</strong></td></tr><tr><td id="name"><strong>Request Content-Type</strong></td><td>Content-Type</td><td id="default-value">${mime.type}</td><td id="allowable-values"></td><td id="description">HTTP Content-Type Header applied to when sending an HTTP request body for PATCH, POST, or PUT methods. The Content-Type defaults to application/octet-stream when not configured.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong><br/><br/><strong>This Property is only considered if </strong><strong>the [HTTP Method] Property is set to one of the following values: [POST], [PATCH], [PUT]</strong></td></tr><tr><td id="name"><strong>Request Date Header Enabled</strong></td><td>Include Date Header</td><td id="default-value">True</td><td id="allowable-values"><ul><li>True</li><li>False</li></ul></td><td id="description">Enable sending HTTP Date Header on HTTP requests as described in RFC 7231 Section 7.1.1.2.</td></tr><tr><td id="name">Request Header Attributes Pattern</td><td>Attributes to Send</td><td></td><td id="allowable-values"></td><td id="description">Regular expression that defines which attributes to send as HTTP headers in the request. If not defined, no attributes are sent as headers. Dynamic properties will be sent as headers. The dynamic property name will be the header key and the dynamic property value will be interpreted as expression language will be the header value.</td></tr><tr><td id="name">Request User-Agent</td><td>Useragent</td><td></td><td id="allowable-values"></td><td id="description">HTTP User-Agent Header applied to requests. RFC 7231 Section 5.5.3 describes recommend formatting.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Response Body Attribute Name</td><td>Put Response Body In Attribute</td><td></td><td id="allowable-values"></td><td id="description">FlowFile attribute name used to write an HTTP response body for FlowFiles transferred to the Original relationship.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">Response Body Attribute Size</td><td>Max Length To Put In Attribute</td><td id="default-value">256</td><td id="allowable-values"></td><td id="description">Maximum size in bytes applied when writing an HTTP response body to a FlowFile attribute. Attributes exceeding the maximum will be truncated.<br/><br/><strong>This Property is only considered if </strong><strong>the [Response Body Attribute Name] Property has a value specified.</strong></td></tr><tr><td id="name"><strong>Response Body Ignored</strong></td><td>ignore-response-content</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Disable writing HTTP response FlowFiles to Response relationship</td></tr><tr><td id="name"><strong>Response Cache Enabled</strong></td><td>use-etag</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable HTTP response caching described in RFC 7234. Caching responses considers ETag and other headers.</td></tr><tr><td id="name"><strong>Response Cache Size</strong></td><td>etag-max-cache-size</td><td id="default-value">10MB</td><td id="allowable-values"></td><td id="description">Maximum size of HTTP response cache in bytes. Caching responses considers ETag and other headers.<br/><br/><strong>This Property is only considered if </strong><strong>the [Response Cache Enabled] Property has a value of "true".</strong></td></tr><tr><td id="name"><strong>Response Cookie Strategy</strong></td><td>cookie-strategy</td><td id="default-value">DISABLED</td><td id="allowable-values"><ul><li>DISABLED</li><li>ACCEPT_ALL</li></ul></td><td id="description">Strategy for accepting and persisting HTTP cookies. Accepting cookies enables persistence across multiple requests.</td></tr><tr><td id="name">Response Generation Required</td><td>Always Output Response</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable generation and transfer of a FlowFile to the Response relationship regardless of HTTP response received.</td></tr><tr><td id="name"><strong>Response FlowFile Naming Strategy</strong></td><td>flow-file-naming-strategy</td><td id="default-value">RANDOM</td><td id="allowable-values"><ul><li>RANDOM <img src="../../../../../html/images/iconInfo.png" alt="FlowFile filename attribute will be a random value." title="FlowFile filename attribute will be a random value."></img></li><li>URL_PATH <img src="../../../../../html/images/iconInfo.png" alt="FlowFile filename attribute will be extracted from the remote URL path. The attribute may contain URL encoded characters. If the path doesn't exist, the attribute will be a random value." title="FlowFile filename attribute will be extracted from the remote URL path. The attribute may contain URL encoded characters. If the path doesn't exist, the attribute will be a random value."></img></li></ul></td><td id="description">Determines the strategy used for setting the filename attribute of FlowFiles transferred to the Response relationship.</td></tr><tr><td id="name">Response Header Request Attributes Enabled</td><td>Add Response Headers to Request</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Enable adding HTTP response headers as attributes to FlowFiles transferred to the Original relationship.</td></tr><tr><td id="name"><strong>Response Redirects Enabled</strong></td><td>Follow Redirects</td><td id="default-value">True</td><td id="allowable-values"><ul><li>True</li><li>False</li></ul></td><td id="description">Enable following HTTP redirects sent with HTTP 300 series responses as described in RFC 7231 Section 6.4.</td></tr></table><h3>Dynamic Properties: </h3><p>Supports Sensitive Dynamic Properties: <strong>Yes</strong></p><p>Dynamic Properties allow the user to specify both the name and value of a property.<table id="dynamic-properties"><tr><th>Name</th><th>Value</th><th>Description</th></tr><tr><td id="name">Header Name</td><td id="value">Attribute Expression Language</td><td>Send request header with a key matching the Dynamic Property Key and a value created by evaluating the Attribute Expression Language set in the value of the Dynamic Property.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr><tr><td id="name">post:form:&lt;NAME&gt;</td><td id="value">Attribute Expression Language</td><td>When the HTTP Method is POST, dynamic properties with the property name in the form of post:form:&lt;NAME&gt;, where the &lt;NAME&gt; will be the form data name, will be used to fill out the multipart form parts. If send message body is false, the flowfile will not be sent, but any other form data will be.<br/><strong>Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)</strong></td></tr></table></p><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>Original</td><td>Request FlowFiles transferred when receiving HTTP responses with a status code between 200 and 299.</td></tr><tr><td>Failure</td><td>Request FlowFiles transferred when receiving socket communication errors.</td></tr><tr><td>Retry</td><td>Request FlowFiles transferred when receiving HTTP responses with a status code between 500 and 599.</td></tr><tr><td>No Retry</td><td>Request FlowFiles transferred when receiving HTTP responses with a status code between 400 an 499.</td></tr><tr><td>Response</td><td>Response FlowFiles transferred when receiving HTTP responses with a status code between 200 and 299.</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>invokehttp.status.code</td><td>The status code that is returned</td></tr><tr><td>invokehttp.status.message</td><td>The status message that is returned</td></tr><tr><td>invokehttp.response.body</td><td>In the instance where the status code received is not a success (2xx) then the response body will be put to the 'invokehttp.response.body' attribute of the request FlowFile.</td></tr><tr><td>invokehttp.request.url</td><td>The original request URL</td></tr><tr><td>invokehttp.request.duration</td><td>Duration (in milliseconds) of the HTTP call to the external endpoint</td></tr><tr><td>invokehttp.response.url</td><td>The URL that was ultimately requested after any redirects were followed</td></tr><tr><td>invokehttp.tx.id</td><td>The transaction ID that is returned after reading the response</td></tr><tr><td>invokehttp.remote.dn</td><td>The DN of the remote server</td></tr><tr><td>invokehttp.java.exception.class</td><td>The Java exception class raised when the processor fails</td></tr><tr><td>invokehttp.java.exception.message</td><td>The Java exception message raised when the processor fails</td></tr><tr><td>user-defined</td><td>If the 'Put Response Body In Attribute' property is set then whatever it is set to will become the attribute key and the value would be the body of the HTTP response.</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component allows an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>