---
title: REST API Gen 2
slug: bhdo/rest-api-gen-2
createdAt: 2026-10-02T17:07:52.500Z
---

The REST API connector lets Belden Horizon Data Operations make custom API calls to any external REST endpoint and publish the response back onto Message Broker.

## Supported communication

- Outbound (publish LE data to REST Server): Yes
- Local topic subscription (trigger the outbound request from an LE topic): Yes
- Response capture (publish the REST response to a local topic): Yes
- Analytics IT Hub support: Yes

## Authentication

- None
- Basic (username / password)
- Bearer / Token
- API Key (custom header)
- OAuth2 Client Credentials with automatic refresh
- Mutual TLS (client certificate / key)

## Configurations

| **Field**                        | **Details**                                                                                                                                                                            | **Required** |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Name                             | Name of the connector instance.                                                                                                                                                        | Yes          |
| Endpoint / Base URL              | Target REST endpoint, e.g. [https://api.example.com](https://api.example.com)                                                                                                          | Yes          |
| HTTP Method                      | HTTP verb used for every request: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.                                                                                                          | Yes          |
| Authentication                   | Scheme used to authenticate to the endpoint. Selecting a mode reveals the credential fields it needs.                                                                                  | Yes          |
| Username                         | Username for Basic authentication.                                                                                                                                                     | No           |
| Password                         | Password for Basic authentication.                                                                                                                                                     | No           |
| Token                            | Sent as `Authorization: Bearer <token>`.                                                                                                                                               | No           |
| API Key Header Name              | Header name that carries the API key.                                                                                                                                                  | No           |
| API Key Value                    | Secret value sent in the header named above.                                                                                                                                           | No           |
| OAuth2 - Token Endpoint          | OAuth2 token endpoint URL.                                                                                                                                                             | No           |
| OAuth2 - Client ID               | OAuth2 client ID.                                                                                                                                                                      | No           |
| OAuth2 - Client Secret           | Client secret credential paired with the Client ID.                                                                                                                                    | No           |
| OAuth2 - Scope                   | OAuth2 scope, comma separated.                                                                                                                                                         | No           |
| CA Certificate (PEM)             | Optional custom CA certificate (PEM) used to verify the server.                                                                                                                        | No           |
| Client Certificate (PEM)         | Client certificate for mutual TLS.                                                                                                                                                     | No           |
| Client Key (PEM)                 | Client private key for mutual TLS.                                                                                                                                                     | No           |
| Insecure skip verify             | When enabled, the client does not verify the server's certificate chain or host name.                                                                                                  | No           |
| Headers                          | Custom HTTP headers sent with each request as key-value pairs. Example: `Authorization: Bearer <token>` or `Content-Type: application/json`.                                           | No           |
| Params                           | URL query string parameters.                                                                                                                                                           | No           |
| Mapping                          | Request body / payload mapping.                                                                                                                                                        | No           |
| Response Topic                   | NATS topic the response is published to.                                                                                                                                               | No           |
| Response Mode                    | `body_only` publishes `correlationId`, `statusCode`, and `body`; `full_metadata` also includes `headers`, `latencyMs`, and `error`.                                                    | No           |
| Parallel Publish Count           | Number of messages published in parallel. Higher values increase throughput and resource usage.                                                                                        | No           |
| Request Timeout (s)              | Per-request timeout in seconds.                                                                                                                                                        | No           |
| Retry Count                      | Maximum number of retries on transport errors, 5xx, or 429.                                                                                                                            | No           |
| Retry Backoff                    | Retry backoff strategy. Retry-After is honored on 429.                                                                                                                                 | No           |
| Connection Checking Interval (s) | How often, in seconds, the connector checks the REST endpoint for connectivity.                                                                                                        | No           |
| Throttling limit                 | Set a limit on the number of outbound messages per second. If sending data to a server that has restrictions on the rate of incoming messages, this ensures that no messages are lost. | No           |

## Persistent storage configurations

| **Field**                     | **Details**                                                                                                                                                                                          | **Required** |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Persistent storage            | If enabled, messages in the outbound queue are stored on disk. If there are interruptions in connection or power loss, messages are retained and eventually sent when the connection is restored.    | No           |
| Persistent storage size limit | Set the size limit for storing persisted data in GB.                                                                                                                                                 | No           |
| Queue mode                    | Select the sequence of data transfer: `FIFO` or `LIFO`. Selecting `FIFO` (First In First Out) sends the earliest message first. Selecting `LIFO` (Last In First Out) sends the latest message first. | No           |

## Response envelope

The response is published to the configured Response Topic. In `body_only` mode:

```json
{
  "correlationId": "...",
  "statusCode": 200,
  "body": { ... }
}
```

In `full_metadata` mode:

```json
{
  "correlationId": "...",
  "statusCode": 200,
  "headers": { "Content-Type": "application/json" },
  "latencyMs": 142,
  "body": { ... },
  "error": null
}
```

JSON response bodies are parsed and forwarded as objects. Non-JSON bodies are forwarded as strings. On error, the `error` field carries a structured, secret-free message.
