Test Cases › Update Test Case
Test Cases
Update Test Case Update a test case including its steps, metadata, and dynamic fields. This endpoint replaces the separate Test Steps APIs (POST /api/v1/test-steps and PUT /api/v1/test-steps/{test_step_id}). The snapshot_id from the GET response must be included in the request body.
curl -- request PUT \
-- url "https://test-manager-api.lambdatest.com//api/v2/test-cases" \
-- header "Authorization: Basic <encoded-value>" \
-- header "Content-Type: application/json" \
-- data ' {
"id" : "<id>" ,
"project_id" : "<project_id>" ,
"title" : "<title>" ,
"description" : "<description>" ,
"type" : "<type>" ,
"preconditions" : "<preconditions>" ,
"status" : "<status>" ,
"priority" : "<priority>" ,
"automation_status" : "<automation_status>" ,
"external_id" : "<external_id>" ,
"attachments" : [ ] ,
"dynamic_fields" : [ ] ,
"tags" : [ ] ,
"commit_message" : "<commit_message>" ,
"snapshot_id" : "<snapshot_id>" ,
"step_events" : [ ] ,
"override" : true
} '
{
"message" : "Test case updated successfully" ,
"type" : "Success" ,
"data" : {
"snapshot_id" : "sample_snapshot_id"
}
}
Authorizations Authorization string header required
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body application/json id string required
The test case ID to update.
project_id string required
The project ID the test case belongs to.
commit_message string required
snapshot_id string required
Required. Must be taken from the GET /api/v2/test-cases/{test_case_id} response.
Response 200▼
application/json OK
message string
Example: "Test case updated successfully"
type string
Example: "Success"
data object
▶ Hide child attributesdata. snapshot_id string
Example: "sample_snapshot_id"
curl -- request PUT \
-- url "https://test-manager-api.lambdatest.com//api/v2/test-cases" \
-- header "Authorization: Basic <encoded-value>" \
-- header "Content-Type: application/json" \
-- data ' {
"id" : "<id>" ,
"project_id" : "<project_id>" ,
"title" : "<title>" ,
"description" : "<description>" ,
"type" : "<type>" ,
"preconditions" : "<preconditions>" ,
"status" : "<status>" ,
"priority" : "<priority>" ,
"automation_status" : "<automation_status>" ,
"external_id" : "<external_id>" ,
"attachments" : [ ] ,
"dynamic_fields" : [ ] ,
"tags" : [ ] ,
"commit_message" : "<commit_message>" ,
"snapshot_id" : "<snapshot_id>" ,
"step_events" : [ ] ,
"override" : true
} '
{
"message" : "Test case updated successfully" ,
"type" : "Success" ,
"data" : {
"snapshot_id" : "sample_snapshot_id"
}
}