commands – job url
Set the URL for a Webhook job to call, or the database URL of a SQL job.
Usage
job url name (get|post|put|delete|sql)? URL
where
name | of job whose url to set. |
get | call URL using a HTTP GET command, appending any parameter properties as parameters to the URL. Webhook job. |
post | call URL using a HTTP POST command, including any parameter properties within the message content. Webhook job. |
put | call URL using a HTTP PUT command, including any parameter properties within the message content. Webhook job. |
patch | call URL using a HTTP PATCH command, including any parameter properties within the message content. Webhook job. |
delete | call URL using a HTTP DELETE command, including any parameter properties within the message content. Webhook job. |
sql | execute the sql defined in input, on the database at URL. SQL job. |
URL | URL to execute. See variables for available variables that can be included. |
If the url host is example.com , or is within the domain .example.com , the job will be sent to the echo URL. |
write on name, and host acl permission on the host and user fields of URL.
Examples
Set a POST webhook url with parameters passed as www form urlencoded content
BeyondCron % job url /server1/debug post http://server1/debug.php
BeyondCron % job property set $$ hello world
BeyondCron % job show $$
----------- -------------------------- Name /server1/debug Description Log http request header and message Type Webhook URL http://server1/debug.php Method Post Properties Type Name Value --------- ----- ----- parameter hello world
Set a POST webhook url with parameters passed as a JSON object
BeyondCron % job url /server1/debug post http://server1/debug.php
BeyondCron % job property set $$ header Content-Type application/json
BeyondCron % job property set $$ hello world
BeyondCron % job show $$
----------- -------------------------- Name /server1/debug Description Log http request header and message Type Webhook URL http://server1/debug.php Method Post Properties Type Name Value --------- ------------ ---------------- header Content-Type application/json parameter hello world
Set a GET webhook url including variables
BeyondCron % job url /server1/debug get http://server1/debug.php?yesterday={{ time -1d EEE }}
BeyondCron % job show $$
----------- -------------------------- Name /server1/debug Description Log http request header and message Type Webhook URL http://server1/debug.php?yesterday={{ time -1d EEE }} Method Get
Set a sql job url including authentication properties
BeyondCron % job url /examples/sql/select sql jdbc:postgresql://localhost:5433/beyondcron?user=beyondcron&password=Secret!
BeyondCron % job show $$
----------- -------------------------------------------- Name /examples/sql/select Description Select from job status table Mode Disabled Type SQL URL jdbc:postgresql://localhost:5433/beyondcron Properties Type Name Value ---------------- --------- ----------- secret parameter password Secret! parameter user beyondcron
See also
- host acl
- job add
- job calendar
- job changes
- job command
- job condition
- job content
- job copy
- job delay
- job delete
- job description
- job diff
- job email
- job enable/disable/bypass
- job history
- job host
- job image
- job input
- job list
- job message
- job output
- job property
- job schedule
- job show
- job sql
- job start/kill
- job status
- job subject
- job timezone
- job trigger
- job user
- job variables