Skip to content

wrapd.yaml

The wrapd.yaml file defines the endpoints your agent exposes. The agent reads this file on startup and registers the endpoints with Wrapd.

version: 1
endpoints:
- name: hello
method: GET
command: echo
args:
- name: name
default: "world"
version: 1
endpoints:
- name: deploy
method: POST
description: "Deploy to staging"
command: /ops/deploy.sh
args:
- name: branch
required: true
- name: environment
required: false
default: "staging"
timeout: 120
working_dir: /var/app
transformer:
type: json
FieldTypeRequiredDescription
versionintegerYesMust be 1
agent_versionstringNoPin to a specific agent release. The agent logs a warning on startup if the running version doesn’t match.
endpointsarrayYesAt least one endpoint required
FieldTypeRequiredDefaultDescription
namestringYesEndpoint slug, must be unique. Becomes the URL path segment.
methodstringYesHTTP method: GET, POST, PUT, DELETE, PATCH
descriptionstringNoHuman-readable description shown in the dashboard
commandstringYesThe CLI command to execute
argsarrayNoArgument definitions
timeoutintegerNo60Max execution time in seconds (1–3600). Process is killed and returns exit code 124 on timeout. Free tier: max 60s. Pro: max 1800s. Team: max 3600s.
working_dirstringNoWorking directory for the command
publicbooleanNofalseIf true, endpoint is callable without an API key. See Public Endpoints.
triggerstringNohttphttp (default) or webhook. See Webhook Triggers.
asyncbooleanNotrueWebhook mode only. If true, returns 202 immediately. If false, waits for output.
secretstringNoWebhook mode only. Env var reference (e.g. $GITHUB_WEBHOOK_SECRET) for HMAC-SHA256 verification.
transformerobjectNoOutput transformation. See Transformers.
FieldTypeRequiredDefaultDescription
namestringYesArgument name, used as the key in API requests
requiredbooleanNofalseIf true, the argument must be provided by the caller
defaultstringNoDefault value when not provided

Arguments are passed to the command in order. When a caller makes a request, provided values override defaults.

args:
- name: host
required: true
- name: count
required: false
default: "3"

Calling with {"host": "google.com"} runs: command google.com 3

Calling with {"host": "google.com", "count": "5"} runs: command google.com 5

If a required argument is missing, the execution returns an error.

  • version must be 1
  • At least one endpoint is required
  • Endpoint names must be unique
  • command cannot be empty
  • method must be a valid HTTP verb