Prepare your bundle
Put the test entrypoint and the local files it imports in one set. Paths are relative to the bundle root:tests/invoice.spec.ts identifies that file, not an absolute path on your computer.
You need:
- The file contents, as a JSON map of path to text, or a ZIP of those files
- The entrypoint path
- An environment ID in the monitor’s workspace
process.env in the test. The upload rejects a literal secret in a source file, a dotfile, or a symlink.
Upload and create the monitor
Authenticate with a token that can write monitors in the selected workspace. SetDEVHELM_API_TOKEN, DEVHELM_WORKSPACE_ID, and ENVIRONMENT_ID before running the examples.
Upload the bundle
API
data.digest is sha256: followed by 64 hexadecimal characters. Use that value as code.bundle. data.files is the import closure. data.keys lists secret names found in that closure. data.uploadDigest covers every file you sent, which matches data.digest when the map is already the closure.
A ZIP body is the same upload. Set Content-Type: application/zip and pass the entrypoint as a query parameter:
API
data.digest before then. Sending the same closure again returns the existing bundle.
Create the monitor
API
BUNDLE_DIGEST to data.digest from the upload. The entrypoint must be one of the files in that closure. Do not send files, keys, or config.script. The server derives the file list and secret names from the bundle.
Browser and multi-step API checks default to a 30 second timeout. The maximum is 240 seconds.
The minimum frequency and run allowance depend on your plan. The example uses a one-hour interval; check the workspace’s limits before selecting a faster schedule or additional regions.
Do not send an inline
config.script or HTTP-monitor assertion objects for a
code monitor. The bundle contains the test and its assertions. An environment
is required.Inspect the result
Open the monitor in the dashboard and inspect its run history. A failed request or assertion makes the test fail. Review the recorded evidence and runner output to understand which condition was not met. Run now is a real run, with normal usage accounting. The synchronous uptime-monitor Test action is not supported for this check type.Update the test
Upload the changed files withPOST /api/v1/bundles, then publish that digest on the monitor. Sending code on update replaces the published revision.
API
code.source can record repo, branch, commit, and file.
Synthetics overview
Choose Browser or API checks and understand their schedules and evidence.
API authentication
Set up access to the workspace that owns your monitors.