# HTTP Request

{% hint style="info" %}
See the changelog of this Action type [here](/actions/http-request.md).
{% endhint %}

## Overview

The **HTTP Request** action allows you to configure and execute HTTP requests with custom settings for methods, headers, authentication, TLS, and more.

<figure><picture><source srcset="/files/4KTlG8xwsQVzwQ4O9h3p" media="(prefers-color-scheme: dark)"><img src="/files/TM7q9Yxvzx5OvjC08UjK" alt=""></picture><figcaption></figcaption></figure>

{% hint style="warning" %}
In order to configure this action, you must first link it to a Listener. Go to [Building a Pipeline ](/the-workspace/pipelines/building-a-pipeline.md)to learn how to link.
{% endhint %}

## Ports

These are the input and output ports of this Action:

<details>

<summary>Input ports</summary>

* **Default port** - All the events to be processed by this Action enter through this port.

</details>

<details>

<summary>Output ports</summary>

* **Default port** - Events are sent through this port if no error occurs while processing them.
* **Error port** - Events are sent through this port if an error occurs while processing them.

</details>

## Configuration

{% stepper %}
{% step %}
Find **HTTP Request** in the **Actions** tab (under the **Advanced** group) and drag it onto the canvas. Link it to the required [Listener](https://docs.onum.com/the-workspace/listeners) and [Data sink](https://docs.onum.com/the-workspace/pipelines/data-sinks).
{% endstep %}

{% step %}
To open the configuration, click the Action in the canvas and select **Configuration**.
{% endstep %}

{% step %}
Enter the required parameters:

<table><thead><tr><th width="170.140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>HTTP Method</strong><mark style="color:red;"><strong>*</strong></mark></td><td>The HTTP method for the request. Choose between <strong>GET</strong>, <strong>POST</strong>, <strong>PUT</strong>, <strong>DELETE</strong>, or <strong>PATCH</strong>.</td></tr><tr><td><strong>Server URL</strong><mark style="color:red;"><strong>*</strong></mark></td><td>The target URL for the HTTP request.</td></tr><tr><td><strong>Field that holds the request body</strong></td><td>Enter the name of the field that includes the request body.</td></tr><tr><td><strong>Field where the response will be stored</strong></td><td>Enter the name of the field that will store the HTTP response.</td></tr><tr><td><strong>HTTP Headers</strong></td><td>Optionally, you can enter a map of header key-value pairs to include in the request.</td></tr><tr><td><strong>Timeout (seconds)</strong></td><td>Enter the timeout for the HTTP request in seconds.</td></tr><tr><td><strong>Disable Redirects</strong></td><td>Select <strong>true</strong> to disable HTTP redirects or <strong>false</strong> to ignore.</td></tr><tr><td><strong>Content-Type</strong></td><td><p>Set the request content-type:</p><p></p><ul><li><strong>text/plain</strong> - Plain text with no formatting.</li><li><strong>application/json -</strong> Data in JSON format. This is the default value.</li><li><strong>application-xml</strong> - Data in XML format.</li><li><strong>text/html -</strong> Data in HTML format.</li></ul></td></tr></tbody></table>

**Authentication** **Configuration**

Choose the type of authentication for the request.

<table><thead><tr><th width="170.40625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Authentication Type</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Choose between <strong>None</strong>, <strong>Basic</strong>, <strong>Bearer</strong>, or <strong>API Key</strong>. </td></tr></tbody></table>

**Authentication Credentials**

Depending on the option you chose above, you must enter the required authentication information in this section:

<table><thead><tr><th width="169.73046875">Parameter</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Basic Authentication</strong></td><td><strong>Username</strong> and <strong>Password</strong> for basic authentication. For the password, choose one of the secrets defined in your Tenant or create a new one by clicking <strong>New secret</strong>. <br>Learn more about secrets <a href="/pages/FfCzDaGScFIbdV0xjasl">in this section</a>.</td><td></td></tr><tr><td><strong>Bearer Token</strong></td><td>Token for Bearer authentication. Choose one of the secrets defined in your Tenant or create a new one by clicking <strong>New secret</strong>. <br>Learn more about secrets <a href="/pages/FfCzDaGScFIbdV0xjasl">in this section</a>.</td><td></td></tr><tr><td><strong>API Key</strong></td><td>Define the <strong>API Key Name</strong> and <strong>API Key</strong> for API Key configuration. For the API key, choose one of the secrets defined in your Tenant or create a new one by clicking <strong>New secret</strong>.<br>Learn more about secrets <a href="/pages/FfCzDaGScFIbdV0xjasl">in this section</a>.</td><td></td></tr></tbody></table>

**Bulk Configuration**

<table><thead><tr><th width="168.69140625">Parameter</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Bulk allow</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Set this to <strong>true</strong> and configure the options below if you want to set bulk sending in your HTTP requests. Otherwise, set it to <strong>false</strong>.</td><td></td></tr><tr><td><strong>Store as</strong><mark style="color:red;"><strong>*</strong></mark></td><td><p>Decide how to store events in your responses. Choose between:</p><p></p><ul><li><strong>Delimited</strong> - Events in a batch are stored separated by a delimiter. Set the required delimiter in the option below. The default option is newline (<code>\n</code>).</li><li><strong>Without Delimeter</strong> - Events are concatenated without any separator.</li><li><strong>JSON Array</strong> - Events are structured in a JSON array.</li></ul></td><td></td></tr><tr><td><strong>Events per batch</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Set the number of individual events per bulk request.</td><td></td></tr><tr><td><strong>Maximum number of buffers per server URL</strong></td><td>Set the maximum number of buffers per server URL. The default value is <code>25</code>, and the maximum value is <code>50</code>.</td><td></td></tr><tr><td><strong>Event time limit</strong></td><td>Time in seconds to send the events. </td><td></td></tr></tbody></table>

**Rate Limiter Configuration**

Establish a limit for the number of HTTP requests permitted per second.&#x20;

<table><thead><tr><th width="169.69140625">Parameter</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Number of requests per second</strong></td><td>Enter the maximum number of requests that can be sent per second. The minimum is <em>1</em>.</td><td></td></tr></tbody></table>

**TLS Configuration**

<table><thead><tr><th width="169.89453125">Parameter</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Allow TLS configuration</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Set this option to <strong>true</strong> if you need to configure the TLS config of the Data sink. Otherwise, set it to <strong>false</strong>.</td><td></td></tr><tr><td><strong>Certificate</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Choose the predefined TLS certificate.</td><td></td></tr><tr><td><strong>Private Key</strong><mark style="color:red;"><strong>*</strong></mark></td><td>The private key of the corresponding certificate.</td><td></td></tr><tr><td><strong>CA Chain</strong><mark style="color:red;"><strong>*</strong></mark></td><td>The path containing the CA certificates.</td><td></td></tr><tr><td><strong>Minimum TLS version</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Minimum TLS version required for incoming connections. The default version is <code>v1.2</code></td><td></td></tr></tbody></table>

**Proxy Configuration**

If your organization uses proxy servers, set it using these options:

<table><thead><tr><th width="170.31640625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>URL</strong></td><td>Enter the required proxy URL.</td></tr><tr><td><strong>Username</strong></td><td>Enter the username used in the proxy.</td></tr><tr><td><strong>Password</strong></td><td>Enter the password used in the proxy.</td></tr></tbody></table>

**Retry Configuration**

Set how you want to manage retry attempts in case of errors in the requests:

<table><thead><tr><th width="170.3125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Max attempts</strong></td><td>Set the maximum number of attempts before returning an error. The minimum value is <em>1</em>.</td></tr><tr><td><strong>Wait between attempts</strong></td><td>Choose the milliseconds to wait between attempts in case of an error. The minimum value is <em>100.</em></td></tr><tr><td><strong>Backoff interval</strong></td><td>Define how the wait time should increase between attempts, in seconds. The minimum value is <em>1</em>.</td></tr></tbody></table>
{% endstep %}

{% step %}
Click **Save** to complete.
{% endstep %}
{% endstepper %}

## Example

```
{
    "payloadField": "correlationIDKey",
    "outField": "outputField",
    "serverUrl": "http://localhost:8080/${path_from_event}?${impactKey}=${correlationIDKey}",
    "method": "POST",
    "authentication": {
        "authType": "apiKey",
        "credentials": {
            "apiKey": {
                "apiKeyName": "x-api-key",
                "apiKeyValue": {
                    "id": "apiKey",
                    "value": "ad1dewfwef2321323"
                }
            }
        }
    }
}
```

Click **Save** to complete.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/pipelines/actions/advanced/http-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
