commandsjob content

Set the content to send a webhook jobs command.

Usage

job content (add|set) name text
job content clear name

where
add a line of content.
set the jobs content, replacing any previously defined content.
clear a jobs content.
name of job whose content to add/set/clear.
text line of content to add/set. See variables for available variables that can be included.

no content for get urls. For post, put, patch & delete urls see defaults below.

write on name

this command will set the job type to webhook.

Defaults

If no content is defined, BeyondCron will pass parameter properties in post, put, patch & delete content as follows:

application/x-www-form-urlencoded This the default encoding for HTTP forms.
application/json parameter properties will be formatted as a JSON object.
text/plain parameter properties will be listed as name=value lines.

To change from the default formatting of application/x-www-form-urlencoded, define header property Content-Type with the value application/json or text/plain. If Content-Type is set to an unrecognised value, BeyondCron will not pass any content.

Examples

Define some JSON content

BeyondCron % job content set /digital_ocean/k8s1click { “addon_slugs”: [“kube-state-metrics”, “loki”], “cluster_uuid”: “50a994b6-c303-438f-9495-7e896cfe6b08” }
BeyondCron % job property set $$ header Content-Type application/json
BeyondCron % job show $$

----------- ------------------------------------------------------- Name /digital_ocean/k8s1click Description Install a Kubernetes 1-Click application on a cluster Type Webhook URL https://api.example.com/v2/1-clicks/kubernetes Method Post Content { "addon_slugs": ["kube-state-metrics", "loki"], ... } ... Properties Type Name Value ------------- ------------- ------------------------- secret header Authorization Bearer: fb0d4a1b3fc121... header Content-Type application/json

See also

Reference