Examples
Short, complete scripts you can copy into the workbench and run. Each example is a single JavaScript file, built only from the modules and Web APIs available in the sandbox, and ends on its own.
Use them as starting points: change the URLs, the secrets, and the schedule to fit your job, then create a job that points at the script. New to GearTrain? Start with Getting Started first.
Basics
HTTP and APIs
Fetch JSON From an API
Call an HTTP endpoint and parse the JSON response.
Send a POST Request With a JSON Body
Send data to an API with fetch and a JSON body.
Retry a Failed Request With Backoff
Retry a failing request with exponential backoff.
Send a Signed Webhook With Standard Webhooks
Send a signed webhook with Standard Webhooks so the receiver can verify it.