Skip to main content
PATCH
Permission Required: project:edit-tests
Apply a partial update to a test case. Updates are protected by an optimistic version check — supply the version you fetched from Get Test as expected_version. If the test has been modified since, the update fails with a 409 Conflict and the latest version is returned so the caller can rebase. The patch field is deep-merged into the current test body. To replace a list (e.g. tags or player_order), include the full new list — arrays are replaced, not merged.

Path Parameters

testId
string
required
The test ID (UUID)

Query Parameters

include_shared_collection_steps
boolean
default:"true"
Whether shared collection steps are expanded inline in the response.

Request Body

expected_version
integer
required
The version returned by the most recent Get Test. Must be a non-negative integer.
patch
object
required
Partial test body. Object fields are deep-merged; arrays are replaced wholesale. Cannot change the test id.
shared_collection_steps_mode
string
default:"error"
How to handle shared collection items that contain inline steps in the patch: error (reject) or drop (silently strip the inline steps).
folder_path
string
New folder placement. null or "/" moves the test to the project root. Mutually exclusive with folder_id. Omit both fields to leave folder unchanged.
folder_id
string
Pre-resolved folder UUID. Mutually exclusive with folder_path.

Patching the time budget

Time budgets live at the test level (min_seconds / max_seconds on the test body) — see Create Test for the per-framework rules. Patches accept the same fields with the same constraints:
  • verification: only max_seconds is allowed; sending min_seconds is rejected with 400.
  • discovery / task: either bound (or both) may be patched. The merged result must satisfy min_seconds <= max_seconds; e.g. patching only min_seconds to a value above the current max_seconds is rejected.

Response

Returns the updated test (same shape as Get Test) on success. On version conflict, returns 409 with:

Authorizations

X-Api-Key
string
header
required

API key for authentication

Path Parameters

testId
string<uuid>
required

The test ID (UUID)

projectId
string
required

The project ID. You can copy it from the project settings page or the project URL in the dashboard.

Query Parameters

include_shared_collection_steps
boolean
default:true

Whether shared collection steps are expanded inline

Body

application/json
expected_version
integer
required

Version returned by the most recent Get Test.

Required range: x >= 0
patch
object
required

Partial test body. Object fields are deep-merged; arrays are replaced wholesale.

shared_collection_steps_mode
enum<string>
default:error
Available options:
error,
drop
folder_path
string | null
folder_id
string<uuid>

Response

Test updated

Full test case body. Shape varies by test_type (verification, discovery, task); see the docs page for the exact shape.

id
string<uuid>
project_id
string
name
string
version
integer
tags
string[]
incident_auto_approve
boolean
test_type
enum<string>
Available options:
verification,
discovery,
task
quarantined
boolean
testrail
object | null
source
enum<string>
Available options:
repository,
bot
min_seconds
integer

Test-level minimum runtime in seconds. Allowed for discovery and task only; sending this on a verification test is rejected with 400. Defaults when omitted: discovery=3600 (1h), task=0. Must be ≤ max_seconds (validated against the effective budget after defaults are applied).

Required range: 0 <= x <= 19800
max_seconds
integer

Test-level maximum runtime in seconds. Hard ceiling for any single run is 19800 (5.5h). Defaults when omitted: verification=19800 (5.5h), discovery=10800 (3h), task=19800 (5.5h).

Required range: 0 <= x <= 19800
players_by_key
object
player_order
string[]