import requests
url = "https://app.langwatch.ai/api/v1/test-suites"
payload = { "name": "<string>" }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://app.langwatch.ai/api/v1/test-suites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/test-suites \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>"
}
'{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"scenarioIds": [
"<string>"
],
"scenarioCount": 123,
"archivedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"platformUrl": "<string>"
}Create a test suite
Create a test suite. It starts empty: scenarios join it by being filed into it, and the targets a run goes against are sent with the run.
import requests
url = "https://app.langwatch.ai/api/v1/test-suites"
payload = { "name": "<string>" }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://app.langwatch.ai/api/v1/test-suites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/test-suites \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>"
}
'{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"scenarioIds": [
"<string>"
],
"scenarioCount": 123,
"archivedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"platformUrl": "<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.
Body
The test suite name, as it reads in the platform.
1 - 200Response
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.
Was this page helpful?