import requests
url = "https://app.langwatch.ai/api/scenarios/{id}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/scenarios/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/scenarios/{id} \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"name": "<string>",
"situation": "<string>",
"criteria": [
"<string>"
],
"labels": [
"<string>"
],
"parameters": [
{
"name": "<string>",
"description": "<string>",
"defaultValue": "<string>",
"secret": true,
"type": "string",
"options": [
"<string>"
],
"required": true
}
],
"platformUrl": "<string>",
"simulatorModel": "<string>",
"judgeModel": "<string>",
"maxTurns": 123,
"minTurns": 123,
"testSuiteId": "<string>",
"fields": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Get a specific scenario by ID
Get a specific scenario by ID
import requests
url = "https://app.langwatch.ai/api/scenarios/{id}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/scenarios/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/scenarios/{id} \
--header 'X-Auth-Token: <api-key>'{
"id": "<string>",
"name": "<string>",
"situation": "<string>",
"criteria": [
"<string>"
],
"labels": [
"<string>"
],
"parameters": [
{
"name": "<string>",
"description": "<string>",
"defaultValue": "<string>",
"secret": true,
"type": "string",
"options": [
"<string>"
],
"required": true
}
],
"platformUrl": "<string>",
"simulatorModel": "<string>",
"judgeModel": "<string>",
"maxTurns": 123,
"minTurns": 123,
"testSuiteId": "<string>",
"fields": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"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
Response
Success
Show child attributes
Show child attributes
The model that plays the user, or null for the project default. Absent on servers that predate model overrides on this family.
The model that judges the run, or null for the project default. Absent on servers that predate model overrides on this family.
The most conversation turns a run of this scenario takes, or null for the default. Absent on servers that predate turn limits on this family.
The fewest conversation turns before the judge may end a run, or null for the default. Absent on servers that predate turn limits on this family.
The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites.
The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields.
Show child attributes
Show child attributes
Was this page helpful?