loadgen

seed a load scenario from recorded proxy traffic

Generates an editable load scenario from traffic previously recorded by MockServer in proxy/recording mode (the requests held by the event log) and loads (registers) it into the registry under "name" in the LOADED state — exactly like PUT /mockserver/loadScenario, it generates no traffic and is allowed even when loadGenerationEnabled is false. Two modes control how recorded requests become steps. VERBATIM (the default) emits one step per recorded request, in recorded order, preserving the concrete path, body and headers — with an optional "maxSteps" cap. TEMPLATIZED deduplicates recorded requests by (method, templatised-path) — id-shaped path segments such as /orders/123 collapse to /orders/{id} — keeping one representative example per unique route, ordered by descending hit frequency (most-hit routes first); each step's "weight" is set to its route's observed hit count and the scenario uses "stepSelection": "WEIGHTED" so replay reproduces the recorded traffic mix. An optional "requestFilter" (an HttpRequest matcher) selects which recorded requests to include; absent means all recorded requests. An optional "target" is applied to every step (overriding each recorded request's own Host/secure routing); absent leaves each recorded request's routing untouched. When no "profile" is supplied a conservative default is applied (one short constant-VU stage) so the scenario is immediately runnable yet safe — the operator edits it before scaling up. The generated scenario is returned so a client/UI can show and edit it before triggering a run.

put/mockserver/loadScenario/generateFromRecording

Request

  • Base URL: http://localhost:1080
  • URL: http://localhost:1080/mockserver/loadScenario/generateFromRecording
  • Auth: none declared

Request body

namestring required

the generated scenario name (the unique registry key)

mode'VERBATIM' | 'TEMPLATIZED'

VERBATIM = one step per recorded request; TEMPLATIZED = one step per unique (method, templatised-path) route, ordered by descending frequency

maxStepsinteger

optional cap on the number of VERBATIM steps (keeps the first N recorded requests)

Response

load scenario generated and loaded (registered)

status'loaded'
namestring
state'LOADED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'STOPPED'

Changes

No recorded changes to this operation across all 1 revision of this API.