Update test
Apply a partial update to an existing test. See Tests.
Only name and metadata are mutable post-creation. Attempting to update any
other field (type, variants, strategies, uri, groundTruthUri,
dataCatalogUri, sourceTestId, maxTestCases, etc.) returns a 400. Those are
fixed for the lifetime of the test because they drive generation, credit accounting,
and stored test-case shape.
To attach an existing test to a specification (or detach it), use
specifications link-tests / specifications unlink-tests — the test-specification
link is managed from the specification side, not by updating the test.
Authorizations
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
Path Parameters
Test ID
Body
Fields to update. Only name and metadata are accepted.
Test update payload. Only name and metadata are mutable post-creation — any other field (type, variants, URIs, strategies, etc.) will be rejected with a 400.
Response
Test updated successfully
"test_123"
"prod_123"
"user_123"
"Quality Test"
QUALITY, RED_TEAMING, SCENARIOS "QUALITY"
Canonical storage URI of the ground-truth file, derived from the presigned URL supplied at creation. S3: s3://<bucket>/<key>. Azure Blob: blob URL with the SAS query stripped (e.g. https://<account>.blob.core.windows.net/<container>/<path>).
"s3://my-bucket/tests/test_123/ground-truth.csv"
Canonical storage URI of the uploaded custom test file. Same format rules as groundTruthUri.
"s3://my-bucket/tests/test_123/test.csv"
PENDING, SUCCESS, FAILED, AUGMENTING "SUCCESS"
Optional few-shot examples (input/output pairs) used to guide test-case generation for QUALITY tests.
"Example few-shot learning data"
BCP-47 language tag (e.g. en, es-MX). The region subtag affects voice synthesis only.
"es-MX"
Background noise mixed into the simulated caller audio during a voice test. Clip-backed (office, street, car) or synthetic (white, pink). Null means off; set together with backgroundNoiseLevel.
office, street, car, white, pink "street"
How loud the background noise is relative to the caller speech. Null means off; set together with backgroundNoiseProfile.
light, medium, heavy "medium"
Test variants. QUALITY: rag, entity_extraction, summarization, classification, translation, correction, other. RED_TEAMING: data_leakage, financial_attacks, illegal_activities, misuse, toxicity, custom.
["rag", "summarization"]"Custom variant description"
Generation strategies. "original" is the default for RED_TEAMING. At least one strategy is required for SCENARIOS tests.
["original"]"Business analyst"
100
["gpt-4", "claude-3"]Canonical storage URI of the data-catalog file (SCENARIOS tests only). Same format rules as groundTruthUri.
"s3://my-bucket/tests/test_123/data-catalog.json"
{ "key": "value" }"spec_123"