Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The HTTP Client collector function collects data from a third-party HTTP server. You can configure this function to set the values for how the HTTP Client function would behave when communication with the third-party HTTP server, and how to specify the method of communication.

You can configure this function in the following settings.

  • Connection

  • Operational settings

  • General settings

  • Results

Connection
Anchor
Connection
Connection

Depending on the users' configuration, three authentication methods are available: None, Basic authentication and OAuth 2.0.

A selectable option from the Authentication type is used to make the selection and based on that separate configuration options are available. There will be additional options for the Authentication type selected.

Rw ui tabs macro
Rw tab
titleNone

Add the Target URL of the HTTP request to be made to the HTTP server. You can use Variable Insertion.

Rw tab
titleBasic authentication

Add the Username and Password if there are any. These options can be left emptyare optional.

Add the Target URL of the HTTP request to be made to the HTTP server. In Target URL, enter the URL of the target HTTP server.  You You can use Variable Insertion.

Note

Note!

Usage Engine Cloud Edition interprets only a single forward slash in the URL fields. Make sure that you format the URLs accordingly. 

Rw tab
titleOAuth 2.0

The Use redirect fields checkbox allows you to toggle URL redirection using the available options. Two fields are displayed when this option is enabled – the Target URL field where the designated address is to be entered, and an optional Resource path.

Add the Target URL of the HTTP request to be made to the HTTP server.

Note

Note!

When the Authentication type selection is selected as OAuth 2.0 additional options are displayed. See the OAuth2.0 crendentials and OAuth2.0 parameters sections for more information. Their configuration is mandatory to properly activate the function. 

Rw ui expands macro
Rw expand
titleOAuth2.0 credentials

It is also possible to use the enable Secrets Wallet functionality to apply stored credentials for the three HTTP Functions

If Secrets Wallet is not enabled, you configure the following fields.

  • Grant type – In this field, select the grant type of the credential.

  • Client ID – In this field enter the client identifier. 

  • Client secret – In this field enter the associated client secret. This parameter may be omitted if the client secret is an empty string. 

  • Username – This field is used to specify the relevant username, it is mandatory. This field appears when the Password credentials is selected for the Grant type.

  • Password – This field is used to specify the password associated with the username, it is mandatory. This field appears when the Password credentials is selected for the Grant type.

Rw ui expands macro
Rw expand
titleOAuth 2.0 parameters

The OAuth 2.0 parameters section of the function controls the authentication token credentials. Based on the Grant Type selection in the OAuth 2.0 credentials section, there are two types of credentials access provided for the authentication provisions – Password and Client credentials. Each of them has a distinctive configuration option.

If Secrets wallet is enabled in the OAuth 2.0 credentials section, and a Private key JWT authentication type is selected, there are additional distinctive configuration options here.

Rw ui tabs macro

Rw tab
titlePassword credentials

  • Access token URL – In this field specify the URL containing the authorization token. 

  • Token header prefix – is the Authorization header placed before the access token.

  • Scope – The authorization and token endpoints allow the client to specify the access request scope using this parameter. The entered value must be expressed as a list of space-delimited, case-sensitive strings. This is an optional parameter.

  • Audience

  • Client Authenticationauthentication – This option controls the type of authentication mechanism as defined by the connecting server – Auth Header or Auth Body are available. The options are named "Send as Basic Auth Header" and "Send client credentials in body".

Rw tab
titleClient credentials
  • Access token URL – In this field specify the URL containing the authorization token. 

  • Token header prefix is the Authorization header placed before the access token.

  • Scope – The authorization and token endpoints allow the client to specify the access request scope using this parameter. The entered value must be expressed as a list of space-delimited, case-sensitive strings. This is an optional parameter.

  • Audience

  • Client Authenticationauthentication – This option controls the type of authentication mechanism as defined by the connecting server – Auth Header or Auth Body are available. The options are named "Send as Basic Auth Header" and "Send client credentials in body". 

Rw tab
titlePrivate key JWT
  • Access token URL In this field specify Specify the URL containing the authorization token. 

  • Token header prefix – Is the Authorization header placed before the access token.

  • Issuer Identifies Set the issuer of the JWT

  • Audience Identifies Set the recipients that the JWT is intended for. It can be a single recipient or a list of recipients.

  • Subject Identifies Set the subject of the JWT, typically representing the user or entity the token is about.

  • Identifier Provides Set a unique identifier for the JWT.

Operational settings
Anchor
Operational-settings
Operational-settings

In Operational settings, enter the following details that determine how you want to handle the errors. The following options are available for HTTP Collector and Processor Functions only:

  • In Request run limit, specify the number of times the operation should run. 

  • In Action on error, specify the action you want to take in case of an error. You can select from the following options:

Action on error options

Description

Ignore

Select to ignore the error and the stream keeps on running.

Stop the stream

Select to stop the stream.

Any response with the HTTP status code 4xx or 5xx is considered an error. All errors get logged in the system logs. You can refer to the Logs for more information. The default value is Ignore.

General settings
Anchor
General-settings
General-settings

In General settings, you select an HTTP request method from the following options:

HTTP Method

Description

GET

Request data from the target server.

POST

Sends data to the target server. Select either Body or Form under Content*.

PUT

Replaces the current resources of the target URL with the uploaded content. Select either Body or Form under Content*.

PATCH

Updates partial resources of the target URL. Select either Body or Form under Content*.

DELETE

Removes all current representations of the target resource.

Note

Note!

*The Body and Form fields are visible only for request methods POST, PUT and PATCH. See Content for more information.

  • Include query string in URL – This enables a query string in the token URL. 

  • Customize header - This allows for custom headers to be specified.

Option

Description

Include basic access authentication credentials

Select to add the specified username and password.

Incude query string in URL

Select to include a query string in the URL. Add a key and its corresponding value. You can include multiple query strings.

Customize header

Select to customize the headers of the URL and specify multiple keys and their respective values.

The default value for the HTTP headers “content-type” and “accept” is application/json.

You can override the default value for the HTTP header “content-type.”

It is recommended that the default value for the HTTP header “accept” is left unchanged. The HTTP functions only support application/json.

Rw ui expands macro
Rw expand
titleContent

Select Body or Form and add the corresponding details in the content of the request message. You can use Variable Insertion.

Note

Note!

The form input needs to be URL encoded, otherwise, it fails.

HTTP requests use a hardcoded content-type value of ‘application/x-www-form-urlencoded’. 

Expand the examples below to view samples of HTTP request messages for Body or Form:

Expand
titleSample of an HTTP body content message


No Format
{
"name" : "my_username",
"first-name" : "My",
"last-name" : "Username",
"display-name" : "My Username",
"email" : "user@example.test",
"active" : true
}


Expand
titleSample of an HTTP form content message


No Format
name=my_username&first-name=My&last-name=Username&display-name=My%20Username&email=user@example.test&active=true


Results
Anchor
Results
Results

The support for response headers can be enabled by toggling the Enable response headers option.A default value for the key will be added by the engine (httpResponseHeaders) which will match the placeholder for the key input. Configuration is done by filling up the necessary input fields: Result headers Key and Result key.

Note

HTTP Response Headers Support

By enabling response headers, the overall data size of the HTTP packets will also increase. Caching of the body checkbox is tied to the headers. 

This option is available only for the HTTP Client collector and the HTTP Client Processor.

In Result key, you can assign a name to the result that you receive in response to the request. It is recommended to configure the resulting key to make future references of the same response easy and traceable. The default value is httpResponse.

Info

Token Renewal Support

The collector and processor Functions support token renewal, if the servers return a 401 Token Expiry error.