Skip to content
Talk to our solutions team

Execution

Running commands, containers and code — locally, over SSH, and on Kubernetes. Every parameter with its type, default and description, plus worked examples.

Execute shell scripts with templating and environment support.

ParameterTypeRequiredDefaultDescription
scriptstringYes-Shell script to execute (supports multiline)
shellstringNobashShell to use (bash, sh, zsh)
workingdirstringNo./Working directory for command execution
userstringNo-User to run the command as (requires privileges)
envmapNo-Environment variables to inject (also available in Liquid templates as {{VAR}})
inheritenvboolNotrueInherit parent process environment
interactiveboolNofalseRun in interactive mode (-il flag)
historyboolNofalseEnable shell history recording
forkboolNofalseRun in separate process group (survives parent Ctrl+C)
setvarstringNo-Variable to store stdout output

When shell tasks run in parallel via Map nodes, output is automatically buffered per task to prevent interleaving. Each task’s stdout/stderr is captured and flushed as a contiguous block when the command completes. This is handled internally — no configuration is needed.

name: hello-world
tasks:
- name: say-hello
shell: |
echo "Hello, World!"
date
name: build-project
vars:
node_env: production
tasks:
- name: build
shell:
script: |
npm ci
npm run build
env:
NODE_ENV: "{{node_env}}"
CI: "true"
name: capture-output
tasks:
- name: get-hostname
shell:
script: hostname
setvar: server_name
- name: show-hostname
print:
message: "Server: {{server_name}}"

Run scripts in an isolated environment without inheriting parent environment variables:

name: isolated-build
tasks:
- name: clean-build
shell:
script: |
echo "PATH=$PATH"
echo "BUILD_MODE=$BUILD_MODE"
./build.sh
env:
PATH: "/usr/bin:/bin"
BUILD_MODE: "isolated"
inheritenv: false

With inheritenv: false, only the explicitly defined env variables are available.

Run a shell process that continues even if the parent is terminated (Ctrl+C):

name: background-daemon
tasks:
- name: start-daemon
shell:
script: |
nohup ./my-daemon.sh > /tmp/daemon.log 2>&1 &
echo "Daemon started"
fork: true

By default (fork: false), shell processes terminate when the parent receives Ctrl+C. Set fork: true for daemon-style processes that should survive parent termination.

Run commands in a specific directory. The task-level workingdir overrides the workflow-level workingdirectory.

name: build-in-dir
tasks:
- name: build-frontend
shell:
script: |
npm ci
npm run build
workingdir: /app/frontend
- name: build-backend
shell:
script: |
go build -o server ./cmd/server
workingdir: /app/backend

Local shell execution functions.

FunctionDescription
shell.execute()Execute a shell script
shell.open()Open a persistent shell session
shell.run()Run a command in an open session
shell.close()Close a persistent shell session
ParameterTypeDefaultDescription
scriptstring-Shell script to execute
shellstring"bash"Shell to use
workingDirstring"./"Working directory
userstring-User to run as
envmap-Environment variables (also available in Liquid templates as {{VAR}})
inheritenvbooltrueInherit parent environment
interactiveboolfalseRun in interactive mode
historyboolfalseEnable shell history
forkboolfalseRun in separate process group
templateVarsmap-Liquid template variables
streambooltrueStream output to stdout/stderr
captureboolfalseCapture output to return it
// Simple command (string form)
shell.execute("echo hello")
// With options (map form)
shell.execute({
script: `
npm ci
npm run build
`,
env: {
NODE_ENV: "production",
CI: "true"
}
})
// Isolated environment
shell.execute({
script: "env | wc -l",
env: { BUILD_MODE: "isolated" },
inheritenv: false
})
// Capture output
let result = shell.execute({
script: "hostname",
capture: true
})
log(result.output)
// Background process
shell.execute({
script: "nohup ./daemon.sh &",
fork: true
})

Enhanced shell execution with conditional commands, output extraction, and check expressions.

Aliases: supershell, superbash

ParameterTypeRequiredDefaultDescription
commandslistYes-List of commands to execute (string or object format)
shellstringNobashShell to use (bash, sh, zsh)
workingdirstringNo./Working directory for command execution
sudoboolNofalseRun commands with sudo
onerrorstringNoterminateError behavior: terminate, continue
historyboolNofalseInclude command history in output
envmapNo-Environment variables to inject (also available in Liquid templates and check expressions as {{VAR}})
inheritenvboolNotrueInherit parent process environment
forkboolNofalseRun in separate process group (survives parent Ctrl+C)
PropertyTypeDescription
commandstringThe shell command to execute
teststringShell test condition (bash [ ]) — run only if test succeeds
test!stringNegated shell test — run only if test fails
checkstringJavaScript expression (with env object) — run only if true
check!stringNegated JavaScript check — run only if false
extractstring/mapExtract output to variable(s). String: full output. Map: regex patterns (first capture group if present, otherwise full match)

test / test! — Shell test expressions evaluated by bash’s [ ] command:

- command: npm install
test: -f package.json # Runs: [ -f package.json ]

Common shell test operators:

  • -f file — File exists and is regular file
  • -d dir — Directory exists
  • -e path — Path exists (file or directory)
  • -x file — File is executable
  • -s file — File exists and size > 0
  • -z str — String is empty
  • -n str — String is not empty

check / check! — JavaScript expressions with access to workflow variables via env:

- command: ./deploy.sh
check: env.environment === 'production' && env.replicas > 2

The env object contains all workflow variables, enabling complex logic, numeric comparisons, and string operations.

When to use which:

  • Use test for file/directory checks and simple shell conditions
  • Use check for complex logic, numeric comparisons, or accessing nested workflow variables
name: supershell-simple
tasks:
- name: run-commands
supershell:
commands:
- echo "Starting deployment"
- cd /app && git pull
- npm install
name: supershell-test
tasks:
- name: conditional-deploy
supershell:
commands:
- command: git pull origin main
test: -d .git
- command: npm install
test: -f package.json
- command: pip install -r requirements.txt
test: -f requirements.txt
name: supershell-test-negated
tasks:
- name: setup-if-missing
supershell:
commands:
- command: git clone https://github.com/user/repo.git
test!: -d repo
- command: mkdir -p logs
test!: -d logs
name: supershell-check
vars:
environment: production
deploy_enabled: true
tasks:
- name: conditional-deploy
supershell:
commands:
- command: ./deploy.sh
check: env.environment === 'production' && env.deploy_enabled === true
- command: ./notify.sh
check: env.notify_slack === true
name: supershell-extract
tasks:
- name: get-system-info
supershell:
commands:
- command: hostname
extract: server_name
- command: "cat /etc/os-release | grep VERSION_ID"
extract:
os_version: 'VERSION_ID="(.+)"'
- command: free -m | grep Mem
extract:
total_memory: 'Mem:\s+(\d+)'
used_memory: 'Mem:\s+\d+\s+(\d+)'
- name: show-info
print:
message: "Server {{server_name}} running OS {{os_version}} with {{total_memory}}MB RAM"
name: supershell-continue
tasks:
- name: cleanup-tasks
supershell:
onerror: continue
commands:
- rm -f /tmp/cache/*
- rm -f /tmp/sessions/*
- rm -f /tmp/logs/*.old
name: supershell-env
vars:
node_env: production
tasks:
- name: build-with-env
supershell:
env:
NODE_ENV: "{{node_env}}"
CI: "true"
BUILD_ID: "12345"
commands:
- echo "Building with NODE_ENV=$NODE_ENV"
- npm ci
- npm run build
name: supershell-isolated
tasks:
- name: clean-build
supershell:
env:
PATH: "/usr/bin:/bin"
HOME: "/tmp/build"
inheritenv: false
commands:
- echo "Running in isolated environment"
- echo "PATH=$PATH"

Run supershell commands that continue even if the parent process is terminated:

name: supershell-daemon
tasks:
- name: start-services
supershell:
fork: true
commands:
- command: nohup ./service-a.sh > /tmp/service-a.log 2>&1 &
- command: nohup ./service-b.sh > /tmp/service-b.log 2>&1 &
- echo "Services started in background"

Interactive shell session functions.

FunctionDescription
supershell.execute()Execute a list of commands with conditions and extraction
ParameterTypeDefaultDescription
commandsarray-List of commands (string or object)
shellstring"bash"Shell to use
workingDirstring"./"Working directory
userstring-User to run as
sudoboolfalseRun with sudo
onErrorstring"terminate"Error handling: "terminate" or "continue"
historyboolfalseEnable shell history
envmap-Environment variables (also available in Liquid templates and checks)
inheritenvbooltrueInherit parent environment
forkboolfalseRun in separate process group
templateVarsmap-Liquid template variables
PropertyTypeDescription
commandstringThe shell command to execute
teststringShell test condition
testNegatedboolNegate the test condition
checkstringJavaScript check expression
checkNegatedboolNegate the check expression
extractstring/mapExtract output to variable(s). String: full output. Map: regex (first capture group if present)
// Simple commands (string array)
supershell.execute({
commands: [
"echo 'Starting'",
"npm install",
"npm run build"
]
})
// With conditions and extraction
supershell.execute({
commands: [
{ command: "git pull", test: "-d .git" },
{ command: "npm install", test: "-f package.json" },
{ command: "hostname", extract: "server_name" }
]
})
// With environment variables
supershell.execute({
commands: [
"echo NODE_ENV=$NODE_ENV",
"npm run build"
],
env: {
NODE_ENV: "production",
CI: "true"
}
})
// Isolated environment
supershell.execute({
commands: ["env | wc -l"],
env: { BUILD_MODE: "isolated" },
inheritenv: false
})
// Continue on error
supershell.execute({
commands: [
"rm -f /tmp/cache/*",
"rm -f /tmp/old-logs/*"
],
onError: "continue"
})
// Result handling
let result = supershell.execute({
commands: [
{ command: "hostname", extract: "host" },
{ command: "date", extract: "timestamp" }
]
})
log(result.extractedVars.host)
log(result.extractedVars.timestamp)

Remote command execution over SSH.

ParameterTypeRequiredDefaultDescription
hoststringYes-SSH server (host:port)
usernamestringYes-SSH username
commandsstringYes-Commands to execute
ParameterTypeRequiredDescription
privatekeypathstringNoPath to private key file
passwordstringNoPassword for password auth
keypassphrasestringNoPassphrase for encrypted key
authmethodstringNoAuth method: key, password, agent
ParameterTypeRequiredDescription
jumphoststringNoJump host address (host:port)
jumpusernamestringNoUsername for jump host
jumpprivatekeypathstringNoPrivate key for jump host
jumpkeypassphrasestringNoPassphrase for jump host key
ParameterTypeDefaultDescription
timeoutstring2mConnection timeout
ptyboolfalseRequest pseudo-terminal
agentforwardingboolfalseEnable SSH agent forwarding
stricthostkeycheckingboolfalseEnable host key verification
name: ssh-basic
tasks:
- name: run-remote
ssh:
host: server.example.com:22
username: deploy
privatekeypath: ~/.ssh/id_rsa
commands: |
cd /app
git pull origin main
npm install
npm run build
name: ssh-jump
tasks:
- name: run-internal
ssh:
host: internal-server.private:22
username: deploy
privatekeypath: ~/.ssh/id_rsa
jumphost: bastion.example.com:22
jumpusername: admin
jumpprivatekeypath: ~/.ssh/bastion_key
commands: hostname
name: ssh-sudo
tasks:
- name: run-sudo
ssh:
host: server.example.com:22
username: deploy
privatekeypath: ~/.ssh/id_rsa
pty: true
commands: |
sudo apt-get update
sudo apt-get upgrade -y

SSH remote execution functions.

FunctionDescription
ssh.connect()Establish SSH connection, returns a clientId handle
ssh.execute()Execute commands on remote host
ssh.upload()Upload file to remote host (SCP)
ssh.download()Download file from remote host (SCP)
ssh.close()Close SSH connection

ssh.connect() returns a clientId handle that ssh.execute() and ssh.close() can reuse. ssh.upload() and ssh.download() always open and close their own connection; pass the connection parameters directly.

Accepted by ssh.connect(), and by ssh.execute() / ssh.upload() / ssh.download() when no clientId is supplied.

ParameterTypeDefaultDescription
hoststring-SSH server (host:port)
userstring-SSH username
passwordstring-Password for authentication
keyPathstring-Path to private key file
keyPassphrasestring-Passphrase for encrypted key
authMethodstringinferred"key", "password", or "agent"
timeoutint-Connection timeout in seconds
strictHostKeyCheckingboolfalseVerify host keys against known_hosts
knownHostsPathstring-Path to known_hosts file
agentForwardingboolfalseEnable SSH agent forwarding
ParameterTypeDefaultDescription
clientIdstring-Handle from ssh.connect() (or pass connection params instead)
commandsstring-Commands to execute
envmap-Environment variables
requestPTYboolfalseRequest pseudo-terminal
ptyTerminalstring-Terminal type for PTY (e.g. "xterm")
ptyWidthint-Terminal width
ptyHeightint-Terminal height

Accepts the connection parameters above, plus:

ParameterTypeDefaultDescription
localPathstring-Local file path
remotePathstring-Remote file path
recursiveboolfalseRecursive transfer
preserveModeboolfalsePreserve file permissions
// Connect, run commands, close
let conn = ssh.connect({
host: "server.example.com:22",
user: "deploy",
keyPath: "~/.ssh/id_rsa"
})
if (conn.success) {
let result = ssh.execute({
clientId: conn.clientId,
commands: `
cd /app
git pull origin main
npm install
`
})
log(result)
ssh.close({ clientId: conn.clientId })
}
// Upload file (opens its own connection)
ssh.upload({
host: "server.example.com:22",
user: "deploy",
keyPath: "~/.ssh/id_rsa",
localPath: "./dist/app.tar.gz",
remotePath: "/opt/deploy/app.tar.gz"
})
// Download file (opens its own connection)
ssh.download({
host: "server.example.com:22",
user: "deploy",
keyPath: "~/.ssh/id_rsa",
localPath: "./backup.sql",
remotePath: "/var/backups/db.sql"
})
// Execute with PTY for sudo
ssh.execute({
clientId: conn.clientId,
commands: "sudo systemctl restart nginx",
requestPTY: true,
ptyTerminal: "xterm"
})

Container operations. Single task with an op: discriminator. Shells out to podman by default; the binary path is configurable per call. The same task is registered under both docker: (primary name, more familiar) and podman: (alias) — pick whichever fits your workflow.

The argument shapes work against the docker CLI too — set binary: docker if you need it.

FieldTypeRequiredDefaultDescription
opstringNo"build"build / push / pull / run / login / tag / inspect / rm
binarystringNopodmanContainer CLI path
setvarstringNoCapture the result map into this workflow variable
FieldTypeDescription
successboolWhether the command exited 0
exitCodeintProcess exit code
outputstringCaptured stdout
stderrstringCaptured stderr
errorstringFailure message

Verb-specific: imageId (build/pull), removed (rm), data (inspect when no format).

- name: build-image
docker:
op: build
context: ./services/api
dockerfile: build/Dockerfile
tags: ["ghcr.io/example/api:v1.2.3"]
buildargs:
VERSION: "1.2.3"
platforms: ["linux/amd64", "linux/arm64"]
push: true
setvar: build

Parameters: context, dockerfile, tags, buildargs, platforms, target, nocache, pull, push, labels, secrets, env, timeout.

- name: push
docker:
op: push
image: "ghcr.io/example/api:v1.2.3"
- name: pull
docker:
op: pull
image: "alpine:3"
platform: "linux/arm64"
- name: run-migrations
docker:
op: run
image: "ghcr.io/example/api:v1.2.3"
rm: true
env:
DATABASE_URL: "{{ db_url }}"
command: ./bin/migrate
args: ["--apply"]

Parameters: image, name, command, args, env, mounts, ports, network, workdir, user, entrypoint, labels, detach, rm, interactive, tty, hostenv, timeout.

Mounts are an array of maps:

mounts:
- source: /host/data
target: /data
readonly: false
type: bind # or "volume" or "tmpfs"
- name: login
docker:
op: login
registry: ghcr.io
username: "{{registry_user}}"
password: "{{registry_token}}"

The password is sent on stdin (--password-stdin) — it never appears on the command line.

- name: retag
docker:
op: tag
source: "ghcr.io/example/api:dev"
target: "ghcr.io/example/api:v1.2.3"
- name: inspect
docker:
op: inspect
target: worker-1
type: container # optional
# format: "{{.State.Status}}" # optional
setvar: state

Without format, the raw JSON output is parsed and the first object lands under state.data.

- name: cleanup
docker:
op: rm
targets: ["worker-1", "worker-2"]
force: true
volumes: true

Same operations as separate functions in the docker namespace, with podman registered as an alias pointing at the same functions. See docs/namespaces/docker.md for the full namespace reference.

Quick example:

docker.login({
registry: "ghcr.io",
username: registryUser,
password: registryToken
})
let build = docker.build({
context: "./api",
tags: ["ghcr.io/example/api:" + sha],
push: true
})
log("built " + build.imageId)

Workflows that prefer the podman name can call podman.build(...) — it’s the same function.

Kubernetes operations via kubectl. Single task with an op: discriminator. The same task is registered under both k8s: (short) and kubectl: (alias — matches the binary name).

FieldTypeRequiredDefaultDescription
opstringNo"apply"apply / delete / get / exec / rolloutStatus / logs / scale
binarystringNokubectlkubectl binary path
kubeconfigstringNo--kubeconfig
contextstringNo--context
namespacestringNo--namespace
timeoutdurationNoWall-clock cap; also fed to --timeout for rolloutStatus
setvarstringNoCapture result map into a workflow variable
FieldTypeDescription
successboolExit status
exitCodeintProcess exit code
outputstringCaptured stdout
stderrstringCaptured stderr
errorstringFailure message

Plus per-op: applied (apply), deleted (delete), data (get when no format set — parsed JSON).

- name: apply
k8s:
op: apply
namespace: app
file: deploy/app.yaml
serverside: true
setvar: applied

Provide one of manifest: (inline YAML, piped to stdin), file: (path), or kustomize: (kustomize dir).

- name: cleanup
k8s:
op: delete
namespace: tests
kind: pod
selector: "owner=integration-tests"
ignorenotfound: true

Provide one of (kind + name), selector, file, or manifest.

- name: list-pods
k8s:
op: get
namespace: app
kind: pod
selector: app=api
setvar: api_pods

When format: is unset, the JSON output is parsed and lands under data — an object for a single resource (name: given) or an array for a list.

- name: migrate
k8s:
op: exec
namespace: app
pod: api-7f9b8c4-xyz
container: api
command: ./bin/migrate
args: ["--apply"]
- name: wait-for-rollout
k8s:
op: rolloutStatus
namespace: app
kind: deployment # default; can also be statefulset / daemonset
name: api
timeout: 5m
- name: tail
k8s:
op: logs
namespace: app
pod: api-0
since: 5m
tail: 200

⚠️ follow: true blocks the workflow indefinitely (until the pod exits). Pair with a timeout: if you use it.

- name: scale-up
k8s:
op: scale
namespace: app
kind: deployment
name: api
replicas: 5
current: 3 # optional precondition

Same seven operations as separate Script functions: k8s.apply / k8s.delete / k8s.get / k8s.exec / k8s.rolloutStatus / k8s.logs / k8s.scale. The kubectl namespace points at the same functions.

k8s.apply({
namespace: "app",
file: "deploy/app.yaml",
serverSide: true
})
let pods = k8s.get({ namespace: "app", kind: "pod", selector: "app=api" })
log("api pods: " + pods.data.items.length)
k8s.rolloutStatus({
namespace: "app",
name: "api",
timeout: "5m"
})
// Or via the kubectl alias — same function:
kubectl.scale({ namespace: "app", kind: "deployment", name: "api", replicas: 5 })

See docs/namespaces/k8s.md for the full namespace reference.

Execute Python scripts with optional virtual environment and function invocation.

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to Python script
venvstringNo-Path to virtual environment
argslistNo-Command-line arguments for the script
function.namestringNo-Function to call within the script
function.argslistNo-Arguments for the function
setvarstringNo-Variable to store output
timeoutintNo300Execution timeout in seconds
name: python-basic
tasks:
- name: run-script
python:
path: ./scripts/process.py
args:
- --input=/data/file.csv
- --output=/data/result.json
name: python-venv
tasks:
- name: run-with-venv
python:
path: ./ml/train.py
venv: ./ml/venv
args:
- --epochs=100
- --batch-size=32
setvar: training_result
name: python-function
tasks:
- name: call-function
python:
path: ./utils/helpers.py
function:
name: calculate_metrics
args:
- data: "{{input_data}}"
- threshold: 0.5
setvar: metrics
name: python-template
vars:
input_file: /data/input.csv
output_format: json
tasks:
- name: process-data
python:
path: ./scripts/transform.py
args:
- input: "{{input_file}}"
- format: "{{output_format}}"
timeout: 600
setvar: transform_result

Execute Mojo scripts with optional virtual environment and function invocation. Mojo is a high-performance language compatible with Python.

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to Mojo script (.mojo or .🔥)
venvstringNo-Path to virtual environment
argslistNo-Command-line arguments for the script
function.namestringNo-Function to call within the script
function.argslistNo-Arguments for the function
setvarstringNo-Variable to store output
timeoutintNo300Execution timeout in seconds
name: mojo-basic
tasks:
- name: run-mojo
mojo:
path: ./compute/process.mojo
args:
- --threads=8
setvar: result
name: mojo-compute
vars:
data_path: /data/large-dataset.bin
tasks:
- name: parallel-process
mojo:
path: ./ml/inference.mojo
args:
- input: "{{data_path}}"
- batch: 1024
timeout: 1800
setvar: inference_result

Execute code in JavaScript, Lua, Starlark, CEL, expr, Go, or WebAssembly using the Script plugin engine.

ParameterTypeRequiredDefaultDescription
languagestringNojavascriptLanguage: javascript, javascript-v8, lua, starlark, cel, expr, go, wasm
codestringYes*-Inline code to execute (*either code or file required)
filestringYes*-File path to load code from (*either code or file required)
modestringNocodeExecution mode: code (execute and optionally store result) or check (fail if result is falsy)
setvarstringNo-Variable name to store result (code mode only)
namespacesstringNo(default set)Namespaces to enable: all, none, or comma-separated list
timeoutintNo5000/100Execution timeout in ms (default: 5000ms for code, 100ms for check)
LanguageKeyDescription
JavaScript (Goja)javascriptDefault. Go-native JS interpreter with full namespace support
JavaScript (V8)javascript-v8Chrome V8 engine for higher performance
LualuaLightweight scripting via GopherLua
StarlarkstarlarkPython-like language (deterministic, hermetic)
CELcelCommon Expression Language for conditions
exprexprSimple expression evaluation
GogoGo code via Yaegi interpreter
WebAssemblywasmWASM module execution

Scripts have access to utility namespaces that provide functions like http.get(), shell.execute(), file.read(), etc. The namespaces parameter controls which are available.

ValueDescription
(omitted)Default safe set: http, file, shell, hash, id, jq, liquid, glob, vars, extract, crypt
allAll registered namespaces including vault, ssh, db, s3, azureblob, acme, etc.
noneFully sandboxed — no namespaces available
http,shellOnly the specified namespaces (comma-separated)
http,vaultExample: enable vault access alongside HTTP

Security-sensitive namespaces like vault are not in the default set. Enable explicitly via namespaces: "http,vault" or namespaces: "all".

name: script-js
tasks:
- name: process-data
script:
language: javascript
code: |
function main(input) {
return {
greeting: "Hello, " + input.name,
timestamp: Date.now()
};
}
setvar: result
name: script-http
tasks:
- name: fetch-data
script:
language: javascript
code: |
function main() {
let response = http.get({url: "https://api.example.com/data"});
return response.body;
}
setvar: api_data
name: script-cel
tasks:
- name: calculate
script:
language: cel
code: input.price * input.quantity
setvar: total
name: script-check
tasks:
- name: validate-admin
script:
mode: check
language: cel
code: input.user.role == "admin" || input.user.permissions.contains("write")
name: script-file
tasks:
- name: run-transform
script:
file: ./scripts/transform.js
setvar: transformed
name: script-sandboxed
tasks:
- name: pure-compute
script:
language: javascript
namespaces: none
code: |
function main(input) {
return input.values.reduce((a, b) => a + b, 0);
}
setvar: total
name: script-limited
tasks:
- name: fetch-only
script:
language: javascript
namespaces: http,jq
code: |
function main() {
let resp = http.get({url: "https://api.example.com/data"});
return jq.query(resp.body, ".items[].name");
}
setvar: names
name: script-long-running
tasks:
- name: heavy-compute
script:
language: javascript
timeout: 30000
code: |
function main() {
// Long-running computation...
return result;
}
setvar: result

HTTP client for REST APIs with secure defaults.

SettingDefaultDescription
insecureskipverifyfalseTLS certificate verification enabled
mintlsversion1.2Minimum TLS 1.2 required
timeout30sRequest timeout
retryenabledtrueAutomatic retries enabled
retrycount3Number of retry attempts
SSRF protectionEnabledBlocks requests to private/internal networks (localhost, 10., 172.16-31., 192.168.*, link-local)
ParameterTypeRequiredDefaultDescription
urlstringYes-URL to send request to
methodstringNoGETHTTP method (GET, POST, PUT, PATCH, DELETE)
headersmapNo-HTTP headers
payloadstringNo-Request body (JSON string)
ParameterTypeRequiredDefaultDescription
authtypestringNo-Auth type: basic, bearer, apikey, digest
authusernamestringNo-Username for basic/digest auth
authpasswordstringNo-Password for basic/digest auth
authtokenstringNo-Token for bearer/apikey auth
authheaderstringNoAuthorizationCustom header name for API key
ParameterTypeRequiredDefaultDescription
insecureskipverifyboolNofalseSkip TLS verification (not recommended)
mintlsversionstringNo1.2Minimum TLS version
cacertpathstringNo-Path to CA certificate
clientcertpathstringNo-Path to client certificate (mTLS)
clientkeypathstringNo-Path to client key (mTLS)
ParameterTypeRequiredDefaultDescription
setbodystringNo-Variable to store response body
setstatuscodestringNo-Variable to store status code
sendheadersmapNo-Map of variables to response headers
saveresponsepathstringNo-File path to save response
ParameterTypeRequiredDefaultDescription
uploadfilestringNo-File path to upload
uploadfileslistNo-Multiple file paths to upload
ParameterTypeRequiredDefaultDescription
timeoutstringNo30sRequest timeout
retryenabledboolNotrueEnable retries
retrycountintNo3Number of retries
failonerrorboolNotrueFail on HTTP error (4xx/5xx)
name: rest-get
tasks:
- name: fetch-data
rest:
url: "https://api.example.com/data"
setbody: response_data
name: rest-post
tasks:
- name: create-user
rest:
url: "https://api.example.com/users"
method: POST
headers:
Content-Type: application/json
payload: '{"name": "John", "email": "[email protected]"}'
setbody: created_user
setstatuscode: status
name: rest-auth
vars:
api_token: "your-token-here"
tasks:
- name: fetch-protected
rest:
url: "https://api.example.com/protected"
authtype: bearer
authtoken: "{{api_token}}"
setbody: response
name: rest-download
tasks:
- name: download
rest:
url: "https://example.com/file.zip"
saveresponsepath: "/downloads/file.zip"

HTTP client functions with SSRF protection.

SSRF Protection: All HTTP functions enforce SSRF protection by default. Requests to private/internal networks (localhost, 127.0.0.1, 10., 172.16-31., 192.168., 169.254.) are blocked.

FunctionDescription
http.get()Perform GET request
http.post()Perform POST request
http.put()Perform PUT request
http.patch()Perform PATCH request
http.delete()Perform DELETE request
http.request()Custom request with full control
http.download()Download file to path
http.upload()Upload file to URL
ParameterTypeDefaultDescription
urlstring-Request URL (required)
bodyany-Request body (for POST/PUT/PATCH)
headersmap-Request headers
queryParamsmap-URL query parameters
formDatamap-Form data for POST
timeoutint30Request timeout in seconds
insecureSkipVerifyboolfalseSkip TLS verification
ParameterTypeDefaultDescription
authTypestring-Auth type: basic, bearer, apikey, digest
authUsernamestring-Username for basic/digest auth
authPasswordstring-Password for basic/digest auth
authTokenstring-Token for bearer/apikey auth
authHeaderstring"Authorization"Custom header for API key
// Simple GET request
let result = http.get({
url: "https://api.example.com/data"
})
log(result.body)
// POST with JSON body
let result = http.post({
url: "https://api.example.com/users",
body: { name: "John", email: "[email protected]" },
headers: { "Content-Type": "application/json" }
})
if (result.success) {
log("Created user:", result.body)
}
// Bearer token authentication
let result = http.get({
url: "https://api.example.com/protected",
authType: "bearer",
authToken: input.token
})
// Download file
http.download({
url: "https://example.com/file.zip",
outputPath: "/downloads/file.zip"
})
// Upload file
http.upload({
url: "https://api.example.com/upload",
filePath: "/local/file.txt",
authType: "bearer",
authToken: input.token
})
// Custom request with full options
let result = http.request({
method: "PATCH",
url: "https://api.example.com/items/123",
body: { status: "active" },
headers: { "X-Custom-Header": "value" },
queryParams: { version: "2" },
authType: "basic",
authUsername: "user",
authPassword: "pass",
timeout: 60,
followRedirects: true
})