Skip to contentSkip to page list

Docs

Delete records from a dataset by IDs

Delete records from a dataset by IDs

DELETE/api/v1/dataset/{slugOrId}/records
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/dataset/<slugOrId>/records"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {    "recordIds": [],}​response = requests.delete(    origin + path,    headers=headers,    json=payload,)print(response.json())

Success

application/json · Generated from schema

{  "deletedCount": 0}
api-reference/datasets/delete-records

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.

Path parameters

slugOrIdstringrequired

Request body

application/json · Required

recordIdsstring[]required

Responses

200

Success

application/json

deletedCountintegerrequired
Minimum 0Maximum 9007199254740991

Documentation