Python
import requests
url = "https://app.langwatch.ai/api/scenario-events"
payload = {
"type": "<string>",
"timestamp": 123,
"batchRunId": "<string>",
"scenarioId": "<string>",
"scenarioRunId": "<string>",
"metadata": {
"name": "<string>",
"description": "<string>"
}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"url": "<string>"
}Scenario Events
Create a new scenario event
Create a new scenario event
POST
/
api
/
scenario-events
Python
import requests
url = "https://app.langwatch.ai/api/scenario-events"
payload = {
"type": "<string>",
"timestamp": 123,
"batchRunId": "<string>",
"scenarioId": "<string>",
"scenarioRunId": "<string>",
"metadata": {
"name": "<string>",
"description": "<string>"
}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"url": "<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
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Was this page helpful?
⌘I