Skip to contentSkip to page list

Docs

Delete all events

Archive simulation runs. Pass exactly one of scenarioSetId (archives every run in the set; scenarioSetId=default targets the implicit default set) or scenarioRunId (archives that one run).

DELETE/api/v1/scenario-events
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/scenario-events"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,}​response = requests.delete(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "archived": 0,  "failed": 0,  "scenarioSetId": "string",  "hasMore": false,  "scenarioRunId": "string"}
api-reference/scenario-events/delete-scenario-events

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.

Query parameters

scenarioSetIdstring
At least 1 character
scenarioRunIdstring
At least 1 character

Responses

200

Success

application/json

archivedintegerrequired
Minimum 0Maximum 9007199254740991
failedintegerrequired
Minimum 0Maximum 9007199254740991
scenarioSetIdstring
hasMoreboolean
scenarioRunIdstring
400

Missing or invalid scope parameter

application/json

errorstringrequired
401

Unauthorized

application/json

errorstringrequired
messagestring
404

Scenario run not found in this project

application/json

errorstringrequired
422

Unprocessable Entity

application/json

errorstringrequired
messagestring
500

Internal Server Error

application/json

errorstringrequired
messagestring

Documentation