curl --request PATCH \
--url https://api.qa.tech/v1/test-cases/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"goal": "<string>",
"expectedResult": "<string>",
"steps": [
"<string>"
],
"startUrlPath": "<string>",
"labels": [
"<string>"
],
"isEnabled": true,
"scenarioShortId": "<string>",
"resumeFromDependencyProjectTestCaseId": "<string>",
"waitForDependenciesProjectTestCaseIds": [
"<string>"
],
"projectShortId": "<string>"
}
'import requests
url = "https://api.qa.tech/v1/test-cases/{id}"
payload = {
"name": "<string>",
"goal": "<string>",
"expectedResult": "<string>",
"steps": ["<string>"],
"startUrlPath": "<string>",
"labels": ["<string>"],
"isEnabled": True,
"scenarioShortId": "<string>",
"resumeFromDependencyProjectTestCaseId": "<string>",
"waitForDependenciesProjectTestCaseIds": ["<string>"],
"projectShortId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
goal: '<string>',
expectedResult: '<string>',
steps: ['<string>'],
startUrlPath: '<string>',
labels: ['<string>'],
isEnabled: true,
scenarioShortId: '<string>',
resumeFromDependencyProjectTestCaseId: '<string>',
waitForDependenciesProjectTestCaseIds: ['<string>'],
projectShortId: '<string>'
})
};
fetch('https://api.qa.tech/v1/test-cases/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qa.tech/v1/test-cases/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'goal' => '<string>',
'expectedResult' => '<string>',
'steps' => [
'<string>'
],
'startUrlPath' => '<string>',
'labels' => [
'<string>'
],
'isEnabled' => true,
'scenarioShortId' => '<string>',
'resumeFromDependencyProjectTestCaseId' => '<string>',
'waitForDependenciesProjectTestCaseIds' => [
'<string>'
],
'projectShortId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qa.tech/v1/test-cases/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"expectedResult\": \"<string>\",\n \"steps\": [\n \"<string>\"\n ],\n \"startUrlPath\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"isEnabled\": true,\n \"scenarioShortId\": \"<string>\",\n \"resumeFromDependencyProjectTestCaseId\": \"<string>\",\n \"waitForDependenciesProjectTestCaseIds\": [\n \"<string>\"\n ],\n \"projectShortId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.qa.tech/v1/test-cases/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"expectedResult\": \"<string>\",\n \"steps\": [\n \"<string>\"\n ],\n \"startUrlPath\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"isEnabled\": true,\n \"scenarioShortId\": \"<string>\",\n \"resumeFromDependencyProjectTestCaseId\": \"<string>\",\n \"waitForDependenciesProjectTestCaseIds\": [\n \"<string>\"\n ],\n \"projectShortId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qa.tech/v1/test-cases/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"expectedResult\": \"<string>\",\n \"steps\": [\n \"<string>\"\n ],\n \"startUrlPath\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"isEnabled\": true,\n \"scenarioShortId\": \"<string>\",\n \"resumeFromDependencyProjectTestCaseId\": \"<string>\",\n \"waitForDependenciesProjectTestCaseIds\": [\n \"<string>\"\n ],\n \"projectShortId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"isEnabled": true,
"labels": [
"<string>"
],
"references": [
{
"kind": "<string>",
"key": "<string>",
"url": "<string>",
"title": "<string>"
}
],
"classification": "POSITIVE",
"applicationShortId": "<string>",
"applicationName": "<string>",
"scenarioShortId": "<string>",
"scenarioName": "<string>",
"goal": "<string>",
"expectedResult": "<string>",
"steps": [
"<string>"
],
"startUrlPath": "<string>",
"resumeFromDependencyProjectTestCaseId": "<string>",
"waitForDependenciesProjectTestCaseIds": [
"<string>"
],
"createdAt": "<string>",
"updatedAt": "<string>",
"url": "<string>"
}Update test case
Updates a test case’s authored configuration. Patch semantics: only the fields you provide change; pass null on nullable fields (startUrlPath, scenarioShortId, resumeFromDependencyProjectTestCaseId) to clear them.
The edit takes effect immediately as a new published revision. To de-hardcode a test that 404s on a stale deep link, clear startUrlPath and set resumeFromDependencyProjectTestCaseId to a test that creates the entity it needs — it then starts from that test’s end state with fresh data.
curl --request PATCH \
--url https://api.qa.tech/v1/test-cases/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"goal": "<string>",
"expectedResult": "<string>",
"steps": [
"<string>"
],
"startUrlPath": "<string>",
"labels": [
"<string>"
],
"isEnabled": true,
"scenarioShortId": "<string>",
"resumeFromDependencyProjectTestCaseId": "<string>",
"waitForDependenciesProjectTestCaseIds": [
"<string>"
],
"projectShortId": "<string>"
}
'import requests
url = "https://api.qa.tech/v1/test-cases/{id}"
payload = {
"name": "<string>",
"goal": "<string>",
"expectedResult": "<string>",
"steps": ["<string>"],
"startUrlPath": "<string>",
"labels": ["<string>"],
"isEnabled": True,
"scenarioShortId": "<string>",
"resumeFromDependencyProjectTestCaseId": "<string>",
"waitForDependenciesProjectTestCaseIds": ["<string>"],
"projectShortId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
goal: '<string>',
expectedResult: '<string>',
steps: ['<string>'],
startUrlPath: '<string>',
labels: ['<string>'],
isEnabled: true,
scenarioShortId: '<string>',
resumeFromDependencyProjectTestCaseId: '<string>',
waitForDependenciesProjectTestCaseIds: ['<string>'],
projectShortId: '<string>'
})
};
fetch('https://api.qa.tech/v1/test-cases/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qa.tech/v1/test-cases/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'goal' => '<string>',
'expectedResult' => '<string>',
'steps' => [
'<string>'
],
'startUrlPath' => '<string>',
'labels' => [
'<string>'
],
'isEnabled' => true,
'scenarioShortId' => '<string>',
'resumeFromDependencyProjectTestCaseId' => '<string>',
'waitForDependenciesProjectTestCaseIds' => [
'<string>'
],
'projectShortId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qa.tech/v1/test-cases/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"expectedResult\": \"<string>\",\n \"steps\": [\n \"<string>\"\n ],\n \"startUrlPath\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"isEnabled\": true,\n \"scenarioShortId\": \"<string>\",\n \"resumeFromDependencyProjectTestCaseId\": \"<string>\",\n \"waitForDependenciesProjectTestCaseIds\": [\n \"<string>\"\n ],\n \"projectShortId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.qa.tech/v1/test-cases/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"expectedResult\": \"<string>\",\n \"steps\": [\n \"<string>\"\n ],\n \"startUrlPath\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"isEnabled\": true,\n \"scenarioShortId\": \"<string>\",\n \"resumeFromDependencyProjectTestCaseId\": \"<string>\",\n \"waitForDependenciesProjectTestCaseIds\": [\n \"<string>\"\n ],\n \"projectShortId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qa.tech/v1/test-cases/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"goal\": \"<string>\",\n \"expectedResult\": \"<string>\",\n \"steps\": [\n \"<string>\"\n ],\n \"startUrlPath\": \"<string>\",\n \"labels\": [\n \"<string>\"\n ],\n \"isEnabled\": true,\n \"scenarioShortId\": \"<string>\",\n \"resumeFromDependencyProjectTestCaseId\": \"<string>\",\n \"waitForDependenciesProjectTestCaseIds\": [\n \"<string>\"\n ],\n \"projectShortId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"isEnabled": true,
"labels": [
"<string>"
],
"references": [
{
"kind": "<string>",
"key": "<string>",
"url": "<string>",
"title": "<string>"
}
],
"classification": "POSITIVE",
"applicationShortId": "<string>",
"applicationName": "<string>",
"scenarioShortId": "<string>",
"scenarioName": "<string>",
"goal": "<string>",
"expectedResult": "<string>",
"steps": [
"<string>"
],
"startUrlPath": "<string>",
"resumeFromDependencyProjectTestCaseId": "<string>",
"waitForDependenciesProjectTestCaseIds": [
"<string>"
],
"createdAt": "<string>",
"updatedAt": "<string>",
"url": "<string>"
}Body
Patch-style update: omitted fields are left unchanged. Nullable fields (startUrlPath, scenarioShortId, resumeFromDependencyProjectTestCaseId) accept null to clear the current value.
URL path the agent navigates to before executing (e.g. /dashboard). Pass null to clear it so the test starts from its RESUME_FROM dependency's end state (or the application's base URL without one) — do not set a path on a test that has a RESUME_FROM dependency, as it would navigate away from the dependency's end state.
Test case (UUID) whose output state this test resumes from — the preferred way to give a test fresh, valid data instead of hardcoded entities. Pass null to remove the RESUME_FROM dependency. Combine with startUrlPath: null so the test actually starts from the dependency's end state.
Response
The request has succeeded.
A test case's authored configuration — what the agent is instructed to do — as distinct from a run's result (see get_run_test_case).
Was this page helpful?