Skip to contentSkip to page list

Docs

Rename a test suite

Edit a test suite: its name, the fields it declares, the evaluators attached to it. Send only what changes. The slug is kept on a rename, so links and run history stay where they are.

PATCH/api/v1/test-suites/{id}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/test-suites/<id>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,}​response = requests.patch(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "id": "string",  "name": "string",  "slug": "string",  "scenarioIds": [    "string"  ],  "scenarioCount": 0,  "fields": [    {      "identifier": "string",      "type": "text"    }  ],  "evaluators": [    {      "id": "string",      "evaluatorId": "string",      "required": false,      "mappings": {}    }  ],  "archivedAt": "string",  "createdAt": "string",  "updatedAt": "string",  "platformUrl": "string"}
api-reference/test-suites/update-test-suites

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

idstringrequired

The test suite id.

At least 1 character

Request body

application/json

namestring

The new name. The slug is kept.

At least 1 characterUp to 200 characters
fieldsobject[]

The full list of fields the suite declares. A field an attached evaluator still reads cannot be removed: answers 422 suite_field_in_use.

identifierstringrequired

The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter.

At least 1 characterUp to 64 charactersPattern ^[a-z][a-z0-9_]*$
typestringrequired

The value type every scenario carries for this field.

One of"text""number""boolean"
evaluatorsobject[]

The full list of evaluators attached to the suite. An evaluator the project does not hold answers 422 suite_evaluator_not_found; a mapping the run cannot read answers 422 suite_evaluator_mapping_invalid.

idstringrequired

The attachment id. Stable across edits of the attachment.

At least 1 characterUp to 64 characters
evaluatorIdstringrequired

The id of the saved evaluator this attachment runs.

At least 1 character
requiredbooleanrequired

Whether a failing result fails the scenario. A score-only evaluator reports and never gates.

mappingsobjectrequired

Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run.

Responses

200

Success

application/json

idstringrequired

The test suite id.

namestringrequired

The test suite name.

slugstringrequired

The suite's address in the platform. It is kept when the suite is renamed.

scenarioIdsstring[]required

The scenarios filed in this suite, in the order it shows them.

scenarioCountnumberrequired

How many scenarios are filed in it.

fieldsobject[]

The fields the test suite declares. Absent on servers that predate fields on this family.

identifierstringrequired

The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter.

At least 1 characterUp to 64 charactersPattern ^[a-z][a-z0-9_]*$
typestringrequired

The value type every scenario carries for this field.

One of"text""number""boolean"
evaluatorsobject[]

The evaluators attached to the test suite. Absent on servers that predate evaluators on this family.

idstringrequired

The attachment id. Stable across edits of the attachment.

At least 1 characterUp to 64 characters
evaluatorIdstringrequired

The id of the saved evaluator this attachment runs.

At least 1 character
requiredbooleanrequired

Whether a failing result fails the scenario. A score-only evaluator reports and never gates.

mappingsobjectrequired

Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run.

archivedAtstring | nullrequired

When the suite was archived, or null while it is active.

createdAtstringrequired

When the suite was created.

updatedAtstringrequired

When the suite was last written.

platformUrlstring (uri)required

Where to open this test suite in the LangWatch platform.

404

Not Found

application/json

errorstringrequired
messagestring
codestringrequired

Documentation