HTTP Steps

Register an existing HTTP endpoint as a Step using direct JSON bodies, URL placeholders, and execution headers.

Invocation

Each HTTP action chooses how it reports its result:

ModeBehavior
syncThe invocation response carries the result. The default
asyncThe service accepts the work, then reports the result through a callback

Invocation and compensation choose their modes independently. See Async Steps for the callback contract.

This Step omits mode, so its invocation is synchronous:

{
  "id": "create-order",
  "type": "service",
  "http": {
    "invoke": {
      "method": "POST",
      "endpoint": "https://api.example.com/customers/{customer_id}/orders",
      "timeout": 5000
    }
  },
  "attributes": {
    "customer_id": {"role": "required", "type": "string"},
    "items": {"role": "required", "type": "array"},
    "order_id": {"role": "output", "type": "string"}
  }
}

Argyll resolves {customer_id} from the Step’s invocation names. POST and PUT send every input as one JSON object whose keys are those invocation names, including the ones a placeholder already consumed:

{
  "customer_id": "cust-456",
  "items": [
    { "sku": "ABC", "quantity": 2 }
  ]
}

GET and DELETE send an empty body, so they carry their data in the endpoint placeholders. A successful synchronous response returns the outputs in the same direct form:

{
  "order_id": "ord-123"
}

An Attribute’s optional mapping.name controls its invocation name when the service’s field name differs from the name used in Flow state.

Execution Headers

HeaderPurpose
Argyll-Flow-IDFlow identity and correlation
Argyll-Step-IDStep identity
Argyll-Receipt-TokenWork Item identity and idempotency key
Argyll-Webhook-URLCompletion URL for async actions

Failures

Return a non-2xx status with application/problem+json:

{
  "type": "about:blank",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "Customer not found"
}

Argyll treats 4xx as permanent and 5xx or transport failures as retryable. Retries covers attempts and backoff; Compensation covers reversible side effects.