http calls a JSON REST API and hands the parsed response to the rest of the
tree. Most tools are built around one.
Config
The operation also takes
on_error, silent, publish_fields and
background_execution — see the operation tree.
The body
An object or array is sent as JSON. A string is sent as the raw body, so set your ownContent-Type. null sends no body. A value that is exactly one token
keeps its type, so "{{args.party_size}}" above sends the number 4, not "4".
Headers and query
A header or query value that is exactly one token and resolves to nothing — an optional argument the model left out, auserdata key never written — is left
out of the request. "query": {"status": "{{args.status}}"} sends no status
filter when the model gives none. A token inside longer text resolves to an empty
string instead: id={{userdata.customer_id}} sends id=.
A header that resolves to a non-ASCII value (a caller’s name like José) or one
containing a line break fails the operation with
the '<name>' header resolved to a value an HTTP header cannot carry.
Authentication
Keep credentials in workspace secrets and read them as{{secrets.NAME}}. Only the secrets a tree references are loaded, the model
never sees them, and test runs redact them. A secret a published tool references
cannot be deleted.
What counts as failure
The response must be JSON.
Point the URL at the endpoint itself. A URL that redirects (a missing trailing
slash,
http to https, apex to www) does not fail; the publish_fields
after it do, with publish field path '…' was not found in operation output.
There are no retries. To keep a flaky endpoint from failing the tool, set
on_error: "continue" and handle the missing values downstream.
Network rules
Onlyhttp and https are allowed. The host is resolved before the request,
and every address it resolves to must be public; the connection is then
pinned to the vetted address, so a second DNS answer cannot redirect it.
An endpoint on your private network is not reachable from a tool. Expose it on a
public hostname with its own authentication.
Fire and forget
When nothing downstream needs the response, setbackground_execution: true:
the tree moves on immediately, nothing is published, and a failure only reaches
our logs.
Next
Templating and data
The template roots and
publish_fields.The code operation
Reshaping a response before anything uses it.
Testing and publishing
See the exact request sent and the response received.