Skip to main content
Use a multi-step API check when availability depends on several requests succeeding together. A token endpoint returning 200 does not prove that a caller can create an invoice and read it back. Write the sequence as a Playwright test that uses the request fixture. Assert the expected response at each step and clean up resources your test creates. Use test accounts and data suitable for repeated execution against the target environment.

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
DevHelm computes the bundle digest from the import closure. Do not hash the ZIP yourself and send that hash as the bundle id. The same files always return the same digest. Do not include credentials in the bundle. Set sensitive values through your environment’s secret bindings and read them from 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. Set DEVHELM_API_TOKEN, DEVHELM_WORKSPACE_ID, and ENVIRONMENT_ID before running the examples.

Upload the bundle

API
The response 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
An unreferenced bundle expires after 24 hours. Create or update the monitor with data.digest before then. Sending the same closure again returns the existing bundle.

Create the monitor

API
Set 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 with POST /api/v1/bundles, then publish that digest on the monitor. Sending code on update replaces the published revision.
API
Keep the entrypoint aligned with a file in the uploaded closure. Optional 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.