Skip to main content

update_load_test

Edit an existing load test. A non-empty name renames it; any configuration field replaces the stored configuration and re-finalizes runnability — a simple test becomes generated once it has a journey (else draft), an advanced test rebuilds its k6 script. Send only a name (no config) to rename without touching the configuration.

The configuration fields are identical to create_load_test.

Request

PATCH /api/v1/ops/projects/{project}/load/{loadTest}
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
loadTestpathstringyesLoad test id or name (see list_load_tests).
namebodystringnoNew display name.
configbodyobjectnoReplacement LoadConfig document (see create_load_test). Absent leaves the stored config untouched.

Provide a name, a config, or both — an empty edit is a 400.

# Rename only
curl -X PATCH -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Checkout — Black Friday"}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/load/51"

# Bump the load
curl -X PATCH -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"config": {"mode": "advanced", "paths": ["/"], "vus": 100, "durationSeconds": 600}}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/load/51"

Response

200 OK

{ "featureId": 51, "name": "Checkout — Black Friday", "mode": "advanced", "status": "generated" }

Errors

HTTPWhen
400 invalid_requestNeither name nor config supplied.
404 not_foundNo such load test in this project.
409 conflictThe target feature is not a load test.