TofuPilotTofuPilot
API Reference (v2)Runs

Delete runs

Permanently delete test runs by their IDs. Removes all associated phases, measurements, and attachments.

Access

API KeyAccess LevelDescription
UserFullUsers can delete runs
StationUnauthorizedStations cannot delete runs

Endpoint

DELETE/v2/runs
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Query Parameters

idsarray<string>

Run IDs to delete.

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.runs.delete(
    ids=["550e8400-e29b-41d4-a716-446655440000", "6ba7b810-9dad-11d1-80b4-00c04fd430c8"]
)

# Handle response
print(result)
{
  "id": [
    "550e8400-e29b-41d4-a716-446655440000",
    "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
  ]
}
{
  "message": "Unauthorized",
  "code": "UNAUTHORIZED",
  "issues": []
}
{
  "message": "Not found",
  "code": "NOT_FOUND",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?