HTTP Connections

HTTP connections enable agents to interact with RESTful APIs and web services.

Recommended: Create and manage connections via the web UI at https://ui.{deployment}.firetigerapi.com/settings/connections

Connection Parameters

An HTTP connection requires the following configuration:

Required Parameters

Parameter Type Description
base_url string Base URL including scheme, host, and optional base path (e.g., https://api.example.com/v1)
allowed_routes string[] List of route patterns that agents can access (see Route Patterns below)

Optional Parameters

Parameter Type Description Default
headers map<string,string> Headers to include in all requests (including authentication) None
max_response_size_bytes int64 Maximum response body size in bytes 10MB (10485760)
timeout_seconds int32 Request timeout in seconds 30 seconds

Important Notes

  • HTTPS Required: The base_url must use HTTPS (not HTTP) for security. HTTP URLs will be rejected.
  • Maximum Limits:
    • max_response_size_bytes cannot exceed 10MB (10485760 bytes)
    • timeout_seconds cannot exceed 300 seconds (5 minutes)

Route Patterns

The allowed_routes parameter controls which endpoints agents can access. Uses http.ServeMux syntax.

Pattern types:

"allowed_routes": [
  "GET /api/status",           // Exact match
  "GET /api/users/",           // Prefix match (trailing slash)
  "GET /api/users/{id}",       // Wildcard (single segment)
  "GET /files/{path...}"       // Wildcard (remaining segments)
]

Supported methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS

Authentication

Configure authentication using the headers parameter:

Bearer Token:

"headers": {
  "Authorization": "Bearer sk-your-token"
}

Basic Auth:

"headers": {
  "Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ="
}

API Key:

"headers": {
  "X-API-Key": "your-key"
}

Description Field

Document the API endpoints and usage patterns.

Example:

Databricks API for cluster management.

Endpoints:
- GET /api/2.0/clusters/list - List all clusters
- GET /api/2.0/clusters/get?cluster_id=<id> - Get cluster details
- POST /api/2.0/clusters/start - Start cluster (body: {"cluster_id": "..."})
- POST /api/2.0/clusters/terminate - Stop cluster (body: {"cluster_id": "..."})

Response format: JSON
Rate limit: 30 req/min

Example Connection

{
  "display_name": "Databricks API",
  "description": "Databricks API for cluster management...",
  "connection_details": {
    "http": {
      "base_url": "https://api.databricks.com",
      "allowed_routes": [
        "GET /api/2.0/clusters/list",
        "GET /api/2.0/clusters/get",
        "POST /api/2.0/clusters/start"
      ],
      "headers": {
        "Authorization": "Bearer dapi123..."
      },
      "max_response_size_bytes": 5242880,
      "timeout_seconds": 30
    }
  }
}

Best Practices

  • Least privilege - Only include necessary routes in allowed_routes
  • Document endpoints - List available endpoints and response formats in description
  • Include rate limits - Document API rate limits in the description
  • HTTPS required - All connections must use HTTPS

This site uses Just the Docs, a documentation theme for Jekyll.