Skip to main content
The HTTP Request command (Command Type: 1001) enables you to make HTTP/HTTPS requests to APIs and web services. This command is essential for fetching data from REST APIs, web services, and other HTTP-based endpoints.

Overview

The HTTP Request command provides functionality for:
  • Making GET, POST, PUT, DELETE, and other HTTP method requests
  • Configuring request headers, query parameters, and request bodies
  • Handling authentication and authorization
  • Managing timeouts and error handling
  • Processing HTTP responses

Command Type

Command Type ID: 1001

Parameters

Usage Examples

Basic GET Request

POST Request with Body

GET Request with Query Parameters

Request with Authentication

Request with Project Variables

Variable Support

The HTTP Request command supports variable interpolation in:
  • URLs: Use @{VARIABLE} in URLs
  • Headers: Use @{VARIABLE} or %{SECRET} in header values
  • Query Parameters: Use variables in query parameter values
  • Request Body: Use variables in request body content

Variable Types

  • Project Variables: @{PROJECT_ID}, @{RUN_ID}, @{START_TIMESTAMP}
  • Secrets: %{API_KEY}, %{API_TOKEN}, %{PROXY_PASSWORD}
  • Session Variables: #{UUID} for session tracking
  • Event Variables: ${event_id} for event-specific values

Response Handling

The HTTP Request command returns the HTTP response which can be used by subsequent commands:

Response Structure

Using Response Data

The response from HTTP Request can be used as input for subsequent commands:

Error Handling

The HTTP Request command handles various error scenarios:
  • Timeout Errors: Returns error if request exceeds timeout
  • Network Errors: Handles connection failures
  • HTTP Errors: Returns error status for non-2xx responses
  • Invalid URLs: Validates URL format before request

Best Practices

  • Use Secrets for Credentials: Always use %{SECRET_NAME} for API keys and passwords
  • Set Appropriate Timeouts: Configure timeouts based on expected response times (default: 30 seconds)
  • Handle Errors: Implement error handling for failed requests
  • Use Project Variables: Leverage @{PROJECT_ID} and @{RUN_ID} for tracking
  • Validate Responses: Always validate response structure before processing
  • Use HTTPS: Prefer HTTPS URLs for secure communication
  • Set Content-Type: Explicitly set Content-Type header for POST/PUT requests

Common Use Cases

  • API Integration: Fetch data from REST APIs
  • Web Scraping: Retrieve HTML content from web pages
  • Data Synchronization: Pull data from external services
  • Authentication: Handle API authentication flows
  • Webhook Processing: Send data to webhook endpoints

Troubleshooting

Request Timeout

If requests are timing out:
  • Increase the timeout parameter value
  • Check network connectivity
  • Verify the target server is accessible

Authentication Errors

If authentication fails:
  • Verify secrets are correctly configured
  • Check API key/token format
  • Ensure headers are properly formatted

Invalid Response

If response structure is unexpected:
  • Check response status code
  • Verify Content-Type header
  • Validate response body format