Back to Genai Toolbox

HTTP Source

docs/en/integrations/http/source.md

1.1.02.5 KB
Original Source

About

The HTTP Source allows Toolbox to retrieve data from arbitrary HTTP endpoints. This enables Generative AI applications to access data from web APIs and other HTTP-accessible resources.

Available Tools

{{< list-tools >}}

Example

yaml
kind: source
name: my-http-source
type: http
baseUrl: https://api.example.com/data
timeout: 10s # default to 30s
headers:
  Authorization: Bearer ${API_KEY}
  Content-Type: application/json
queryParams:
  param1: value1
  param2: value2
# returnFullError: false
# disableSslVerification: false

{{< notice tip >}} Use environment variable replacement with the format ${ENV_NAME} instead of hardcoding your secrets into the configuration file. {{< /notice >}}

Reference

fieldtyperequireddescription
typestringtrueMust be "http".
baseUrlstringtrueThe base URL for the HTTP requests (e.g., https://api.example.com).
timeoutstringfalseThe timeout for HTTP requests (e.g., "5s", "1m", refer to ParseDuration for more examples). Defaults to 30s.
headersmap[string]stringfalseDefault headers to include in the HTTP requests.
queryParamsmap[string]stringfalseDefault query parameters to include in the HTTP requests.
returnFullErrorboolfalseInclude raw upstream response bodies in error messages for non-2xx responses. Defaults to false.
disableSslVerificationboolfalseDisable SSL certificate verification. This should only be used for local development. Defaults to false.