Re-run a saved test, "Scan again"
rerun_target_scanRe-run a saved test, "Scan again" (permission: edit)
Re-runs the saved target, from the target's own country. journeyId selects which journey to replay (without url only with a journey scanType, otherwise 400 field_not_applicable); omitted, it defaults to the target's journey with the lowest run_order (previously documented as "oldest journey" — the same journey for every existing customer, now deterministic). A journeyId that is over the plan quota is refused with 409 journey_sleeping, one with more steps than the plan allows with 402 step_cap_exceeded. Supply a url to scan a per-PR preview deploy as a dry-run (no baseline mutation); preview runs require the Professional plan or higher (403 plan_required otherwise). An omitted scanType is inferred from the target type, so on a website target a url without scanType runs web_compliance, a compliance audit of the preview, not a dataLayer journey replay. Only with scanType:"web_journey" is the resolved journey (journeyId, or the default above) replayed against the preview for a dataLayer diff gate. Every url request resolves that journey first, whatever the scanType, so each can return 400 journey_required (no runnable journey, issue on journeyId), journey_mismatch, journey_sleeping or step_cap_exceeded. Set journeys:"all" (which REQUIRES url and FORBIDS journeyId) to fan the preview out across EVERY active journey of the target and receive a 202 FanOutAccepted with one ScanRef per journey plus any per-journey dispatch failures (failed[].error { code, message }). maxJourneys (1..50, journeys:"all" only; otherwise a 400 field_not_applicable) caps how many journeys the fan-out runs — applied AFTER the plan quota cut, in run_order — so a CI gate on a target with many journeys can bound its scanner cost. Preview dispatches also derive their scan ids from the Idempotency-Key, so a retry after a lost slot re-derives the same scans. A replay reports each scan's current status. url is an absolute http(s) URL. idempotencyKey (sent as the Idempotency-Key header): retrying the same call with the same value replays the original answer; the same value with different arguments is 422 idempotency_conflict, and 409 idempotent_in_progress means wait error.meta.retryAfter seconds and retry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "rerun_target_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Saved test id: from GET /targets or the POST /targets answer. | |
| url | No | Absolute http(s) URL of a preview deploy to scan as a dry run (no baseline change). | |
| journeys | No | `all` replays every active journey of the target against `url` (requires `url`, not with `journeyId`). | |
| scanType | No | The scan type to run; omitted, it is inferred from the target's type. | |
| journeyId | No | The target's journey to replay; omitted, the first runnable journey in run order. Without `url` only with a journey scanType. | |
| maxJourneys | No | With journeys `all`: run at most this many journeys (1-50), in run order after the quota cut. | |
| idempotencyKey | No | Optional Idempotency-Key: reuse the same value when retrying this exact call so it is applied once. |