Create a Datadog Synthetic multistep API test to validate an authenticated API flow
domain: datadoghq.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
POST to the Datadog Synthetics API endpoint for creating API tests, setting the type field to 'api' and the subtype to 'multi' to create a multistep test; include locations, message, name, options, and status fields in the request body.
Define the steps array in the config object; each step object contains name, subtype (e.g., 'http'), request (method, url, headers, body), and assertions arrays that define pass/fail criteria for that step.
Use extractors in each step's extract array to capture response values (e.g., a bearer token from step 1's JSON response) into variables; reference these variables in subsequent step request fields using the {{ VARIABLE_NAME }} syntax.
Set assertions per step using the operator field (e.g., 'is', 'contains', 'lessThan') against targets such as statusCode, body, header, or responseTime to gate progression through the chain.
Configure the options object with tick_every (polling interval in seconds), min_failure_duration, min_location_failed, and retry settings; set monitor_options.renotify_interval if escalation alerts are needed.
Activate the test by setting status to 'live' in the creation payload or via a subsequent PUT request; retrieve results from the Synthetics results endpoint using the test's public_id.
Known gotchas
Variables extracted in one step are only available to steps that follow it in the array order; referencing a variable from a later step in an earlier step will result in an empty or literal string, not a runtime error.
The Synthetics API applies per-organization rate limits on test creation and trigger calls; bulk-creating many tests in a script requires adding delays or chunking requests to avoid 429 responses.
Private location tests require the private location worker to be running and reachable; if the worker is down, tests report a 'no result' state rather than a failure, which can mask real outages.
Give your agent this knowledge — and 6,400+ more routes
One MCP install gives any agent live access to the full route map across 2,100+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp