See also

22 Nov 2024 11:37 AM

Connecting to a Remote HTTP API

Conduit supports two API-related connection types:

  1. Webhook Connection: This type is used when an external system sends data directly to Conduit, where it is then stored. See more.
  2. Remote HTTP API: Conduit initiates a request to an external system to retrieve data, but it does not store the data itself. This setup is particularly valuable for application developers who manage data within their own databases.

In this article we are focusing on Remote HTTP API.

How to Configure the Remote HTTP API Connection

  1. Open the Connections screen in Conduit and click Connect.
  2. Begin by entering a descriptive name to easily identify the connection.
  3. You’ll then access a configuration screen to define the connection settings, which include:
    • URL: The HTTP endpoint address.
    • Request Method: Specify either GET or POST.
    • Request Parameters: Customize the data sent with the request (details in the Request Parameters section below).
    • Columns: Define the data structure expected from the server response (see Columns section for further details).

Request Parameters

These allow customization of data sent with requests to the external server, with four types of parameters:

  • QUERY: Added to the URL as ?param1=value1&param2=value2.
  • HEADER: Passed in the HTTP HEADER.
  • JSON: Sets Content-Type to application/json and includes all JSON parameters in the request body as a JSON string (incompatible with BODY parameters).
  • BODY: Encodes parameters in application/x-www-form-urlencoded format (incompatible with JSON parameters).

Request Parameters Placeholders

Conduit often works with time-interval data (e.g., statistics, tickets). To support this, placeholders can be used in request parameters to automatically substitute dates at runtime. Supported placeholders include:

  • {{days}}: Number of days in a specified period (e.g., 7 for October 15-21).
  • {{date_from}}: Start date in YYYY-MM-DD format.
  • {{date_to}}: End date in YYYY-MM-DD format.
    clipboard-2024-10-30-00-04-30-542Z.png

Columns

Currently, only responses in CSV format are supported.

Define columns:

  • Select Names.
  • Select Data types.

If the response file includes columns beyond those specified in Columns, they will be ignored. Missing columns in the response that are defined in Columns will result in an error.

Limitations

  • Timeout: 15 seconds to connect, 60 seconds to receive a response.
  • File Size: Up to 50 MB.

The Remote HTTP API connection is available within the following Conduit product areas:

  • AI

  • Workflows

  • Dashboards

Sharing to Workspaces

When the "Share to Workspaces" checkbox is selected, the connection becomes available in child workspaces in a read-only mode.

* In order to have this option, configured White-label is required.

Also, when creating a workspace through the API, the ext_id parameter can optionally be provided (e.g., a user ID from the developer's database).

So during requests, the saved ext_id value is substituted into the {{user_id}} parameter.

close