Docs / Strand / connectors/http

HTTP REST API

Direction: Read / Write | Type: http

Comprehensive HTTP connector for REST APIs, webhooks, and HTTP-based services with support for multiple authentication methods, SSL/TLS, and request customization.

Operations

Operation Direction Description
GET Read Retrieve data from the API endpoint
POST Write Send data to the API endpoint
PUT Write Replace data at the API endpoint
PATCH Write Partially update data at the API endpoint
DELETE Write Delete data at the API endpoint
HEAD Read Retrieve headers from the API endpoint

Connector Configuration

Field Required Default Description
URL Yes - Base URL for the API (e.g., https://api.example.com)
Default Method No POST Default HTTP method for requests
Allowed Methods No All Methods available in the node dropdown
Default Headers No - Headers included in all requests (supports Jinja2)
Auth No none Authentication configuration (see below)
Timeout No 30 Request timeout in seconds (1-300)
Follow Redirects No true Automatically follow HTTP redirects
Max Redirects No 10 Maximum number of redirects to follow
Verify SSL No true Verify SSL/TLS certificates
SSL Certificate No - Client certificate for mutual TLS (PEM)
SSL Key No - Client private key for mutual TLS (PEM)
CA Bundle No - Custom CA certificate bundle

Authentication Options

None

No authentication (default).

Basic Authentication

json

{
  "type": "basic",
  "username": "myuser",
  "password": "mypassword"
}

Bearer Token

json

{
  "type": "bearer",
  "token": "your-token-here"
}

API Key

json

{
  "type": "api_key",
  "api_key_header": "Authorization",
  "api_key_value": "your-api-key",
  "api_key_location": "header"
}

Location options: header (default), query

OAuth2

json

{
  "type": "oauth2",
  "oauth2": {
    "token_url": "https://oauth.example.com/token",
    "client_id": "your-client-id",
    "client_secret": "your-client-secret",
    "scope": "read write",
    "grant_type": "client_credentials"
  }
}

Grant types: client_credentials (default), authorization_code

Custom Headers

json

{
  "type": "custom",
  "custom_headers": {
    "X-Custom-Auth": "{{ payload.token }}",
    "X-API-Version": "v2"
  }
}

Node Configuration

When using an HTTP connector in a workflow node, you can override these settings:

Field Description
Endpoint Path appended to the base URL (supports Jinja2)
Method HTTP method (must be in allowed methods)
Headers Additional headers merged with connector headers
Body Request body (supports Jinja2 templating)
Query Parameters URL query parameters

Output

json

{
  "success": true,
  "status": "completed",
  "data": {
    "status_code": 200,
    "url": "https://api.example.com/users",
    "response": {
      "id": 123,
      "name": "John"
    }
  },
  "service": "http",
  "operation": "GET"
}

Access response data in subsequent nodes:

jinja2

{{ payload.data.response.id }}
{{ payload.data.status_code }}

Example

Connector Setup:

json

{
  "url": "https://api.example.com",
  "default_method": "POST",
  "auth": {
    "type": "bearer",
    "token": "secret-token"
  },
  "default_headers": {
    "Content-Type": "application/json"
  }
}

Node Usage:

Result: GET https://api.example.com/users/123 with Bearer token and custom headers.