import requests
url = "https://app.langwatch.ai/api/v1/test-suites/{id}"
payload = {}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.langwatch.ai/api/v1/test-suites/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/v1/test-suites/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{}'{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"scenarioIds": [
"<string>"
],
"scenarioCount": 123,
"archivedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"platformUrl": "<string>",
"fields": [
{
"identifier": "<string>",
"type": "text"
}
],
"evaluators": [
{
"id": "<string>",
"evaluatorId": "<string>",
"required": true,
"mappings": {}
}
]
}{
"error": "<string>",
"message": "<string>"
}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.
import requests
url = "https://app.langwatch.ai/api/v1/test-suites/{id}"
payload = {}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.langwatch.ai/api/v1/test-suites/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/v1/test-suites/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{}'{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"scenarioIds": [
"<string>"
],
"scenarioCount": 123,
"archivedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"platformUrl": "<string>",
"fields": [
{
"identifier": "<string>",
"type": "text"
}
],
"evaluators": [
{
"id": "<string>",
"evaluatorId": "<string>",
"required": true,
"mappings": {}
}
]
}{
"error": "<string>",
"message": "<string>"
}Authorizations
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
The test suite id.
1Body
The new name. The slug is kept.
1 - 200The full list of fields the suite declares. A field an attached evaluator still reads cannot be removed: answers 422 suite_field_in_use.
30Show child attributes
Show child attributes
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.
20Show child attributes
Show child attributes
Response
Success
The test suite id.
The test suite name.
The suite's address in the platform. It is kept when the suite is renamed.
The scenarios filed in this suite, in the order it shows them.
How many scenarios are filed in it.
When the suite was archived, or null while it is active.
When the suite was created.
When the suite was last written.
Where to open this test suite in the LangWatch platform.
The fields the test suite declares. Absent on servers that predate fields on this family.
30Show child attributes
Show child attributes
The evaluators attached to the test suite. Absent on servers that predate evaluators on this family.
20Show child attributes
Show child attributes
Was this page helpful?