TofuPilotTofuPilot
REST API v2.0 (Preview)/Runs

Delete test runs

Permanently delete one or more test runs by their IDs. This action cannot be undone and will remove all associated data including phases and measurements.

API v2 Preview

This API version might be subject to breaking changes as we stabilize until release planned for Aug 2025.

Access

API KeyAccess LevelDescription
UserFullUsers can delete test runs they have permission to access
StationUnauthorizedStations cannot delete test runs for data integrity purposes

Endpoint

DELETE
/v2/runs
AuthorizationBearer <token>

In: header

Query Parameters

idsarray<string>

Array of run IDs to delete.

Response Body

import tofupilot
from datetime import datetime

client = tofupilot.TofuPilot()
result = client.runs.delete(
    ids="550e8400-e29b-41d4-a716-446655440000,6ba7b810-9dad-11d1-80b4-00c04fd430c8"
)
print(result)
[
  "550e8400-e29b-41d4-a716-446655440000",
  "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
]
{
  "code": "NOT_FOUND",
  "message": "Procedure with ID {procedureId} does not exist. Create the procedure first in the app.",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

How is this guide?