For the complete documentation index, see llms.txt. This page is also available as Markdown.

create_load_test

Create a load test (a kind "load" feature) from a configuration.

Create a load test — a feature of kind load, the same object the app's Load section authors. A load test runs in one of two modes:

  • Simple — replays your functional feature journeys as concurrent browser users. Pass the feature ids to replay (featureIds); it becomes runnable (status generated) as soon as it has at least one journey.

  • Advanced — drives protocol-level k6 traffic against URL paths (paths). Its k6 script is built immediately, so it is runnable right away.

Omit mode and it is inferred: simple when featureIds are supplied, otherwise advanced. With no configuration fields at all, the load test starts from a small-steady-load default you can refine later with update_load_test.

The REST body carries the canonical config document under config (the exact shape the app stores). The CLI and MCP tool expose the common knobs as flat arguments and assemble that document for you. Custom multi-stage ramps stay in-app — use vus + rampUpSeconds + durationSeconds here.

Request

POST /api/v1/ops/projects/{project}/load
Parameter
In
Type
Required
Description

project

path

string

yes

The project's public id.

name

body

string

yes

Display name for the load test.

config

body

object

no

Canonical LoadConfig document (see below). Omit for the default.

config document

Field
Type
Applies to
Description

mode

string

both

"simple" or "advanced". Omit to infer from features.

targetUrl

string

both

Target URL. Defaults to the project base URL at run time.

features

array

simple

Journeys to replay: [{ "id": 7, "name": "" }].

repeatsPerUser

integer

simple

How many times each concurrent user repeats the journeys (default 3).

vus

integer

both

Concurrent users (simple, 1–100) / virtual users (advanced).

durationSeconds

integer

advanced

Steady-load duration.

rampUpSeconds

integer

advanced

Seconds to ramp up to vus.

thinkTimeSeconds

number

advanced

Pause between requests.

paths

array

advanced

URL paths to hit, e.g. ["/", "/pricing"].

thresholds

array

advanced

Pass/fail gates: [{ "metric": "http_req_duration", "condition": "p(95)<1000" }].

Tool create_load_test{ "name": "API soak", "mode": "advanced", "paths": ["/", "/pricing"], "vus": 50, "durationSeconds": 300, "thresholds": ["http_req_duration:p(95)<1000"] }.

Response

201 Created

A simple load test with no journeys yet comes back "status": "draft" — add journeys with update_load_test before running it. Dispatch with run_load_test.

Errors

HTTP
When

400 invalid_request

Missing name.

404 not_found

No such project in this workspace.

Last updated

Was this helpful?