Skip to main content
The sequential builder is the easiest way to write Griffin monitors. You add steps in order and edges are created automatically: START → step 1 → step 2 → ... → END. For monitors that need branching or parallel paths, see the Graph Builder. For browser-based monitoring, see Browser Monitors.

Basic example

Configuration

Adding requests

Use .request(name, config) to add an HTTP request step:
Response format: Use Json or Xml for JSON/XML bodies. Use NoContent (import from @griffin-app/griffin) for endpoints that return 204 with no body (e.g. successful DELETE); assert only on state["node"].status (e.g. .equals(204)), not on body. See the Graph Builder page for the full config reference.

Adding waits

Use .wait(name, duration) to pause between steps:
Duration formats:
  • 1000 — milliseconds
  • { seconds: 2 } — seconds
  • { minutes: 1 } — minutes

Adding assertions

Use .assert(callback) to validate results from previous steps. The callback receives a type-safe state proxy with autocomplete for all node names defined above it:
See Assertions for the full assertion API.

Adding browser steps

Use .browser(name, browserAction) to add a Playwright browser step:
Browser steps can be mixed freely with .request() and .wait() in any order. See Browser Monitors for the full browser API, step reference, and examples.

Complete example

A multi-step API monitor that creates a resource, verifies it, and cleans up: